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

Reply
 
Thread Tools
NGG - Upcoming Events - Forum Side Block Details »»
NGG - Upcoming Events - Forum Side Block
Version: 1.00, by betts02 betts02 is offline
Developer Last Online: Dec 2022 Show Printable Version Email this Page

Category: vBulletin Forum Sideblocks - Version: 4.0.5 Rating:
Released: 09-02-2010 Last Update: Never Installs: 25
Re-useable Code Translations Is in Beta Stage  
No support by the author.

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 : NGG Clan

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 betts02@tiscali.co.uk via paypal

Show Your Support

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

Comments
  #12  
Old 10-17-2010, 02:57 AM
CharlieDelta CharlieDelta is offline
 
Join Date: Apr 2010
Posts: 616
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Working fine! I have multiple calendars on my forum and there are events that I would not want shown in upcoming events. How would I specify a calendar?
Reply With Quote
  #13  
Old 10-17-2010, 06:53 AM
betts02's Avatar
betts02 betts02 is offline
 
Join Date: Jun 2009
Posts: 910
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Maybe check the calendar permissions ?

Will have a look as i dont use this anymore myself and get back to you

Cheers
Reply With Quote
  #14  
Old 10-18-2010, 10:45 AM
preswylde preswylde is offline
 
Join Date: Feb 2009
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I put this in a sidebar block on my forums and tested it out. It's a great concept if it actually posted the event there reflecting the same day that the event is listed on the calendar. http://www.norcalbots.com/forums have a look and see. In the calendar, I placed a new event titled GAME RELEASE | Call of Duty: Black Ops and set it as an all day event for November 9, 2010 but when it showed up in the block, it shows as the 8th. I probably wouldn't even have noticed the discrepancy if it hadn't been for the COD:Bops game.
Reply With Quote
  #15  
Old 10-18-2010, 12:27 PM
Videx's Avatar
Videx Videx is offline
 
Join Date: Feb 2007
Posts: 3,085
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, the date discrepancy is bizarre. Somebody's going to figure it out someday, but until then the only way you can get Upcoming Events to work right anywhere is to copy the original code.
Reply With Quote
  #16  
Old 10-31-2010, 07:43 PM
peugeot405's Avatar
peugeot405 peugeot405 is offline
 
Join Date: Feb 2010
Posts: 312
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not working for me. tried the two codes and none is working.
Getting the same error on both

Code:
Fatal error: Class 'vB' not found in /home/peugeot405/domains/fsrclan.com/public_html/fsr-test/includes/block/html.php(95) : eval()'d code on line 9
i have vb 4.0.8.

anyone know how to fix this
Reply With Quote
  #17  
Old 11-01-2010, 06:50 PM
peugeot405's Avatar
peugeot405 peugeot405 is offline
 
Join Date: Feb 2010
Posts: 312
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

working perfectly in vb 4.0.7
Reply With Quote
  #18  
Old 11-05-2010, 04:43 PM
digibyte digibyte is offline
 
Join Date: Mar 2007
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is an error in the query.
This line:
PHP Code:
$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); 
should become
PHP Code:
$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); 
The new query will display multi-day events till the last day of the event.
Reply With Quote
  #19  
Old 11-06-2010, 09:46 AM
Zweeper Zweeper is offline
 
Join Date: Jan 2005
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is this showing the birhtdays as well?
Reply With Quote
  #20  
Old 06-19-2011, 12:59 PM
oldfan's Avatar
oldfan oldfan is offline
 
Join Date: Jul 2004
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nothing showing up at all
Reply With Quote
  #21  
Old 11-05-2011, 04:16 PM
PrincessFiona PrincessFiona is offline
 
Join Date: Mar 2009
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for that fix. I was wondering why I couldn't get mine to work and now it's doing it's job!
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 07:41 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.05642 seconds
  • Memory Usage 2,336KB
  • Queries Executed 26 (?)
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
  • (1)bbcode_code
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete