Back to vBulletin 4.x Add-ons

NGG - Upcoming Events - Forum Side Block
Mod Version: 1.00, by betts02

vB Version: 4.0.5 Rating: (4 votes - 4.75 average) Installs: 25
Released: 03 Sep 2010 Last Update: Never Downloads: 0
Not Supported Re-usable Code Translations Is in Beta Stage  

not Supported


Upcoming Events in Forum Block

I recently had a friend make this for me so i DO NOT support this and/or take any credit

I simply show you how to add the "Upcoming Events" in the forum side block

1/ Goto your Admincp

2/ Forums and moderators - Forum Blocks Manager

3/ Add block

4/ Name : Your choice

5/ Active : Yes

6/ Select : PHP

7/ In Content copy and paste :

PHP Code:
ob_start(); 


//  %d 
$show_count 5

$query sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1 AND (dateline_from > '%d' || (  dateline_from > '%d' AND dateline_to < '%d' )) ORDER BY dateline_from ASC LIMIT %d",TIMENOW,TIMENOW,TIMENOW,$show_count); 

$event_get vB::$db->query_read($query); 

$output_bits ''
while(
$event vB::$db->fetch_array($event_get)) { 

     if(
$event['dateline_to'] == 
     { 
         
$format sprintf("On %s",date('jS M Y',$event['dateline_from'])); 
     } else { 
         
$format sprintf("From %s to %s",date('jS M Y',$event['dateline_from']),date('jS M Y',$event['dateline_to'])); 
     } 
      
     
$output_bits .= sprintf(
        <div class = "cms_widget_post_bit"><h4 class="cms_widget_post_header"><a href="calendar.php?do=getinfo&e=%d">%s</a></h4> 
            <p class="cms_widget_post_content">%s</p> 
        </div> 
        '
,$event['eventid'],$event['title'],$format); 


$output $output_bits


ob_end_clean(); 
return 
$output
8/ Template top use : block_html

You can see it in action and working here : http://www.nextgenerationgamers.co.uk/forums/forum.php

This is on vb4.0.5 and as stated - I can NOT SUPPORT this as i am no coder but i had it made for me at a small price and wanted to share it with the community here

Enjoy and please mark installed and comment if you use it, Cheers

Donations are welcome to email via paypal

Download

No files for download.

Similar Mods

Move 'Upcoming Events' to the top of your Forum Home vBulletin 3.0 Template Modifications

vblts.ru supports vBulletin®, 2022-2024