The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Need help with fader.js invocation
Hello,
I am trying to rework the newfader hack from vb 2.3.0 to work in vb 3.5. I got the primary code working ok to extract the announcements, newest member, and the latest 10 threads. I can see it in the dump of the generated HTML. The Ouchie I am experiencing is that the fader.js definition is being blanked out from the <SCRIPT command I am placing in the forumhome template. For example, the original install required that the following code be added; Code:
<SCRIPT LANGUAGE='JavaScript1.2' TYPE='text/javascript'> prefix=""; arNews = [ $newsfadebits ] </SCRIPT> <script LANGUAGE='JavaScript1.2' type="text/javascript" src='fader.js'></script> right after $headinclude line in the forumhome template. Ok, fine.. Done! However, what I get as output code is; Code:
<SCRIPT LANGUAGE='JavaScript1.2' TYPE='text/javascript'> prefix=""; arNews = [ ......... ........... .......(the actual DB extracts and HTML wraps) .......... ] </SCRIPT> <script LANGUAGE='JavaScript1.2' type="text/javascript" src=""></script> Is there some thing I am missing ? Or is there some new way I need to quantify the java script as OK for vbulletin to actually run it? Or have I made a typical n00b error, and I am getting my script name blanked out on purpose? I have also added the following to forums/index.php after the setting for $today to generate the lines that will show thru the fader; Code:
// Hack newsfade $newsfadebits = "\"<b><i>Welcome to Bitbender Forums, Where Members RULE</b></i>\",\"\",\n"; $newsfades=$vbulletin->db->query_read("SELECT title,pagetext FROM announcement WHERE enddate>=$today AND forumid=0 ORDER BY startdate DESC"); while ($newsfade=$vbulletin->db->fetch_array($newsfades)) { $newsfadebits.="\"".addslashes($newsfade[pagetext])."\",\"$newsfade[title]\",\n"; } $ammount = 10; $postnr = 0; global $excatforums; $exclude_array = explode(",",$excatforums); $newsfadebits.="\"<font size=2 color=green><b>Please welcome our latest member: $newusername</b></font>\",\"member.php?s=&action=getinfo&userid=$newuserid\",\n\"<font size=2 color=green><b>Next up in the fader: The latest $ammount Posts! Click on the fader message to view</b></font>\",\"\",\n"; $newsfades=$vbulletin->db->query_read("SELECT threadid, title, postusername, forumid FROM thread ORDER BY threadid DESC LIMIT $ammount"); while ($newsfade=$vbulletin->db->fetch_array($newsfades)) { if (in_array($newsfade["forumid"],$exclude_array)) { continue; } else { $postnr++; $threadid = $newsfade["threadid"]; $thetitle = $newsfade["title"]; $amountchr = count_chars($thetitle); if ($amountchr >= 35) {+ $thetitle = substr($thetitle,0,35); $thetitle .= '...'; } $postusername = $newsfade["postusername"]; $content = '"' . $thetitle . '" by ' . $postusername; $newsfadebits.="\"<font style=verdanna size=1 color=crimson><b>Latest post #$postnr is ".addslashes($content)."</b></font>\",\"showthread.php?s=&threadid=$threadid\",\n"; } } $newsfadebits = substr($newsfadebits,0,-2); // End Hack newsfade Code:
<!-- Fader Hack STart --> <table bgcolor="#FFFFFF" cellpadding="4" cellspacing="1" width="100%" border="0"> <TR bgcolor="#6C6081" id=cat align=center><TD colspan=6> <normalfont color="#F5D300"><B>What's Hot on the Forum??</b></normalfont></td> </tr> <tr><td colspan=6 bgcolor="#f7f7f7" height=30 valign="top" align="center"> <div id="elFader" style="position:relative;visibility:hidden;width:500"><div align="center">Forumnews</div></div> </td></tr> <table bgcolor="#FFFFFF" cellpadding="4" cellspacing="1" width="100%" border="0"> <tr align="center"> <!-- fader Hack End --> TIA for any advice, this really used to work nice on my 2.3.0 version. I cannot afford all the cheese that I need to have to deal with the whine of my users for it not being there any more Bits |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|