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)

Zweeper 01-06-2010 09:29 PM

Quote:

Originally Posted by S1OPP (Post 1943940)
Installed and working great.

Q: Is there a simple way to get it to include upcoming birthdays?


good question

nealohara 01-07-2010 07:12 AM

Quote:

Originally Posted by nealohara (Post 1948989)
Nice. Is there a way of refining this a little?

Let's say we've got a room booked on Thursday the 7th January between 20:00 and 21:00 and we add it to the default calendar. Currently what we get is

Event
7th Jan 2010 to 7th Jan 2010


ideally I'd like it to display as follows:

Event
7th Jan 2010 between 20:00 and 21:00


The dates and times are all stored as variables but I don't want to screw it up :)

Any ideas?

lol, just realised it was already asked :)

Bitti 01-07-2010 07:25 AM

Quote:

Originally Posted by nealohara (Post 1948989)
Nice. Is there a way of refining this a little?

Let's say we've got a room booked on Thursday the 7th January between 20:00 and 21:00 and we add it to the default calendar. Currently what we get is

Event
7th Jan 2010 to 7th Jan 2010


ideally I'd like it to display as follows:

Event
7th Jan 2010 between 20:00 and 21:00


The dates and times are all stored as variables but I don't want to screw it up :)

Any ideas?

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("<b>Am:</b> %s"vbdate(VB::$vbulletin->options['dateformat'],$event['dateline_from']));
     } else {
         
$format sprintf("<b>Vom:</b> %s<br /><b>Bis:</b> %s"vbdate(VB::$vbulletin->options['dateformat'] . ' ' VB::$vbulletin->options['timeformat'],$event['dateline_from']), vbdate(VB::$vbulletin->options['dateformat'] . ' ' VB::$vbulletin->options['timeformat'],$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(); 


voglermc 01-07-2010 04:25 PM

I can't seem to have it get recurring events listed also. I would also like it to show only the date of the event

sisterhood 01-07-2010 06:06 PM

THX extra nice Mod

Bitti 01-07-2010 06:30 PM

Quote:

Originally Posted by voglermc (Post 1949715)
I can't seem to have it get recurring events listed also. I would also like it to show only the date of the event

Delete

PHP Code:

 ' ' VB::$vbulletin->options['timeformat'


voglermc 01-07-2010 09:28 PM

Quote:

Originally Posted by Bitti (Post 1949833)
Delete

PHP Code:

 ' ' VB::$vbulletin->options['timeformat'



from where?

winstone 01-07-2010 11:32 PM

Looking at the way other widgets are getting cached, I think you can implement the same on this one, I've tried to do it myself but didn't have much time to get it all working

from what I have figured, all you need to do is get the widget id, generate the hash key, store the output using the widget id as an index/key, define time to live (ttl), write the whole thing into the cache using "vB_cache" thing, and the rest will be handled by the CMS, I know that because I stored the wrong info into the cache, set 5 as ttl and the widget showed up the first time I loaded the page, the next time it only showed the wrong data I cached

M@tt 01-08-2010 02:09 PM

I might be getting a little over the top on this one but I would like to have many calendars setup with just the one calendar widget though perhaps where users can choose which calendar is their preferred (times of sporting matches of different codes for example) maybe in their usercp? Just putting it out there :)

Shanj 01-09-2010 09:32 AM

Is it possible to select events or Hide them from the widget?
Loads of my events are tiny routine things every day or every week.
But for some special dates this would be great.

claudib 01-12-2010 01:28 AM

I have the problem described that if a one day event is added to calendar for 15th Jan, it shows up in this widget as 14th Jan. I think others had this problem, but I don't see a solution. Please is there a fix for this or an edit I can do to the code? Thanks, Claudia

Easific 01-12-2010 07:18 AM

Its a good widget to have. Should have been there as default. I do wish that the updated version comes out soon as I would love to run it with 4.0.1

sgthoskins 01-12-2010 12:36 PM

Quote:

Originally Posted by claudib (Post 1953196)
I have the problem described that if a one day event is added to calendar for 15th Jan, it shows up in this widget as 14th Jan. I think others had this problem, but I don't see a solution. Please is there a fix for this or an edit I can do to the code? Thanks, Claudia

Same issue here. I removed the widget until I can find or figure out a solution.

claudib 01-12-2010 01:06 PM

Is anyone willing to fix this widget? I am prepared to donate $20 by paypal for a working version of it. Thanks, Claudia

sgthoskins 01-12-2010 01:27 PM

Quote:

Originally Posted by claudib (Post 1953509)
Is anyone willing to fix this widget? I am prepared to donate $20 by paypal for a working version of it. Thanks, Claudia

+2 I will pp $20 as well.

claudib 01-12-2010 09:21 PM

Widget is working fine now. We did not need to make any mods to the widget itself.
Our problem was that the date the upcoming events appeared to be offset by one day.

From doing a few tests this was due to the server itself being on the wrong timezone for us. We rang the host and simply asked them to update the time and timezone on the server to our actual timezone, which was 6 hours off.

The date/times for the events are stored as unix timestamps and these get converted using the php date function. As such they will be converted against the actual server time, rather than any setting you might have in vBulletin.

Works a charm, thanks NG.

waynem 01-13-2010 01:45 PM

It won't work if the time isn't correct, I can't use this unfortunately as it off a day. Needs to take the time from my settings, not the shared host server.

claudib 01-13-2010 01:58 PM

In the widget code you code force the time offset by adding or subtracting 3600 for every hour you need to offset to each of the unix timestamps. This should produce the same result, and easy enough to add in. Simply change the following:

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']));
}

to:

$tz_offset = 3600;
if($event['dateline_to'] == 0 )
{
$format = sprintf("On %s",date('jS M Y',($event['dateline_from']+$tz_offset)));
} else {
$format = sprintf("From %s to %s",date('jS M Y',($event['dateline_from']+$tz_offset)),date('jS M Y',($event['dateline_to']+$tz_offset)));
}

nader 01-15-2010 09:58 AM

i think there is a bug on this script
the current date disappear on the same day it will show the next days

how can fix to show the event of current day?

ShawnV 01-15-2010 04:21 PM

It would be nice to have a Upcoming Events widget that uses UserGroup permissions and posts calendar information the same way as in the "Whats Going On?"section of the forum.

waynem 01-17-2010 05:46 PM

I set the offset to 86400 and it seems to work, thanks!

Front Range 01-22-2010 10:09 PM

Is there a way to make this as a forum block too?

reefland 01-22-2010 10:52 PM

I have a question. Does anyone know how I could make this show the upcoming 5 as well as the previous 5 events?

Chrissy_Ratbag 01-25-2010 11:50 AM

Does this link with the Forum Calendar?

SonicGT 01-26-2010 02:14 PM

Installed this and it appears to be showing all events 1 day ahead of schedule on the calendar, any ideas or thoughts?

Sotonforum.co.u 01-26-2010 06:48 PM

Quote:

Originally Posted by Big-Pete (Post 1940699)
Just tried this in VB4 gold and there's not a widget type like this


Was the php direct execution widget type removed from the gold release??

It isnt showing up for me either. It's VERY annoying. I hope they fix this soon.

Eq4bits 01-28-2010 09:22 PM

it's in the dropdown
if you still can't find it try reuploading all the vbCMS files & contents of them (this happened to me and that solved the problem)

Front Range 01-28-2010 09:43 PM

Quote:

Originally Posted by waynem (Post 1958412)
I set the offset to 86400 and it seems to work, thanks!

That worked for me too.

Installed.

Eq4bits 01-31-2010 04:47 AM

Quote:

Originally Posted by Front Range (Post 1969328)
That worked for me too.

Installed.

What timezone offset you for that to work?

Easific 01-31-2010 10:40 AM

Quote:

Originally Posted by Eq4bits (Post 1971009)
What timezone offset you for that to work?

Dont know where this is pulling the time from. I am in GMT +5.5, but the calendar worked even for a 5 hour offset value of 18000 seconds. Confusing.

86400 is the offset for 24 hours, so this is not the best way to do it.

ahmedipa 01-31-2010 04:10 PM

so good hank you very much

Chrissy_Ratbag 02-01-2010 10:25 AM

I have done this and get the following Parse Error:

Quote:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/rat10541/public_html/forum2010/includes/class_core.php(4033) : eval()'d code on line 14
Can anyone help me please?

buddyheiko 02-01-2010 03:43 PM

It only worked one time.

I need it with german date / time.

MattZ DSLR 02-02-2010 01:09 PM

Quote:

Originally Posted by waynem (Post 1958412)
I set the offset to 86400 and it seems to work, thanks!

OK
Where can I set this in widget
my is off by a day

MattZ DSLR 02-02-2010 01:22 PM

Quote:

Originally Posted by claudib (Post 1954442)
In the widget code you code force the time offset by adding or subtracting 3600 for every hour you need to offset to each of the unix timestamps. This should produce the same result, and easy enough to add in. Simply change the following:

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']));
}

to:

$tz_offset = 3600;
if($event['dateline_to'] == 0 )
{
$format = sprintf("On %s",date('jS M Y',($event['dateline_from']+$tz_offset)));
} else {
$format = sprintf("From %s to %s",date('jS M Y',($event['dateline_from']+$tz_offset)),date('jS M Y',($event['dateline_to']+$tz_offset)));
}

This worked like a charm when I changed from 3600 to 86400
Thank you

coolhandscoot 02-09-2010 03:19 AM

Nice, gracias!

hirabenllc 02-09-2010 02:13 PM

Works, thanks!

khuhner 02-14-2010 07:22 PM

1 Attachment(s)
In vB 4.0.1 I entered an event to occur on March 1st, 2010. In the UPcoming Events block it shows the event occuring on Feb 28th, 2010.

The 2 images below show the correct calendar entry and the second shows the widget showing the wrong date.

way2xtreme 02-15-2010 12:33 PM

Hello,

How do you make it show up like this instead (without the "On" just simple m-d-y)...

Date, time
Event

Date, time
Event

Date, time
Event

Also, can we set it to pull different calenders?

Thanks

zapiy 02-19-2010 06:26 PM

can a mini calendar and a Create a new event button be added to this mod?

Cheers


All times are GMT. The time now is 01:01 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.01810 seconds
  • Memory Usage 1,846KB
  • 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_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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