MyBB Hacks

Full Version: Slideshow with Xthreads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi ZiNgA BuRgA,

I'm trying to add a slideshow to portal page.

I'm using this: http://responsiveslides.com/

In portal <head> I added:

PHP Code:
<script src="http://cdnjs.cloudflare.com/ajax/libs/ResponsiveSlides.js/1.53/responsiveslides.min.js"></script>


And in html portal template:

PHP Code:
<div class="rslides_container">
      <ul id="slides1" class="rslides">
       <li>
          <a href="{$mybb->settings['bburl']}/{$announcement['threadlink']}"><img src="{$mybb->settings['bburl']}/{$GLOBALS['threadfields']['portalimg']['url']}/thumb400x400" width="{$GLOBALS['threadfields']['portalimg']['thumbs']['400x400']['w']}" height="{$GLOBALS['threadfields']['portalimg']['thumbs']['400x400']['h']}" alt="{$announcement['subject']}" /></a>
          <p class="caption">Donec ullamcorper nulla non metus auctor fringilla.</p>
        </li>
        <li>
         <a href="{$mybb->settings['bburl']}/{$announcement['threadlink']}"><img src="{$mybb->settings['bburl']}/{$GLOBALS['threadfields']['portalimg']['url']}/thumb400x400" width="{$GLOBALS['threadfields']['portalimg']['thumbs']['400x400']['w']}" height="{$GLOBALS['threadfields']['portalimg']['thumbs']['400x400']['h']}" alt="{$announcement['subject']}" /></a>
          <p class="caption">Donec ullamcorper nulla non metus auctor fringilla.</p>
        </li>
        <li>
         <a href="{$mybb->settings['bburl']}/{$announcement['threadlink']}"><img src="{$mybb->settings['bburl']}/{$GLOBALS['threadfields']['portalimg']['url']}/thumb400x400" width="{$GLOBALS['threadfields']['portalimg']['thumbs']['400x400']['w']}" height="{$GLOBALS['threadfields']['portalimg']['thumbs']['400x400']['h']}" alt="{$announcement['subject']}" /></a>
          <p class="caption">Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
        </li>
      </ul>
    </div>


With this code appears only an image, random Eyes always the same.

Obviously the image has to have a hook to the related thread to show right image..but how can I do this?

Adding code from portal_announcement? Or with a query, to extract thumbnail image from thread?

Thank you very much in advance

Reference URL's