leup
Forum Replies Created
-
Hi Mikko,
Sorry for the delay. It would be definitely interesting but I have not so much time right now to do some tests.
Forum: Plugins
In reply to: [Polylang] Polylang Domains and directoryHi Chouby,
There is a similar use case where it would be useful.
Having one website for multiple countries and some countries with more than one languages.
Example:
mybrand.fr for the french website with only french language
mybrand.be/fr and mybrand.be/nl for the belgian website with french and dutch(~y) languages.For now our only solution is two different websites for .fr and .be websites. As the content (products) are mostly the same it would have been nice to have only one product database and as many translations as needed for country/locales.
Thanks !
I made a quick search
I think these links could be useful
Hi ! Thanks for your answer ! ??
I removed the leading space character as it suits my needs better and added the \u modifier.
I understand why you add the leading space but indeed it is far from perfect for every cases. Maybe using some regular expressions may be best ? Well, it would not give you the position of the occurence into the text… complex indeed. I will check what solution exists on the internet ^^
In the same function, I have another problem.
There is this line (234~):
$term = " $term";
I do understand that you are searching for words and not parts of words (not fuzzy) but there is a problem here with words with an apostroph.
Example: query => “afrique”. If the text is “L’afrique”, the excerpt will fail on finding the term ” afrique”.
Also, if I understand this correctly, if the function “mb_stripos” do not exists you do :
$titlecased = mb_strtoupper(mb_substr($term, 0, 1)) . mb_substr($term, 1);
and as the term always start with a blank space it fails to search the term with a first uppercase character.
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] Pipes : get before valueHi !
This is a plugin. So you just have to unzip it in your wp-content/plugins folder and activate it in your plugins admin area.
I did not test it with the last version (3.0..) of Contact Form 7 by the way.
Forum: Fixing WordPress
In reply to: WP 3.2.1 Really slow stillHi all !
I seem to have resolved my issue with the slow admin on multisite admin.
It seems to timeout on requesting the upgrade process.
What I did is to browse myself to the upgrade page and do the requested actions.
Now, the admin seems to be at is “normal speed”.
Try to log to this page (being logged as admin) :
https://yoursite/wp-admin/upgrade.php?step=1
Click on the “Update Database” button, and voilà ! (well, it worked for me (twice), I hope it will work for you too !)
Forum: Fixing WordPress
In reply to: WP 3.2.1 Really slow stillHi !
I get the same problem here.
On a same server, I have a one-site WordPress and the 3.2.1 upgrade (from 3.1.4) is going fine.
But on antoher muti-site install, the backend is really, really slow. I get exactly the same behavoir describer by DanYork above. When I tried to “Update Network” (thinking that it would maybe solve the problem), I have a “couln’d connect to host” error message after waiting a few minutes that the page loads.
So I downgraded it to 3.1.
As I see it, it should not be a PHP/MySQL version as on 2 different install, one is running well and one is awfully slow.
Forum: Plugins
In reply to: [WP-EMail] [Plugin: WP-EMail] Multisite compatibleHi,
I would be very pleased to get your mod but the zip file you linked is just the same as the official plugin.
Could you please re-post your fixed plugin files, thanks !
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] Pipes : get before valueHi dotblend,
I’m sorry but there is no reason why it does not work anymore. Are you sure you did not have launch an automatic update which could have delete your modifications ?
I made a plugin as suggested by Miyoshi
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] Pipes : get before valueYou’re welcome. I would like to see it (or something like that) into the source too as upgrading could not be done automatically…
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] Pipes : get before valueHi dotblend,
don’t know why you get this error.
This is my classes.php based on the latest version of cf7 :
I hope it will help you.
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] Pipes : get before valueWouldn’t it be useful to add something like this to the plug-in ?
I ask because i would like to see this feature in the plugin and be able to upgrade it without having to patch it every time. ??
In fact, i figured that my code isn’t enough. I had to add a hook for styles in custom_field_template :
[...] add_action( 'admin_print_styles', array(&$this, 'custom_field_template_admin_styles') ); [...]
which calls :
function custom_field_template_admin_styles() { if( strstr($_SERVER['REQUEST_URI'], 'wp-admin/post-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/post.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php') || (isset($post) && $post->post_type=='page') ) { wp_enqueue_style( 'thickbox' ); } }
and, in custom_field_template_admin_scripts i replaced :
add_thickbox();
by
wp_enqueue_script( 'thickbox' );
Forum: Plugins
In reply to: [Plugin: Custom Field Template] Multiple templates/custom post typesI prefer to use shortcode rather than the ‘getCustomField’ function :
<?php echo do_shortcode('[cft key=Description]') ; ?>
But it’s really just a matter of choice.
It suit better my needs to get the value and be able to work on it rather than echo-ing it out of the box.For example, VCarrousel can be an image or a flash file.
<?php //on récupère l'id de l'objet attaché $idvc = do_shortcode('[cft key=VCarrousel]'); //si c'est une image, on l'affiche au format 160x160 pixels if (wp_attachment_is_image($idvc)) { echo wp_get_attachment_image($idvc , 'attachment-160x160' ) ; } //si c'est pas une image else { //on vérifie si c'est du flash if (preg_match('@(shockwave|flash)@i',get_post_mime_type($idvc))) { echo do_shortcode('[swfobj src="'. wp_get_attachment_url($idvc) . '" dynamic_embed="true" play="false"]'); } } ?>
which you could not do with the simple getCustomField function.