Title: Djul's Replies | WordPress.org

---

# Djul

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

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

 Search replies:

## Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Display only the last attachment images (hide the first)](https://wordpress.org/support/topic/display-only-the-last-attachment-images-hide-the-first/)
 *  Thread Starter [Djul](https://wordpress.org/support/users/djul/)
 * (@djul)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/display-only-the-last-attachment-images-hide-the-first/#post-2313403)
 * up
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [PHPlist installation on WordPress](https://wordpress.org/support/topic/phplist-installation-on-wordpress/)
 *  Thread Starter [Djul](https://wordpress.org/support/users/djul/)
 * (@djul)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/phplist-installation-on-wordpress/#post-2030545)
 * A small update for those in the same situation…
 * I managed to access PHPlist Admin page after installing the “list” folder (the
   one in phplist-2.10.13) at the root of my WP installation. You also have to create
   a database for PHPlist, didn’t tried but it might work with a table on the already
   existing database (the wordpress one).
 * Then you have to go to the adresse of your site ([http://nameofyourWPsite/lists/admin](http://nameofyourWPsite/lists/admin)).
 * You’ll be asked to fill your Id and pass to enter the Admin UI. And I’m stuck
   here. Invalid password… To be continued.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [External images in post show as thumbnail](https://wordpress.org/support/topic/external-images-in-post-show-as-thumbnail/)
 *  [Djul](https://wordpress.org/support/users/djul/)
 * (@djul)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/external-images-in-post-show-as-thumbnail/#post-1418862)
 * Thank you all!
    I get it working locally by duplicating the function, and I renamed
   the 2nd (changed the size by the way). Then, as vnatura said, all you do is calling
   <?php getImage(‘1’); ?>,<?php getImageWhateverYoulike(‘1’); ?>…
 * But I’m facing another problem now. I uploaded my site, and boom this appears!
   
   Warning: Cannot modify header information – headers already sent by (output started
   at /homepages/32/d214056268/htdocs/wp-content/themes/youpie_template/functions.
   php:4)…
 * So I’m trying to find the error in 4th line of my functions.php, but no way. 
   It makes me crazy! Any Php superhero could help me? 🙂
 *     ```
       <?php if ( function_exists ('register_sidebar')) {
       register_sidebar ('custom');}?><!--  la fonction au dessus permet de rendre une div "widget ready"
       Elle est chargée dans le template via l'appel php "get_sidebar ('custom')" -->
       <?php function getImage($num){
       global $more;
       $more = 1;
       $link = get_permalink();
       $content = get_the_content();
       $count = substr_count($content, '<img');
       $start = 0;
       for($i=1;$i<=$count;$i++) {
       $imgBeg = strpos($content, '<img', $start);
       $post = substr($content, $imgBeg);
       $imgEnd = strpos($post, '>');
       $postOutput = substr($post, 0, $imgEnd+1);
       $postOutput = preg_replace('/width="([0-9]*)" height="([0-9]*)"/', '/width="260? height="150?/',$postOutput);
       $image[$i] = $postOutput;
       $start=$imgEnd+1;
       }
       if(stristr($image[$num],'<img')) { echo ''.$image[$num].""; }
       $more = 0;
       }?><!--  la fonction au dessus permet de charger la première image d'un post. Elle est chargée dans le template via l'appel php "getImage('1')" -->
       <?php function getImageIndex($num){
       global $more;
       $more = 1;
       $link = get_permalink();
       $content = get_the_content();
       $count = substr_count($content, '<img');
       $start = 0;
       for($i=1;$i<=$count;$i++) {
       $imgBeg = strpos($content, '<img', $start);
       $post = substr($content, $imgBeg);
       $imgEnd = strpos($post, '>');
       $postOutput = substr($post, 0, $imgEnd+1);
       $postOutput = preg_replace('/width="([0-9]*)" height="([0-9]*)"/', '/width="167? height="100?/',$postOutput);
       $image[$i] = $postOutput;
       $start=$imgEnd+1;
       }
       if(stristr($image[$num],'<img')) { echo ''.$image[$num].""; }
       $more = 0;
       }?>
       <!--  la fonction au dessus est identique à la précédente. Elle est
       juste modifiée au niveau de la taille des images pour pouvoir afficher
       les images sur une autre page sans être forcer de garder la taille des
       images de la première fonction.
       Elle est chargée dans le template via l'appel php "getImageIndex('1')" -->
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [External images in post show as thumbnail](https://wordpress.org/support/topic/external-images-in-post-show-as-thumbnail/)
 *  [Djul](https://wordpress.org/support/users/djul/)
 * (@djul)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/external-images-in-post-show-as-thumbnail/#post-1418858)
 * Hi,
    I found this function really useful, but am facing a problem now. I added
   the code in one of my templates and now I need to use the same function in another
   page but in a different layout.
 * I already managed to make pictures displayed on both pages (thanks to a WP_Query
   for the second). But in the 2nd page, I need the size to be changed.
 * How can I make the same function display two different image size?
    And how to
   control it? Hope I’m clear enough, It’s getting quite technical for my english!
   🙂
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Adding a third stylesheet to my WP site](https://wordpress.org/support/topic/adding-a-third-stylesheet-to-my-wp-site/)
 *  Thread Starter [Djul](https://wordpress.org/support/users/djul/)
 * (@djul)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/adding-a-third-stylesheet-to-my-wp-site/#post-1648390)
 * Oops, found on my own.
    Just forgot open and close brace for the 2nd stylesheet…
   Well I’m not php fluent actually 😛
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Page specific plugin – Theme developpement](https://wordpress.org/support/topic/page-specific-plugin-theme-developpement/)
 *  Thread Starter [Djul](https://wordpress.org/support/users/djul/)
 * (@djul)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/page-specific-plugin-theme-developpement/#post-1634611)
 * Well finally, I find it easier to use differents
    stylesheets to have the “Masonry
   Layout”. It looks less impressive when loading the page, but at least I can control
   the visual and post!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Page specific plugin – Theme developpement](https://wordpress.org/support/topic/page-specific-plugin-theme-developpement/)
 *  Thread Starter [Djul](https://wordpress.org/support/users/djul/)
 * (@djul)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/page-specific-plugin-theme-developpement/#post-1634486)
 * Thank you David.
    That’s what I found but I’m still searching for the code part.
   🙂
 * I though I could use something like `wp_deregister_style();` in functions.php
   but I still can’t get it working.
 * How would you proceed to enable the plugin on the home, or disable it on the 
   other pages?
 * I might sound newbie but I’m stuck with the logic of code…I’m not a poet! 🙂

Viewing 7 replies - 1 through 7 (of 7 total)