View Single Post
  #1017  
Old 02-04-2004, 08:02 PM
Giveit2u43 Giveit2u43 is offline
 
Join Date: Jun 2003
Location: Liverpool
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As John doesn`t have vbindex, I decided to see if I could get the news on the vbindex frontpage.. firstly I, found:

Code:
	// latest threads
	'vbindex_latestthreads',
	'vbindex_latestthreadbit',
and replaced it with:

Code:
	// latest threads
	'vbindex_latestthreads',
	'vbindex_latestthreadbit',
	// arcade latest
	'vbindex_arcadenews',
	'vbindex_arcadenews_bit',
then, find:

Code:
// ####################### PROCESS vBindex WOL ##########################
and above it placed:

Code:
	$newsresult = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "gamenews ORDER BY datestamp DESC LIMIT 4");
	while ($news = $DB_site->fetch_array($newsresult)) {
		$news['time'] = vbdate($vboptions['dateformat'],$news['datestamp'],true);
		exec_switch_bg();
		eval('$vbinewsbits .= "' . fetch_template('vbindex_arcadenews_bit') . '";');
	}
	$DB_site->free_result($newsresult);
	eval('$vbiarcadenews = "' . fetch_template('vbindex_arcadenews') . '";');
next add a custom block, and replace the default code with (edit the next three templates to suit your own sites, this is just the way I have it laid out you might want something else, feel free to play around, that`s the beauty of vBulletin)

Code:
<table cellpadding="0" cellspacing="0" border="0" class="tborder" width="100%">
	<tr>
		<td>
			<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
				<tr>
					<td class="tcat" style="text-align: center" colspan="2">
						<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('vbindex_customblock$box')"><img id="collapseimg_vbindex_customblock$box" src="$stylevar[imgdir_button]/collapse_tcat$collapseimg_vbindex_customblock.gif" alt="" border="0" /></a>
		<span class="smallfont"><b>Latest Arcade News</b></span></td>
			</tr>
<tbody id="collapseobj_vbindex_customblock$box" style="$collapseobj_vbindex_customblock">
<tr><td class="thead" style="text-align: center"><span class="smallfont"><a href="forums/arcade.php?">Enter the Arcade</a></span></td></tr>
				<tr>
					<td class="alt1">
						<div class="smallfont">$vbiarcadenews</div>
					</td>
				</tr>
				</tbody>
			</table>
		</td>
	</tr>
</table>
<br />
create a new template called vbindex_arcadenews and populate it with:

Code:
<table cellpadding="2" cellspacing="$stylevar[cellspacing]" border="0" width="100%"> 

$vbinewsbits

</table>
next create a template called vbindex_arcadenews_bit and populate it with:

Code:
<tr> 
<td class="$bgclass" align="left" valign="middle" width="80%">
<li><span class="smallfont"><b>$news[time]</b>: $news[newstext]</span></li>
</td>
</tr>
and voila.. your latest arcade news on your frontpage.. Screenshot is attached to show you how this looks, but like I said eariler play around with the templates to get it to look the way you want..
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01213 seconds
  • Memory Usage 1,782KB
  • 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
  • (7)bbcode_code
  • (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