The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
Use jQuery to reload vBCMPS featured photos
I'm trying to reload the featured photos every X seconds inside my vBCMPS module using jQuery. I'm using this code in my "adv_portal_random_pictures" template:
Code:
<script src="http://ajax.googleapis.com/ajax/ libs/jquery/1.3.0/jquery.min.js"></script> <script> var auto_refresh = setInterval( function() { $('#loaddiv').fadeOut('slow').load('reload.php').fadeIn("slow"); }, 20000); </script> <div id="loaddiv"> </div> And this code in /forums/reload.php: Code:
<?php echo "$mods[formcode] <div id=\"loaddiv\" style=\"padding-bottom:$vba_style[portal_vspace]px\"> <table align=\"center\" border=\"0\" cellpadding=\"$stylevar[cellpadding]\" cellspacing=\"$stylevar[cellspacing]\" class=\"tborder\" width=\"100%\"> <thead> <tr> <td class=\"tcat\" colspan=\"$mods[colspan]\"> <if condition=\"'$vba_style[portal_collapsemods]'\"> <a href=\"#top\" onclick=\"'return toggle_collapse(module_$mods[collapse])'\" style=\"float:$stylevar[right]\"><img alt=\"\" border=\"0\" id=\"collapseimg_module_$mods[collapse]\" src=\"$stylevar[imgdir_button]/collapse_tcat$modimgcollapse.gif\" /></a> </if> <span class=\"tcat\"><strong>$vba_style[portal_blockbullet] <if condition=\"'$mods[link]'\"><a href=\"$mods[link]\">$mods[title]</a><else />$mods[title]</if>:</strong> <span class=\"smallfont\"><a href=\"/forums/all_albums.php\">View More</a> | <a href=\"/forums/album.php?do=addalbum\">Create New Album</a></span></span></td> </tr> </thead> <tbody id=\"collapseobj_module_$mods[collapse]\" style=\"$modcollapse\"> <if condition=\"'$show[tablerow]'\"> <tr> <td class=\"$bgclass\"> $modulehtml </td> </tr> <else /> $modulehtml </if> </tbody> </table> </div> <if condition=\"'$mods[formcode]'\"></form></if>"; ?> I did something right because it does load the module and refreshes it every 20 seconds but it doesn't show any content in the module and when it reloads, it reloads the entire module instead of just the content inside it. Any suggestions on what I'm missing? Not much of a programmer but I enjoy trying. Thanks for any help! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|