Forum Replies Created

Viewing 15 replies - 1 through 15 (of 49 total)
  • Thread Starter baudesign

    (@baudesign)

    Well, yes, from the plugin repository on the www.ads-software.com site.

    …oh, and if I may add to this, the gallery option has been disabled in iA3.

    https://en.support.files.wordpress.com/2009/09/gallery-settings.gif”

    Unavailable in the Media Library, hence no gallery shortcode. This should be fixed.

    Hi everyone,

    I hope that this might help setting up a gallery with the iA3 theme.

    First of all, the gallery.php template is not a template per se. You can refer to it in order to set up your own template using the default template drop down option.

    Now, if you notice the code in this template:

    <ul class="containsGallery">
    <li class="G1"><a href="https://www.placeholder-image.com/image/288x288" rel="gallery-1"><img alt="" src="https://www.placeholder-image.com/image/142x142" title="" /></a></li>
    <li class="G1"><a href="https://www.placeholder-image.com/image/288x288" rel="gallery-1"><img alt="" src="https://www.placeholder-image.com/image/142x142" title="" /></a></li>
    <li class="G1"><a href="https://www.placeholder-image.com/image/288x288" rel="gallery-1"><img alt="" src="https://www.placeholder-image.com/image/142x142" title="" /></a></li>
    <li class="G1"><a href="https://www.placeholder-image.com/image/288x288" rel="gallery-1"><img alt="" src="https://www.placeholder-image.com/image/142x142" title="" /></a></li>
    <li class="G1"><a href="https://www.placeholder-image.com/image/288x288" rel="gallery-1"><img alt="" src="https://www.placeholder-image.com/image/142x142" title="" /></a></li>
    <li class="G1"><a href="https://www.placeholder-image.com/image/288x288" rel="gallery-1"><img alt="" src="https://www.placeholder-image.com/image/142x142" title="" /></a></li>
    <li class="G1"><a href="https://www.placeholder-image.com/image/288x288" rel="gallery-1"><img alt="" src="https://www.placeholder-image.com/image/142x142" title="" /></a></li>
    <li class="G1"><a href="https://www.placeholder-image.com/image/288x288" rel="gallery-1"><img alt="" src="https://www.placeholder-image.com/image/142x142" title="" /></a></li>
    </ul><!-- .containsGallery -->

    …you have an unordered list with a class .containsGallery. This is the key to trigger fancybox lightbox effect.

    Why? Well, if you look into the code of the ia3.jsfile, you will notice this line:

    {jQuery(".containsGallery a,.eStore-thumbnail a, a.enlarge").fancybox [...]

    What does this thing say? It says that if you have an anchor a under an element with the containsGallery class, it will be fancyboxed! The same goes with eStore-thumbnail, obviously a class specific to the Information Architects Web site, but most of all, if you look at the third option, any anchor that has the enlarge class: a.enlarge.

    So, if you want to have a fancybox effect, just put the enlarge class to any anchor, and it will be triggered.

    Ok, now that we know that, you might have tried it just using the gallery.php template without changing anything to it; you might have clicked on a thumbnail, and you might have noticed that nothing happened except for the little spinning icon. The reason: https://www.placeholder-image.com/image/288x288 produces no image, as far as I understand. Try this: repace all those lines by https://dummyimage.com/288x288/000/fff.jpg (Dummy Image being another of those free placeholder image service on the Web), and you will see that it works fine.

    Now back to our original question: how do we set up a gallery with the iA3 theme? The short answer, by hard coding it in a WordPress page.

    1. Create a new page, and use the default template (yea, i know, kind of confusing);
    2. Use the htmltab;
    3. Create your gallery with the links to you images, and do not specify any width or height (the CSS will take care of it);
    4. Make sure that the ul above has the containsGallery class;
    5. For a one column width, use G1 (it is a column grid structure, i presume that it means Grid 1), for a two column grid, G2, and so forth;

    I hope that this might have helped a bit.

    You want to try it, just cut and paste this code in your WordPress page editor, and preview, you will see for yourself:

    <h1>Category Name</h1>
    <ul class="containsGallery">
    <li class="G1"><a href="https://dummyimage.com/600x600/000/fff.jpg" rel="gallery-1"><img alt="" src="https://dummyimage.com/420x420/ddd/fafafa.jpg" title="" /></a></li>
    <li class="G1"><a href="https://dummyimage.com/600x600/000/fff.jpg" rel="gallery-1"><img alt="" src="https://dummyimage.com/420x420/ddd/fafafa.jpg" title="" /></a></li>
    <li class="G1"><a href="https://dummyimage.com/600x600/000/fff.jpg" rel="gallery-1"><img alt="" src="https://dummyimage.com/420x420/ddd/fafafa.jpg" title="" /></a></li>
    <li class="G1"><a href="https://dummyimage.com/600x600/000/fff.jpg" rel="gallery-1"><img alt="" src="https://dummyimage.com/420x420/ddd/fafafa.jpg" title="" /></a></li>
    <li class="G1"><a href="https://dummyimage.com/600x600/000/fff.jpg" rel="gallery-1"><img alt="" src="https://dummyimage.com/420x420/ddd/fafafa.jpg" title="" /></a></li>
    <li class="G1"><a href="https://dummyimage.com/600x600/000/fff.jpg" rel="gallery-1"><img alt="" src="https://dummyimage.com/420x420/ddd/fafafa.jpg" title="" /></a></li>
    <li class="G1"><a href="https://dummyimage.com/600x600/000/fff.jpg" rel="gallery-1"><img alt="" src="https://dummyimage.com/420x420/ddd/fafafa.jpg" title="" /></a></li>
    <li class="G1"><a href="https://dummyimage.com/600x600/000/fff.jpg" rel="gallery-1"><img alt="" src="https://dummyimage.com/420x420/ddd/fafafa.jpg" title="" /></a></li>
    </ul><!-- .containsGallery -->
    Thread Starter baudesign

    (@baudesign)

    Thanks to Chris over at Thematic Support, the solution to my question was:

    function add_markup($output) {
        return preg_replace('/cat-item/', 'cat-item cat-item-first', $output, 1);
    }
    add_filter('wp_list_categories', 'add_markup');

    Thanks to all of you guys who looked at my question, stvwlf, t31os_

    Pat

    In the meantime, you can use &ecirc; instead of ê, and it solves the problem, du moins en fran?ais.

    Thread Starter baudesign

    (@baudesign)

    This list is automatically generated by WP. It lists the categories of you blog in the sidebar. And the classes are automatically applied by WP, they come from the classes.php file in the wp-includes folder.

    Some code pasted here:

    if ( 'list' == $args['style'] ) {
    			$output .= "\t<li";
    			$class = 'cat-item cat-item-'.$category->term_id;
    			if ( isset($current_category) && $current_category && ($category->term_id == $current_category) )
    				$class .=  ' current-cat';
    			elseif ( isset($_current_category) && $_current_category && ($category->term_id == $_current_category->parent) )
    				$class .=  ' current-cat-parent';
    			$output .=  ' class="'.$class.'"';
    			$output .= ">$link\n";
    		} else {
    			$output .= "\t$link<br />\n";
    		}

    I am no PHP programmer, but I have a good idea of what it can be done, and I suppose that you could create a function that would say…

    if li is the first element in the list, then apply cat-item-first class on top of cat-item and cat-item-[X], where X is a number.

    But again, I do not want to modify the classes.php file. I use thematic framework. I would like to add this function in the function.php file.

    Possible?

    Thanks.

    Pat

    Anyone following this subjet? The problem has not been solved. Je suis ici, et je cherche toujours: é, à, ê, où, ici…

    Well thanks to you guys, and thanks to Google! I have been scratching my head for the last four hours to finally having found this post.

    I use the latest WP version 2.3.1 and the bug is obviously still there.

    The solution from munzli above worked fine for me. Thanks for suggesting it.

    Now… good night.

    Thread Starter baudesign

    (@baudesign)

    Sorry Kafakaesqui, you were right all the way. I had not noticed that if ( is_home ()) { was outside my main <div>. Your code looks much better than mine. ?? And it works perfectly well.

    Thanks again. I really appreciate.

    Patrick

    Thread Starter baudesign

    (@baudesign)

    Thanks for the reply kafkaesqui.

    I have not tried your suggestion, but looking at it, it would not work.

    What I am tring to do is this:

    1. On the home page, if the latest post has an image associated to it(custom field), display that image;

    2. On the home page, if the latest post has no associated image, then display the default image (some logo, or whatever else);

    3. And if you are on another page than the home page, then, do not show any image at all.

    My code works, no problem there. But It seems strange to me (I am no PHP programmer) that there is nothing after the last “else” conditional statement:

    else { } ?>

    Should’n there be something between the brackets?

    Thanks

    Patrick

    Thread Starter baudesign

    (@baudesign)

    My problem is partly solved with this code:

    <div id="latest-post-image">
      <?php if (get_post_meta($post->ID, 'latest_home_img', true) && (is_home()) ) { ?>
    
    Show the associated image
    
      <?php } else if (!get_post_meta($post->ID, 'latest_home_img', true) && (is_home()) ) { ?>
    
    Show the default image
    
      <?php } else {  ?>
    
      <?php } ?>
    </div>

    Oddly, this works perfectly. But isn’t there suppose to be something at the end after “else”, like echo empty, or echo “nothing”, or exit or…?

    Thanks

    Patrick

    Thread Starter baudesign

    (@baudesign)

    The clue is explained here:

    strftime()

    The solution, for me:

    setlocale(LC_ALL,’fr_FR.UTF-8′); // set localization language French, with UTF-8 encoding

    Thread Starter baudesign

    (@baudesign)

    Everything is generated by the PHP program, so it looks. There are no months in the script itself. Perhaps it has to do with setlocale(LC_ALL,WPLANG); // set localization language Any idea?

    I tried to get in touch with the plugin developer, but unless his spam filter trashes my message because there is a hyperlink inlcuded in it, he does not respond.

    Thanks for any suggestion.

    Thread Starter baudesign

    (@baudesign)

    Nothing?

    Well, I do not get it. With Firefox internal Feed reader, I get the summary. With Netvibes, I get the summary (But I get the complete text reading Gizmodo!?).

    But then, when I use the Sage plug-in in Firefox, this thing can see the whole content, or the summary, when I switch the option in the Control Panel of my WordPress site. In other words, only Sage works fine.

    Pfff!

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