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

doopz 09-10-2010 02:18 PM

How about we all put our heads together and donate some money for someone to make a proper mod with all the needs we have?

In any case if there is a coder out here with knowledge of vbulletin coding who can make a custom event schedule, please contact me using the PM system. Paid.

khuhner 09-11-2010 02:08 AM

1 Attachment(s)
It seems as if this module either has issues with repeating events or the cache or both. In the attachment you'll see the circled event that occurred on Sept 8, yet today Sept 10th the event is still being shown.

As for this

Quote:

Originally Posted by doopz (Post 2096261)
How about we all put our heads together and donate some money for someone to make a proper mod with all the needs we have?

In any case if there is a coder out here with knowledge of vbulletin coding who can make a custom event schedule, please contact me using the PM system. Paid.

I'd ask, why we should we pay for a mod that should really be included in the core vB as part of the product?

FatalCure 09-11-2010 10:15 AM

Quote:

Originally Posted by doopz (Post 2096261)
How about we all put our heads together and donate some money for someone to make a proper mod with all the needs we have?

In any case if there is a coder out here with knowledge of vbulletin coding who can make a custom event schedule, please contact me using the PM system. Paid.

Will donate $50 here.

khuhner 09-23-2010 11:49 PM

Quote:

Originally Posted by khuhner (Post 2096518)
It seems as if this module either has issues with repeating events or the cache or both. In the attachment you'll see the circled event that occurred on Sept 8, yet today Sept 10th the event is still being shown.

As for this



I'd ask, why we should we pay for a mod that should really be included in the core vB as part of the product?

BUMP

I rely heavily on recurring events. Any luck in getting this fixed?

Kurt

FatalCure 09-24-2010 07:28 PM

Anyone know what I could do to troubleshoot my problem, on the cms page it works fantastically, however if I add it into a forum block it tells me...

Fatal error: Class 'vB' not found in /home/public_html/includes/block/html.php(95) : eval()'d code on line 9

Is there something I could change in my server config that would be causing this? I've tried disabling all plugins etc and have had no luck.

khuhner 09-26-2010 01:49 PM

Do the developers (ngcoders) for this mod ever log into vb.org anymore? It's quite frustrating that a seemingly easy widget and one that most people would use has so many limitations and MINIMAL developer support.

This is yet another reason to have widgets officially provided with VB (not as a hack or mod!) as part of the offering. That way they will work, we can track enhancements and lastly and most importantly it will be supported. Most other mature CMS portals have a ton of prepackaged widgets.

What does everyone else think?

doopz 09-26-2010 05:17 PM

We need people putting more attention to it at vbulletin.com, this way it will get more priority. So I have been told :)

khuhner 10-02-2010 08:31 PM

Quote:

Originally Posted by doopz (Post 2103393)
We need people putting more attention to it at vbulletin.com, this way it will get more priority. So I have been told :)

I hear ya! I actually logged several bugs in their tracker including one that was extensive overhaul of the calendar. Now we wait...

Kurt

NashChristian 10-05-2010 04:31 AM


vB has been taking their sweet time developing a corporate solution for this Calendar Widget. It has been logged in Jira, but there have only been TWO votes so far and it appears to have been deprioritized.

Please log into Jira and VOTE FOR THIS! It will only take you a minute: http://tracker.vbulletin.com/browse/VBIV-7656

Quote:

A number of customer have asked for a calendar widget that will access the current site calendar. That is distinct from the current cms calendar widget that displays dates on which articles have been published. Wayne also feels this should get a high priority.

khuhner 10-05-2010 04:44 PM

Quote:

Originally Posted by NashChristian (Post 2106930)
vB has been taking their sweet time developing a corporate solution for this Calendar Widget. It has been logged in Jira, but there have only been TWO votes so far and it appears to have been deprioritized.

Please log into Jira and VOTE FOR THIS! It will only take you a minute: http://tracker.vbulletin.com/browse/VBIV-7656

I hear you on the Calendar. It's really pitiful. I voted for your Jira. I also entered in a Jira a long time ago, would everyone vote for that one as well?

http://tracker.vbulletin.com/browse/VBIV-7072

NashChristian 10-05-2010 05:37 PM

Quote:

Originally Posted by khuhner (Post 2107116)
I hear you on the Calendar. It's really pitiful. I voted for your Jira. I also entered in a Jira a long time ago, would everyone vote for that one as well?

http://tracker.vbulletin.com/browse/VBIV-7072

Voted! I cross-referenced the two requests as well.

theoutlawed 10-08-2010 02:41 AM

Quote:

Originally Posted by Stadler (Post 2048234)
Nice widget, but it won't show 'All Day'-events.

To fix this find:
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);
and replace it with:
Code:

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

Thank you this fixed my issues. Been combing through this thread post by post and this is what fixed it for me.

Mark4865 10-11-2010 02:00 PM

Hello,

Stupid question but I run 3 different event calendars, so if I create 3 different upcoming event widgets with 3 diffrent titles, how do I make each widget only check the right calendar for events??

khuhner 10-11-2010 02:24 PM

Quote:

Originally Posted by Mark4865 (Post 2109059)
Hello,

Stupid question but I run 3 different event calendars, so if I create 3 different upcoming event widgets with 3 diffrent titles, how do I make each widget only check the right calendar for events??

Actually not a stupid question. There's a lot of requests about enhancing the Calendar, as it currently provides very little in the way of configuration, features, etc.

You'll need to submit an enhancement request to get any changes to the calendar (or other products). I'd suggest doing that on vb.com, not here. There are at least two outstanding extensive calendar enhancement request in the Tracker. I submitted this one:

http://tracker.vbulletin.com/browse/VBIV-7072

and here's the other:

http://tracker.vbulletin.com/browse/VBIV-7656

I'd recommend adding your requirement to either/both (via comments) and be sure to 'vote' for each. The more peoiple vote the more likely it'll get assigned to a developer!


Kurt

Mark4865 10-11-2010 03:26 PM

thanks for quick response Kurt, does this current widget in this post allow me to run 3 calendars with 3 different titled widgets and if so how do I get the correct one to know which calendar to take events off.??

khuhner 10-11-2010 10:03 PM

Quote:

Originally Posted by Mark4865 (Post 2109090)
thanks for quick response Kurt, does this current widget in this post allow me to run 3 calendars with 3 different titled widgets and if so how do I get the correct one to know which calendar to take events off.??

Well, if you read the detail of the Jira items, there isnt anything in there for support for multiple calendars. I would like that too, and I would strongly recommend you add your comments and suggestions directly to the Jira on vb.com rather than posting here.

Here are the two items:

http://tracker.vbulletin.com/browse/VBIV-7072
http://tracker.vbulletin.com/browse/VBIV-7656


Kurt

Eduardo Leon 10-11-2010 10:12 PM

this work like a widget ..

this is right ?

well i try to use this in my forum ... !

mse2k 10-22-2010 03:50 PM

This is my code. It shows all upcomming events and the events on the actually day. But it shows not only 2 how in $show_count, it shows all. Can you help me. THX

Quote:

ob_start();


// %d
$show_count = 2;

$query = sprintf("SELECT * FROM ".TABLE_PREFIX."event

WHERE visible = 1
AND (dateline_from >= '%d' || 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'] == 0 )
{
$format = sprintf("Am %s", vbdate(VB::$vbulletin->options['dateformat'],$event['dateline_from']));
} else {
$format = sprintf("Vom %s <br>bis %s", vbdate(VB::$vbulletin->options['dateformat'],$event['dateline_from']), vbdate(VB::$vbulletin->options['dateformat'],$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();

miata.shark 11-30-2010 01:06 AM

How can I manage repeated events?
i.e. I want to display "each tuesday" for a repeated meeting

I set an if about recurring and then I should pick the recuroption............ but how can I treat something like "1|4"?

khuhner 12-01-2010 12:46 PM

Quote:

Originally Posted by miata.shark (Post 2127402)
How can I manage repeated events?
i.e. I want to display "each tuesday" for a repeated meeting

I set an if about recurring and then I should pick the recuroption............ but how can I treat something like "1|4"?

Unfortunately the mod doesnt do that. There has been several items added to the bug Tracker on vb.com that are related to your problem. I strongly encourage everyone to vote for BOTH items as many sites require more sophisticated Calendar support.

http://tracker.vbulletin.com/browse/VBIV-7072
http://tracker.vbulletin.com/browse/VBIV-7656


Kurt

level8 12-30-2010 03:01 PM

please help with one more bit of info :)

by default it list the NAME/DATE... I have a custom field (a website link) to fill in when people add an event. I can get a third line to display (below code) but what to I do to make the info in this field appear in the link?

code I have used is:
Quote:

<p class="cms_widget_post_content" style="font-size:9px; margin-bottom:5px"><a href="#">homepage</a></p>
</div>
What would I need to change the # to to make the info in my customfieldid=2 appear???

any help appreciated.

Mark4865 01-30-2011 12:24 PM

Is there a way to get the event to still show on the day it is taking place and only go away the day after

JimboSlice 01-30-2011 02:10 PM

Quote:

Originally Posted by mse2k (Post 2112824)
This is my code. It shows all upcomming events and the events on the actually day. But it shows not only 2 how in $show_count, it shows all. Can you help me. THX

I have looked at cant find the cause, if someone else can help that would be great.

JimboSlice 02-11-2011 05:00 PM

Can someone fix mse2k code so it doesnt show all events?

JimboSlice 02-16-2011 11:17 AM

does anyone have one of these that works correctly with vb 4.1.x?

ngcoders 02-16-2011 04:17 PM

Quote:

Originally Posted by JimboSlice (Post 2163169)
does anyone have one of these that works correctly with vb 4.1.x?

Yep it works fine.

JimboSlice 02-16-2011 05:18 PM

the dates are always a day off, or doesnt show todays events, only future.

alexm 02-23-2011 09:43 AM

Quote:

Originally Posted by JimboSlice (Post 2163287)
doesnt show todays events, only future.

Quote:

Originally Posted by Mark4865 (Post 2156414)
Is there a way to get the event to still show on the day it is taking place and only go away the day after

I think there is an error in the SQL query. It needs greater than or equal and less than or equal operators to include the current day, and the part for ranged events the operators were the wrong way round.

Try replacing the query with this:

Code:

$query = sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1 AND (dateline_from >= '%1\$d' || (  dateline_from <= '%1\$d' AND dateline_to >= '%1\$d' ) || (dateline_to = 0 AND DATE(FROM_UNIXTIME(dateline_from)) = DATE(FROM_UNIXTIME(%1\$d)))) ORDER BY dateline_from ASC LIMIT %2\$d",TIMENOW,$show_count);
This should display all day events before and on the day they are happening, and ranged events before and WHILE they are happening.

Alex

ash50210 02-24-2011 06:57 AM

HI all,

after spend time reading all thread from pg 1 until 14 finally i was successfully made it happen. Thanks to all that contribute the idea here. so i would like to share the coding as per below:

----------------------------------------------------------------------------------------------------------------------

ob_start();

// %d
$show_count = 100;

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

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

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

if($event['dateline_to'] == 0 )
{
$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;
---------------------------------------------------------------------------------------------------------------------
This code suppose can show u all range of events.
cheers!

JimboSlice 02-24-2011 11:51 AM

the dates are all wrong when its displayed on my page. In fact, tomorrows events show as happening today and the date listed is todays date, instead of tomorrows.


All times are GMT. The time now is 06:08 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.01867 seconds
  • Memory Usage 1,865KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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