View Single Post
  #18  
Old 10-28-2004, 07:12 AM
Michael Morris's Avatar
Michael Morris Michael Morris is offline
 
Join Date: Nov 2003
Location: Knoxville TN
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think you can set up a forum so that only new threads are moderated and not new posts without performing any hacks.

Anyway, ENWorld runs an archive of news items by using vbulletin's syndicator - it shows the 20 most recent news items for each topic. To add one to go with this system create a new page, turn all modules off on that page and point it's custom content at a new template (I used adv_portal_headlines)

The content for us is...

HTML Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class="tborder">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr><td class="tcat" align="center">Headline Summary Page</td></tr>
</table></td></tr></table>
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td width="33%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class="tborder">
			<table width="100%" border="0" cellspacing="2" cellpadding="1">
				<tr><td align="center" class="thead">Site News</td></tr>
          <script type="text/javascript" src="http://www.enworld.org/forums/external.php?forumids=162&type=js"></script>
          <script type="text/javascript">
<!--
var max = 10;
if(threads.length < max) max = threads.length;
for(i = 0; i < max; i++)
{ 
if (threads[i].title.length > 45)
{ threads[i].title = threads[i].title.substring(0, 45) + '...'; }
document.writeln("<tr><td class=\"alt2\"><a href=\"http://www.enworld.org/forums/showthread.php?t=" + threads[i].threadid + "\">" + threads[i].title + "</a></td></tr>");
}
//-->
</script>
			</table>
			<table width="100%" border="0" cellspacing="2" cellpadding="1">
				<tr><td align="center" class="thead">Software</td></tr>
          <script type="text/javascript" src="http://www.enworld.org/forums/external.php?forumids=179&type=js"></script>
          <script type="text/javascript">
<!--
var max = 10;
if(threads.length < max) max = threads.length;
for(i = 0; i < max; i++)
{ 
if (threads[i].title.length > 45)
{ threads[i].title = threads[i].title.substring(0, 45) + '...'; }
document.writeln("<tr><td class=\"alt2\"><a href=\"http://www.enworld.org/forums/showthread.php?t=" + threads[i].threadid + "\">" + threads[i].title + "</a></td></tr>");
}
//-->
</script>
			</table>
			<table width="100%" border="0" cellspacing="2" cellpadding="1">
				<tr><td align="center" class="thead">Community</td></tr>			
          <script type="text/javascript" src="http://www.enworld.org/forums/external.php?forumids=178&type=js"></script>
          <script type="text/javascript">
<!--
var max = 10;
if(threads.length < max) max = threads.length;
for(i = 0; i < max; i++)
{ 
if (threads[i].title.length > 45)
{ threads[i].title = threads[i].title.substring(0, 45) + '...'; }
document.writeln("<tr><td class=\"alt2\"><a href=\"http://www.enworld.org/forums/showthread.php?t=" + threads[i].threadid + "\">" + threads[i].title + "</a></td></tr>");
}
//-->
</script>
			</table>	
		</td></tr></table></td>
		<td width="34%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class="tborder">
			<table width="100%" border="0" cellspacing="2" cellpadding="1">
				<tr><td align="center" class="thead">Official WotC</td></tr>
          <script type="text/javascript" src="http://www.enworld.org/forums/external.php?forumids=164&type=js"></script>
          <script type="text/javascript">
<!--
var max = 10;
if(threads.length < max) max = threads.length;
for(i = 0; i < max; i++)
{ 
if (threads[i].title.length > 45)
{ threads[i].title = threads[i].title.substring(0, 45) + '...'; }
document.writeln("<tr><td class=\"alt2\"><a href=\"http://www.enworld.org/forums/showthread.php?t=" + threads[i].threadid + "\">" + threads[i].title + "</a></td></tr>");
}
//-->
</script>
			</table>
			<table width="100%" border="0" cellspacing="2" cellpadding="1">
				<tr><td align="center" class="thead">Books &amp; Novels</td></tr>			
			          <script type="text/javascript" src="http://www.enworld.org/forums/external.php?forumids=180&type=js"></script>
          <script type="text/javascript">
<!--
var max = 10;
if(threads.length < max) max = threads.length;
for(i = 0; i < max; i++)
{ 
if (threads[i].title.length > 45)
{ threads[i].title = threads[i].title.substring(0, 45) + '...'; }
document.writeln("<tr><td class=\"alt2\"><a href=\"http://www.enworld.org/forums/showthread.php?t=" + threads[i].threadid + "\">" + threads[i].title + "</a></td></tr>");
}
//-->
</script>
			</table>
			<table width="100%" border="0" cellspacing="2" cellpadding="1">
				<tr><td align="center" class="thead">Other</td></tr>			
<script type="text/javascript" src="http://www.enworld.org/forums/external.php?forumids=181&type=js"></script>
<script type="text/javascript">
<!--
var max = 10;
if(threads.length < max) max = threads.length;
for(i = 0; i < max; i++)
{ 
if (threads[i].title.length > 45)
{ threads[i].title = threads[i].title.substring(0, 45) + '...'; }
document.writeln("<tr><td class=\"alt2\"><a href=\"http://www.enworld.org/forums/showthread.php?t=" + threads[i].threadid + "\">" + threads[i].title + "</a></td></tr>");
}
//-->
</script>			
			</table>
		</td></tr></table></td>
		<td width="33%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class="tborder">
			<table width="100%" border="0" cellspacing="2" cellpadding="1">
				<tr><td align="center" class="thead">D20/OGL</td></tr>
          <script type="text/javascript" src="http://www.enworld.org/forums/external.php?forumids=163&type=js"></script>
          <script type="text/javascript">
<!--
var max = 10;
if(threads.length < max) max = threads.length;
for(i = 0; i < max; i++)
{ 
if (threads[i].title.length > 45)
{ threads[i].title = threads[i].title.substring(0, 45) + '...'; }
document.writeln("<tr><td class=\"alt2\"><a href=\"http://www.enworld.org/forums/showthread.php?t=" + threads[i].threadid + "\">" + threads[i].title + "</a></td></tr>");
}
//-->
</script>
			</table>
			<table width="100%" border="0" cellspacing="2" cellpadding="1">
				<tr><td align="center" class="thead">PDF/e-publishing</td></tr>
          <script type="text/javascript" src="http://www.enworld.org/forums/external.php?forumids=111&type=js"></script>
          <script type="text/javascript">
<!--
var max = 10;
if(threads.length < max) max = threads.length;
for(i = 0; i < max; i++)
{ 
if (threads[i].title.length > 45)
{ threads[i].title = threads[i].title.substring(0, 45) + '...'; }
document.writeln("<tr><td class=\"alt2\"><a href=\"http://www.enworld.org/forums/showthread.php?t=" + threads[i].threadid + "\">" + threads[i].title + "</a></td></tr>");
}
//-->
</script>
			</table>
			<table width="100%" border="0" cellspacing="2" cellpadding="1">
				<tr><td align="center" class="thead">Sci-Fi/Fantasy</td></tr>
<script type="text/javascript" src="http://www.enworld.org/forums/external.php?forumids=110&type=js"></script>
<script type="text/javascript">
<!--
var max = 10;
if(threads.length < max) max = threads.length;
for(i = 0; i < max; i++)
{ 
if (threads[i].title.length > 45)
{ threads[i].title = threads[i].title.substring(0, 45) + '...'; }
document.writeln("<tr><td class=\"alt2\"><a href=\"http://www.enworld.org/forums/showthread.php?t=" + threads[i].threadid + "\">" + threads[i].title + "</a></td></tr>");
}
//-->
</script>
			</table>			
		</td></tr></table></td>
	</tr>
</table>
<br />
  <div align="center"><a href="http://www.enworld.org/forums/news.php?page=syndicate">Click here 
    to syndicate these headlines</a>.</div>
<br />
Note that there's really not that much fancy going on here if you know HTML. The javascript uses the syndicator to fetch the headlines, and I carefully inserted the classes I wanted into each table row and header to get their colors to display right.

For this to work on your page you have to go to vboptions >> syndication and turn it on, choosing XML syndication. At that point a link will appear in each forum "Syndicate this page" Follow this instructions that appear.

If you need any help just yell.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02202 seconds
  • Memory Usage 1,860KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete