Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Last x Threads Marquee using External Data Provider Details »»
Last x Threads Marquee using External Data Provider
Version: 1.001, by aisais aisais is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.7.x Rating:
Released: 07-12-2008 Last Update: 07-13-2008 Installs: 21
Template Edits
Re-useable Code Translations Is in Beta Stage  
No support by the author.

Hi,
This mini-mod will display last x threads in a marquee above navbar.
I mostly used this code http://www.vbulletin.com/forum/showthread.php?t=158895 by Floris from VB team.
and TIPs from Colin F ( thanx guys )

How to install:

First you have to activate External Source Provider.

Go to: Admin Control Panel > vBulletin Options > External Data Provider:
and choose JavaScript ( first choice ).

Then copy this code and add it right at the top of Navbar template.
PHP Code:
<!-- last x active threads -->
<if 
condition="$vbulletin->options['externaljs']">
<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" HEIGHT="30" align="center">
<
tbody>
<
tr>
<
td class="thead" colspan="2" align="center">
<
a style="float:$stylevar[right]href="#top" onclick="return toggle_collapse('forumhome_external')"><img id="collapseimg_forumhome_external" src="$stylevar

[imgdir_button]/collapse_thead
$vbcollapse[collapseimg_forumhome_external].gif" alt="" border="0" /></a>
<
a href="search.php?$session[sessionurl]do=getnew">Last Active Threads</a>
</
td>
</
tr>
</
tbody>
<
tbody id="collapseobj_forumhome_external" style="$vbcollapse[collapseobj_forumhome_external]">
<
tr>
<
td class="alt1" width="100%">
<
div align="center" style="padding:0pt"><marquee DIRECTION="left" width="100%" height="20" behavior=scroll scrollamount="7" onmouseover="this.stop()" onmouseout="this.start
()"
><script type="text/javascript" src="external.php?forumids=2,32,35,27,3,12,6,30,31&type=js&lastpost=1"></script></script>
<
script language="" type="text/javascript">
<!--
for (var 
x in threads)
{
document.writeln("<a href=\"showthread.php?t="+threads[x].threadid+"&goto=newpost\"><img class=\"inlineimg\" src=\"$stylevar[imgdir_button]/firstnew.gif\" alt=\"\" border=\"0\" 

/></a>&nbsp;&nbsp;<a href=\"showthread.php?t="
+threads[x].threadid+"\">"+threads[x].title+"</a>&nbsp;&nbsp;<span class=\"smallfont\">($vbphrase[posted_by]: "+threads[x].poster+")

</span>&nbsp;&nbsp;&nbsp;&nbsp;::&nbsp;&nbsp;&nbsp;&nbsp;"
);
}
//-->
</script>
</
marquee></div>
</
td>
</
tr>
</
tbody>
</
table>
</if>
<!-- 
last x active threads --> 

please be aware that I am not a coder. I just helped myself by collecting some parts of code from here and there. I can't prmise to provide any support for this mod


configuriation:
1- to change number of threads, find this line
PHP Code:
for (010x++) 
and replace 10 with the number you desire.

2- to limit the output to the latest threads in one or more specific forums, find this line
Code:
<script type="text/javascript" src="external.php?forumids=2,32,35,27,3,12,6,30,31&type=js"></script></script>
and change numbers with your forum IDs of choice.

3- you can also adjust scrolling speed and direction pretty easy.

I hope you find this helpful.

** UPDATE ***


Update Notification:
I found this " secret" option lately while reading the tech manuals for Vb.
To have the marquee show the last 10 threads based on LAST POST time ( i.e active threads), please do this:

1- Find:
Code:
<script type="text/javascript" src="external.php?forumids=2,32,35,27,3,12,6,30,31&type=js"></script>
2- add the option: &lastpost=1 to the end of the script. e.g
Code:
<script type="text/javascript" src="external.php?forumids=2,32,35,27,3,12,6,30,31&type=js&lastpost=1"></script>
I update the above code to reflect this change and included a text file for reference.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 07-13-2008, 06:21 PM
rooban12 rooban12 is offline
 
Join Date: May 2007
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any screen shots or demo link?
Reply With Quote
  #3  
Old 07-13-2008, 06:26 PM
aisais aisais is offline
 
Join Date: Jan 2005
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

of course
demo : www.twsyat.net/forum
screen shot attached ( it is in Arabic )

BTW you can use this code inside any HTML file out of VB folder. which makes a good choice for PORTALs
Reply With Quote
  #4  
Old 07-14-2008, 06:13 PM
aisais aisais is offline
 
Join Date: Jan 2005
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

** UPDATED ***
Reply With Quote
  #5  
Old 11-03-2008, 09:07 AM
Direct Vision Direct Vision is offline
 
Join Date: Oct 2007
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i made this but it's not working.

the bar is working but no last posts is scrolling, it remains empty
Reply With Quote
  #6  
Old 11-30-2008, 01:02 AM
WolfWiz WolfWiz is offline
 
Join Date: Mar 2007
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Direct Vision View Post
i made this but it's not working.

the bar is working but no last posts is scrolling, it remains empty
Same here, bummer... saw something close on another site... was hoping it was this.

where do I find this?
Quote:
configuriation:
1- to change number of threads, find this line
PHP Code:
for (x = 0; x < 10; x++)
Reply With Quote
  #7  
Old 11-30-2008, 01:46 AM
Q-v-n-s-Q Q-v-n-s-Q is offline
 
Join Date: Mar 2005
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very nice, thanks
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:48 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06581 seconds
  • Memory Usage 2,286KB
  • Queries Executed 20 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete