![]() |
Calendar events on non-VB pages
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. |
<font color="#15a018">* Aftermath clicks on install</font>
|
Warning: chdir(): No such file or directory (errno 2) in /home/xxxx/public_html/indexbackup.php on line 120
Fatal error: Cannot redeclare class vbulletinhook in /home/xxxx/public_html/forums/includes/class_hook.php on line 29 |
Did you:
Quote:
|
I see why not its conflicing with the vbexternal addon i am using
<?php chdir('./forums'); require_once('./vBExternal.php'); ?> is there a way i can use both ? |
Nice hack :-)
|
How can I use this in a forum page? I want to display this in the header. I suppose delete the chdir lines and simply have 'global.php'?
I tried that and got this printed out on the page Code:
= UNIX_TIMESTAMP() ORDER BY dateline_from LIMIT 10"); if (()) { echo ""; while ( = ()) { #=,false,true,false,true; = vbdate("M j, Y", ,false,true,false,true); echo " "; } //} } else { echo " |
<font color="#15a018">* silurius subscribes to thread.</font>
|
good hack, I don't need it yet, but i might someday soon
|
Been trying to get this to output only from my Calander 2 without any luck. I've changed the references from 1 to 2 but it just says No events, even though there are. Changing it all back from 2 to 1 and it works.
Anyone get this working with calanderid 2 ? |
anyone please! this is driving me mad, lol.
|
Does anybody have a screenshot or demo page? I keep getting this error, no matter what I try.
Code:
Unable to add cookies, header already sent. |
Here's a screen shot of the site I made this for. Maybe it'll help you.
|
Quote:
You might also make sure that the calendar you're choosing is actually id 2...if you've made more than one in the past it might be a different number. |
Quote:
|
Quote:
Wbear, thanks a lot of the screenshot - that looks awesome! edit: Got home and still no luck. I get a lot of this Code:
$events = $db->query ("SELECT UNIX_TIMESTAMP() AS dateline, dateline_from, eventid, title FROM event WHERE calendarid = 1 AND dateline_from >= UNIX_TIMESTAMP() ORDER BY dateline_from LIMIT 10"); if ($db->num_rows($events)) { echo ""; while ($event = $db->fetch_array($events)) { #$timestring=$event[dateline_from],false,true,false,true; $dateevent= vbdate("M j, Y", $event[dateline_from],false,true,false,true); echo " "; } //} } else { echo " Code:
$10 bucks to whoever helps me get this working. Wbear, what version of vBulletin are you using? I installed event forums mod btw, not sure if that matters. Thanks! |
Quote:
The links to ID2 work just not the top code to display the events Code:
WHERE calendarid = 2 AND dateline_from >= UNIX_TIMESTAMP() |
Quote:
Include the entire script on the test page (with <? and ?>, and change the paths in the top to your site. chdir("forum/"); require('./global.php'); chdir("../"); This switches to the forum directory, grabs the config file and switches back. Make sure the closing PHP tag is present as well. I'm using 3.5.2 on this, but had it working (with a small change) on 3.07/8. |
Quote:
|
Quote:
Code:
chdir("forum/"); Code:
Invalid SQL: |
LBmtb, have you tried moving the test.php file into the forum directory. remembering to change
Code:
chdir("forum/"); Code:
chdir("../forum/"); |
Same error.
|
wbear disregard PM, were using an external Calendar now, saves the problems.
|
Quote:
Disregard my forum signup, would you? Details in the PM. |
I got it working!
This line Code:
$events = $db->query ("SELECT UNIX_TIMESTAMP() AS dateline, dateline_from, eventid, title Code:
$events = $db->query ("SELECT UNIX_TIMESTAMP() AS dateline, dateline_from, eventid, title |
Good for you, LBmtb! Enjoy it...
|
Does this work with recurring events also?
|
Has anyone tested this out in a .html file instead of PHP and if using a .htaccess file to parse PHP code in a .html file as suggested in the first post in this thread, does that cause any additional server load?
|
This is one step ahead regarding my dream. To have also a minicalendar show up in non-vb pages. I'm talking about the mini calendar that is shown in the bottom of the calendar page. Do you think it's possible to have it in a non-vb page as well?
|
I'm currently trying to get this working on the forum home (without) having the use of Frames or iframes. Anyone has achieved it?
|
Awesome work. I pushed thru some of the bugs and used it on my CMPS.... however I have some problems.... what can I do to fix it?
http://www.turbo-mopar.com/forums/cm...hp?page=events Frank |
Anyone ^^^^^^^^^^^^^^^^
|
changing the "require" to:
require_once('./global.php'); Fixed the weird errors I had. Great code, really going to help out on a function of my website. |
I get this error if I open a fresh browser
Unable to add cookies, header already sent. File: /home/eternalb/public_html/home.php Line: 20 If i go to the forum, then back to home.php, the calendar works. It will continue to work until I close the browser window. How can I resolve this? http://www.eternalbeats.net/home2.php |
It runs nice for me ... except that I don't get the event date, it only prints "M j, Y"
|
Also, this shows events that are not approved by a moderator yet; anyone know how to fix that?
|
Is there anyway to group the events by month so that you can list them like say
April event 1 event 2 June event 3 |
Quote:
|
Quote:
|
nevermind, i got it to work
|
All times are GMT. The time now is 05:52 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|