1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

xenForo + ColorBox [need help!]

Discussion in 'XenForo Questions and Support' started by 14m3r, Oct 15, 2010.

  1. 14m3r

    14m3r Member

    Hi there,
    I had the idea to combine xenForo and ColorSlide.
    So what I did:
    1. Unpacked attached archive in ./forum/js/
    2. Add the following to the end of 'page_container_js_head' template:
    Code:
    <script type="text/javascript" src="js/colorbox/jquery.colorbox-min.js"></script>
    <link rel="stylesheet" type="text/css" href="js/colorbox/colorbox.css" media="screen" />
    <script>
    $(document).ready(function(){
    $("a[rel='r4mzesBox']").colorbox();
    });
    </script>
    
    3. In template 'attached_files', I changed this codeblock:
    Code:
    <div class="thumbnail">
    <a href="{xen:link attachments, $attachment}" target="_blank">
    <img src="{xen:if $attachment.thumbnailUrl, $attachment.thumbnailUrl, '@imagePath/xenforo/widgets/page.png'}" alt="{$attachment.filename}" />
    </a>
    </div>
    
    to
    Code:
    <div class="thumbnail">
    <a href="{xen:link attachments, $attachment}" rel="r4mzesBox" target="_blank">
    <img src="{xen:if $attachment.thumbnailUrl, $attachment.thumbnailUrl, '@imagePath/xenforo/widgets/page.png'}" alt="{$attachment.filename}" />
    </a>
    </div>
    
    (just add to link my rel: rel="r4mzesBox" )

    I dont understand why the images can not to load... ^^
    [​IMG]
    If anyone has ideas how to get it to work, I'll be glad to hear it. :rolleyes:
     

    Attached Files:

Share This Page