vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   vBulletin CMS Widgets - Upcoming Events (https://vborg.vbsupport.ru/showthread.php?t=231365)

betts02 08-23-2010 07:16 AM

Been waiting for this to be made to work in a forum block, hope it can be sorted

ragtek 08-23-2010 07:37 AM

1 Attachment(s)
Quote:

Originally Posted by FatalCure (Post 2087596)
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

in a forum block as php.

As i said, it's working fine for me.

betts02 08-23-2010 07:59 AM

vb4.0.5 and not even showing up, tried the code you posted but for some reason nothing at all shows up

EDIT :

Confirms it works BUT....

It does not show the event on the day, it only shows the events leading up to the date, and not on the date of the event

The dates are moxed up, I posted a test event for tomorrow, yet this shows it for today

ragtek 08-23-2010 08:09 AM

Yea, just wanted to write the same^^

TransAmDan 08-23-2010 01:32 PM

How about Repeated events. It doesn't appear to show them.

The regular Calendar is here:- http://forum2.solent-renegades.co.uk/calendar.php we have a club night every other Tuesday.

However it doesn't show up on your widget:- http://forum2.solent-renegades.co.uk/content.php

Great mod by the way. It was just what I needed. I haven't started learning PHP yet, I've come from an ASP / VB background. PHP looks simple enough but at this point I wont be looking into modifying your code.

FatalCure 08-23-2010 02:39 PM

Anyone know what could be causing my error?

sulasno 08-24-2010 04:32 PM

can this widget include holidays?

bassmonkeys 08-28-2010 08:26 PM

the mod works all good, except - what several users wrote - the events of the actual day are not displayed.

i have browsed the whole discussion and did not find a solution - if anyone can help that would be great!

FatalCure 08-30-2010 04:56 AM

Quote:

Originally Posted by bassmonkeys (Post 2090823)
the mod works all good, except - what several users wrote - the events of the actual day are not displayed.

i have browsed the whole discussion and did not find a solution - if anyone can help that would be great!

Yep this would be great.

FatalCure 09-10-2010 03:58 AM

bump


All times are GMT. The time now is 01:19 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01321 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete