Article gallery
  • hello dear members

    i had read the cook book
    and found this code for make the image gallery for articles which hast more than one photo attached

    1. {{list_article_images columns="4"}}
    2. {{if $gimme->current_list->count > 1}}
    3. {{if $gimme->current_list->at_beginning}}
    4. <div class="image-gallery-title">Article Images</div>
    5. <div class="image-gallery-container">
    6. {{/if}}
    7. {{if $gimme->image->article_index > 2}}
    8. <a href="{{uri options="image"}}" rel="gallery" class="gallery_thumbnail"
    title="{{$gimme->image->description|escape}}">
    9. <img src="{{uri options="image"}}&ImageRatio=20" alt="{{$gimme->image-
    >description|escape}}" width="100" height="100" />
    10. </a>
    11. {{/if}}
    12. {{if $gimme->current_list->at_end}}
    13. </div>
    14. {{/if}}
    15. {{/if}}
    16. {{/list_article_images}}
    17.
    18. <script type="text/javascript">
    19. $(document).ready(function(){
    20.
    21. $("a.gallery_thumbnail").fancybox({
    22. type: 'image',
    23. titlePosition: 'inside',
    24. transitionIn: 'none',
    25. transitionOut: 'none',
    26. centerOnScroll: 'true'
    27. });
    28. $("a.gallery_thumbnail").live("mouseenter",function(){$(this).animate({opacity:1},200);});
    29. $("a.gallery_thumbnail").live("mouseleave",function(){$(this).animate({opacity:0.8},200);});
    30.
    31. });
    32. </script>


    my question is it, where should i add it?
    in article.tpl? and where is better too add this code?
    and give me any advices


    regardsssss
    Ali
  • 4 Comments sorted by
  • It depends on your templates, but yes... if you have something like article.tpl, then you can place it there and it should work.
  • ...or you can download updated 'Journal' template pack (the-journal-newscoop-sample-site-3.5.x.tar.gz) from Sourceforge ( https://sourceforge.net/projects/newscoop/files/3.5.x%20Temp lates/) and see it implemented - template is article-gallery.tpl, which needs to be included form article.tpl ({{ include file="set_thejournal/_tpl/article-gallery.tpl" }})

    --
    Ljuba Rankovic
    Senior Front End Developer, Sourcefabric
    ljuba.rankovic@sourcefabric.org

    http://www.sourcefabric.org
    http://www.twitter.com/Sourcefabric
  • Another way you can check those templates on "The Journal" is to log in to
    the Newscoop demo site and see it in action there:
    http://newscoop-demo.sourcefabric.org/admin. Follow the instructions there,
    and then go to Configure -> Templates to see article.tpl and other templates
    in action.

    Hope this helps,

    doug

    On Thu, Jun 2, 2011 at 10:34 AM, ljuba rankovic <
    newscoop-support@lists.sourcefabric.org> wrote:

    > ...or you can download updated 'Journal' template pack
    > (the-journal-newscoop-sample-site-3.5.x.tar.gz) from Sourceforge ( https://sourceforge.net/projects/newscoop/files/3.5.x%20Temp lates/< https://sourceforge.net/projects/newscoop/files/3.5.x%20Temp lates/>)
    > and see it implemented - template is article-gallery.tpl, which needs to be
    > included form article.tpl ({{ include
    > file="set_thejournal/_tpl/article-gallery.tpl" }})
    >
    >
    >

    Douglas Arellanes
    Director of Innovation
    Sourcefabric, o.p.s.

    Find a way or make one.
  • i did it but i found this error

    Parse error: syntax error, unexpected ';' in C:\xampp\htdocs\newscoop\templates_cache\%%76^765^76575906%% article-gallery.tpl.php on line 17

    the code looks ok

    any idea????????????