Title: leup's Replies | WordPress.org

---

# leup

  [  ](https://wordpress.org/support/users/leup/)

 *   [Profile](https://wordpress.org/support/users/leup/)
 *   [Topics Started](https://wordpress.org/support/users/leup/topics/)
 *   [Replies Created](https://wordpress.org/support/users/leup/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/leup/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/leup/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/leup/engagements/)
 *   [Favorites](https://wordpress.org/support/users/leup/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/users/leup/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/leup/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Problem with relevanssi_create_excerpt and unicode ?](https://wordpress.org/support/topic/problem-with-relevanssi_create_excerpt-and-unicode/)
 *  Thread Starter [leup](https://wordpress.org/support/users/leup/)
 * (@leup)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/problem-with-relevanssi_create_excerpt-and-unicode/#post-6300223)
 * 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](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] Polylang Domains and directory](https://wordpress.org/support/topic/polylang-domains-and-directory/)
 *  [leup](https://wordpress.org/support/users/leup/)
 * (@leup)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/polylang-domains-and-directory/#post-6338182)
 * Hi 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 !
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Problem with relevanssi_create_excerpt and unicode ?](https://wordpress.org/support/topic/problem-with-relevanssi_create_excerpt-and-unicode/)
 *  Thread Starter [leup](https://wordpress.org/support/users/leup/)
 * (@leup)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-relevanssi_create_excerpt-and-unicode/#post-6300015)
 * I made a quick search
 * [Google](https://www.google.fr/search?q=text+search+word+exceprt&ie=utf-8&oe=utf-8&gws_rd=cr&ei=PaqbVaTMBeaCygPkq7jACg#q=text+search+word+excerpt)
 * I think these links could be useful
 * [Drupal 7](https://api.drupal.org/api/drupal/modules!search!search.module/function/search_excerpt/7)
 * [Stackoverflow](http://stackoverflow.com/questions/1436582/how-to-generate-excerpt-with-most-searched-words-in-php)
 * [WordPress plugin for search excerpts](http://scott.yang.id.au/pages/search-excerpt.html)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Problem with relevanssi_create_excerpt and unicode ?](https://wordpress.org/support/topic/problem-with-relevanssi_create_excerpt-and-unicode/)
 *  Thread Starter [leup](https://wordpress.org/support/users/leup/)
 * (@leup)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-relevanssi_create_excerpt-and-unicode/#post-6300011)
 * 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 ^^
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Problem with relevanssi_create_excerpt and unicode ?](https://wordpress.org/support/topic/problem-with-relevanssi_create_excerpt-and-unicode/)
 *  Thread Starter [leup](https://wordpress.org/support/users/leup/)
 * (@leup)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-relevanssi_create_excerpt-and-unicode/#post-6299918)
 * 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](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] [Plugin: Contact Form 7] Pipes : get before value](https://wordpress.org/support/topic/plugin-contact-form-7-pipes-get-before-value/)
 *  Thread Starter [leup](https://wordpress.org/support/users/leup/)
 * (@leup)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-contact-form-7-pipes-get-before-value/#post-1766445)
 * Hi !
 * 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](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WP 3.2.1 Really slow still](https://wordpress.org/support/topic/wp-321-really-slow-still/)
 *  [leup](https://wordpress.org/support/users/leup/)
 * (@leup)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/wp-321-really-slow-still/page/2/#post-2187169)
 * Hi 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) :
 * [http://yoursite/wp-admin/upgrade.php?step=1](http://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](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WP 3.2.1 Really slow still](https://wordpress.org/support/topic/wp-321-really-slow-still/)
 *  [leup](https://wordpress.org/support/users/leup/)
 * (@leup)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/wp-321-really-slow-still/#post-2187122)
 * Hi !
 * 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](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-EMail] [Plugin: WP-EMail] Multisite compatible](https://wordpress.org/support/topic/plugin-wp-email-multisite-compatible/)
 *  [leup](https://wordpress.org/support/users/leup/)
 * (@leup)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-email-multisite-compatible/#post-1772225)
 * Hi,
 * 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](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] [Plugin: Contact Form 7] Pipes : get before value](https://wordpress.org/support/topic/plugin-contact-form-7-pipes-get-before-value/)
 *  Thread Starter [leup](https://wordpress.org/support/users/leup/)
 * (@leup)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-contact-form-7-pipes-get-before-value/#post-1766410)
 * Hi 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
 * [
    http:/glasshouse.fr/dnload/contact-form-7-beforepipe.zip
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] [Plugin: Contact Form 7] Pipes : get before value](https://wordpress.org/support/topic/plugin-contact-form-7-pipes-get-before-value/)
 *  Thread Starter [leup](https://wordpress.org/support/users/leup/)
 * (@leup)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-contact-form-7-pipes-get-before-value/#post-1766337)
 * You’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](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] [Plugin: Contact Form 7] Pipes : get before value](https://wordpress.org/support/topic/plugin-contact-form-7-pipes-get-before-value/)
 *  Thread Starter [leup](https://wordpress.org/support/users/leup/)
 * (@leup)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-contact-form-7-pipes-get-before-value/#post-1766335)
 * Hi dotblend,
 * don’t know why you get this error.
 * This is my classes.php based on the latest version of cf7 :
 * [cf7_classes.zip](http://www.glasshouse.fr/dnload/cf7_classes.zip)
 * I hope it will help you.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] [Plugin: Contact Form 7] Pipes : get before value](https://wordpress.org/support/topic/plugin-contact-form-7-pipes-get-before-value/)
 *  Thread Starter [leup](https://wordpress.org/support/users/leup/)
 * (@leup)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-contact-form-7-pipes-get-before-value/#post-1766304)
 * Wouldn’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. 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Field Template] [Plugin: Custom Field Template] Media Button opens in same window…won't save anything?](https://wordpress.org/support/topic/plugin-custom-field-template-media-button-opens-in-same-windowwont-save-anything/)
 *  [leup](https://wordpress.org/support/users/leup/)
 * (@leup)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-media-button-opens-in-same-windowwont-save-anything/#post-1594149)
 * 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](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: Custom Field Template] Multiple templates/custom post types](https://wordpress.org/support/topic/plugin-custom-field-template-multiple-templatescustom-post-types/)
 *  [leup](https://wordpress.org/support/users/leup/)
 * (@leup)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-multiple-templatescustom-post-types/#post-1526006)
 * I 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.

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/users/leup/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/leup/replies/page/2/?output_format=md)