网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 网站建设 > vBulletin技术交流
User Name
Password
 
FAQ Members List Calendar Cheap Glasses Mark Forums Read

vBulletin技术交流 主要讨论vBulletin的安装使用、模板风格、插件以及小技巧等。

Reply
 
Thread Tools Display Modes
  #1   IP: 222.184.47.203
Old 2009-07-29, 07:00 AM
topvip topvip is offline
超级版主
 
Join Date: 2006-01-04
Posts: 1206
topvip 正向着好的方向发展
Default HowTo Display Latest Active Threads on ANY normal HTML page

############# Install Instructions
## THIS WILL DISPLAY THE LATEST 10 ACTIVE THREADS ON ANY NON VBULLETIN HTML PAGE

## Requires vBulletin version 3.5.0 stable.

## Admin Control Panel > vBulletin Options > vBulletin Options > Admin Control Panel Options > Use External Data Provider:
YES - type = JavaScript

## At any location in your custom .html page, add this code:

Code:
<table cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tbody>
<tr>
<td colspan="2">
<a href="search.php?do=getnew">Latest Active Threads</a>
</td>
</tr>
</tbody>
<tbody>
<tr>
 
<td width="100%">
 
<div>
<script type="text/javascript" src="external.php?type=js"></script> 
<script language="" type="text/javascript">
<!--
for (var x in threads)
{
document.writeln("<a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> (Posted By: "+threads[x].poster+")<br />");
}
//-->
</script></div>
 
</td>
</tr>
</tbody>
<!-- show latest active threads -->
</table>
<br />
## Save the html file, upload it, and you're done.

Note: Don't forget to turn on the External Feed options here:

Admin CP -> vBulletin Options -> External Data Provider
Reply With Quote
  #2   IP: 222.184.47.203
Old 2009-07-29, 07:03 AM
topvip topvip is offline
超级版主
 
Join Date: 2006-01-04
Posts: 1206
topvip 正向着好的方向发展
Default

To limit the amount of threads shown

In the code above, exchange:
Code:
for (var x in threads)
with
Code:
for (x = 0; x < 10; x++)
exchanging 10 with the amount of threads you want displayed.


To limit the output to the latest threads in one or more specific forums

In the code above, exchange this:
Code:
<script type="text/javascript" src="external.php?type=js"></script>
with this:
Code:
<script type="text/javascript" src="external.php?forumids=95,96,97,98&type=js"></script>
The bold part is added, and the blue numbers, seperated by commas, are the forumid numbers of the forums you want to fetch the latest threads from.

The forumid number of a forum can be found by editing a forum in the AdminCP. It's listed at the top, next to the forum name.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2007年最新学习资源大全3000g topvip 网络资源 2 2007-03-04 08:14 AM
Comprehensive List of SEO Tools topvip 搜索引擎市场营销研究 0 2006-03-23 01:16 AM
Building for the user and the bot. admin 建站交流 0 2006-01-17 03:54 PM

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 02:09 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.