Version: 1.00, by wbear
Developer Last Online: Oct 2013
Version: 3.5.2
Rating:
Released: 01-12-2006
Last Update: Never
Installs: 29
Is in Beta Stage
No support by the author.
This extension allows you to pull calendar events to display on a non-VB page. You'll need to change the first few lines to reflect your current site information, and look within the code for the site URL to change to your own. In this script, it occurs three times (DOMAIN.COM/FORUM_ADDRESS).
Needs to be on a page that is parsed for PHP content, either by way of naming the page '.php', or by using .htaccess to add it to the list of files that are parsed by PHP. [AddType application/x-httpd-php .html]
I've seen lots of requests for this, but couldn't locate anyone that had released one, so here goes (mods, if there is one like this, feel free to remove mine..I couldn't find it). The code was gathered from a number of sources long ago and slapped together by me. I don't know the full origin of each bit, so if you wrote any of this and want credit, go for it. In it's current (unpolished) state, it's been heavily adapted by me anyway, and there's room for improvement, certainly. It's inelegant code (an understatement), but works AFAIK.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
MamboCube: This actually worked on my CMS site, but it dosent display correctly. Its not in order and it will display old and out of date events. Is there a way to add a date and then order it from latest to oldest and have it remove the old events? I played around with it a bit but couldnt get it to work right with my limited knowledge. Thanks
I was looking for a way to display the calendar events from a specific calendar on certain sub-forums. I looked and looked and tried dozens of "working code" examples, but could NOT get anything to work properly.
I found the previous example code to be very close, but I kept having problems with the date, so I made a couple of modifications to get it to work the way I wanted.
The following example will display the Calendar ID 3 events if the Forum ID is 3. This is done with two modifcations. A modification to the forumdisplay.php code and a modification to the ForumDisplay Template. I also set the number of event days to 45 because I have it set to '0' in the vb options.
forumdisplay.php
PHP Code:
if ($vbulletin->GPC['forumid'] == 3 )
{
if ($vbulletin->GPC['forumid'] == 3 ) {$calendarid = 3 ;}
$result = mysql_query("SELECT * FROM event where (dateline_from+172800) >= UNIX_TIMESTAMP()
AND dateline_from+86400 < $futuredate AND calendarid = $calendarid order by dateline_from ASC LIMIT 10" ) or die(mysql_error());