The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Compose External Javascript Details »» | |||||||||||||||||||||||||
vB Compose External v. 1.0.3 (Updated)
This hack provides an easy way to generate JS-Code for the Javascript syndication system on vB 3. It has been tested with VB 3.0.0 RC 1 and higher. Features:
Insert the phrases using the XML-files. There are phrases for some languages. You can of course translate them to other languages using the phrase-system. If you do so, please send me the XML-files for these translations. I will add them to this ZIP. Right now there are:
Step 2: Upload the file composeexternal.php in the root of your forum. Upload the files in the folder /images/composeexternal/ on the server. Step 3: Add a new template with the name "composeexternal" and add the content of composeexternal_template.txt (in this zip) to it. Step 4: Search for the following code on template forumdisplay: Code:
<div><img class="inlineimg" src="$stylevar[imgdir_button]/subscribe.gif" alt="$vbphrase[view_parent_forum]" vspace="1" /> <a href="forumdisplay.php?$session[sessionurl]f=$foruminfo[parentid]">$vbphrase[view_parent_forum]</a></div> </div> </td> <!-- / forum tools --> Code:
<div><img class="inlineimg" src="$stylevar[imgdir_button]/subscribe.gif" alt="$vbphrase[view_parent_forum]" vspace="1" /> <a href="forumdisplay.php?$session[sessionurl]f=$foruminfo[parentid]">$vbphrase[view_parent_forum]</a></div> </div> <div><img class="inlineimg" src="$stylevar[imgdir_button]/subscribe.gif" alt="$vbphrase[composeexternal_categorystrip]" vspace="1" /> <a href="composeexternal.php?$session[sessionurl]do=composecode&f=$foruminfo[forumid]">$vbphrase[composeexternal_categorystrip]</a></div> </td> <!-- / forum tools --> Search for: Code:
<if condition="$show['adminoptions']"> Code:
<tr><td class="vbmenu_option"><a href="composeexternal.php?$session[sessionurl]do=composecode&f=$foruminfo[forumid]">$vbphrase[composeexternal_categorystrip]</a></td></tr> Step 5: Search for the following code on template navbar: Code:
<if condition="$show['wollink']"><tr><td class="vbmenu_option"><a href="online.php?$session[sessionurl]">$vbphrase[whos_online]</a></td></tr></if> Add below: Code:
<tr><td class="vbmenu_option"><a href="composeexternal.php?$session[sessionurl]">$vbphrase[composeexternal_categorystrip]</a></td></tr> Credits go to Ypsfanpage.de - a user of our forum. He coded the initial php-file. I ported it to the VB-system and created the php-file and the template. See the screen-shots below, how it works, or visit our testsite. Version-History v. 1.0.0 - Initial release v. 1.0.1 - Added character-limitation v. 1.0.2 - Got rid of a small bug, occuring in MSIE, happened when there where too less threads, genereal optimization of the code v. 1.0.3 - Added three pre-made templates v. 1.0.4 - Added support for forumdisplay-template and navbar-template Please click on install, when you choose to use this hack Show Your Support
|
Comments |
#32
|
|||
|
|||
Quote:
|
#33
|
||||
|
||||
Quote:
Code:
<?php if ( is_numeric($fid) ) { $fid = $fid; } else { $fid = 224; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <meta NAME="revisit-after" CONTENT="0 days"> <meta http-equiv="expires" content="0"> <meta HTTP-EQUIV="Pragma" CONTENT="no-cache"> <TITLE>Anime News - Animeboards.com</TITLE> </HEAD> <BODY> <p> This is a example of some javascript code you can add to your own anime web site to display anime news reported by Animeboards.com. Display, font, color etc are all customisable to fit into your web site's design and color scheme. </p> <script type="text/javascript" src="http://animeboards.com/external.php?type=js&forumids=<?php echo($fid); ?>"></script> <b>Last 15 Threads :</b><br><table width="60%"> <script type="text/javascript"> <!-- var max = 15; if(threads.length < max) max = threads.length; for(i = 0; i < max; i++) { if (threads[i].title.length > 50) { threads[i].title = threads[i].title.substring(0, 50) + '...'; } document.writeln("<tr><td><a href=\"http://animeboards.com/showthread.php?t=" + threads[i].threadid + "\">" + threads[i].title + "<\/a> <\/td><td><small> : (by " + threads[i].poster + ")<\/small><\/td><td> : <small>" + threads[i].threaddate + "<\/small><\/td><\/tr>"); } //--> </script> </table> </BODY> </HTML> |
#34
|
||||
|
||||
one thing though when i uploaded your stock composer on my site the generated code made external.php's link as
www.animeboards.net/external.php since animeboards.com is a domain alias for animeboards.net |
#35
|
||||
|
||||
Hi Bernd,
great hack. I have installed this on my testboard and when i generate the code for one specific forum, the preview alawys shows me the latest 5 threads from the whole forum. The generated external.php link is ok (external.php?forumids=44&type=js) i think. Is there a way to solve this? |
#36
|
||||
|
||||
Quote:
PHP Code:
PHP Code:
PHP Code:
|
#37
|
||||
|
||||
Quote:
|
#38
|
||||
|
||||
Quote:
Code:
<script type="text/javascript" src=http://animeboards.com/external.php?forumids=<?php echo $fid; ?>&type=js></script> |
#39
|
||||
|
||||
Quote:
Let's hope they'll fix this bug in RC3/Gold version. |
#40
|
||||
|
||||
Hey Bernd,
i finally got it working after i upgraded my live board, but after the code insert, the XHTML compatibility was broken. Is the code XHTML-valid? |
#41
|
||||
|
||||
Hm for xhtml-compatibility the code has to be with low-characters. A far as I can see, everything is in that way, but I will take look asap.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|