![]() |
I will pay anyone who can modify the following hack
http://vbulletin.com/forum/showthrea...threadid=21232 to do the following
Payment is open to negotiation but this is an urgent requirement. Payment will be via one of the following options depending on how you want paid
Please PM me asap to get this work. Please state: a) The cost b) the timescales Thanks Dave Campbell www.cpfc.org |
I'll bet Dave has a bigger budget than I do, but I'm pretty interested in this, as well.
Not neccesarily just the next 5 events, but the listings over the next X number of days would be good, too. -deb |
Me too!
Would love a mod which would show the next x events or events for the next x days on my homepage... |
PHP Code:
|
Quote:
People can spout off about other products 'community' and 'support' but VB is in a different class. I'll leave it there b4 I start gushing :) |
It just shows you how do it, you will have to format it how you wish. If you are not going to use the event text than you can remove it from the SELECT portion of the query.
|
Quote:
It;s exactly as I needed 100% perfect and will save me lots of time every week In action www.cpfc.org (latest fixtures) |
[QUOTE]Originally posted by Dave#
In action www.cpfc.org (latest fixtures) |
Quote:
Ed Can you explain the session hash thing please? Should the href be different than calendar.php?s=$session[sessionhash] ? |
Wow, this can go on a non-vBulletin page, too?
-deb |
[QUOTE]Originally posted by Dave#
Ed Can you explain the session hash thing please? Should the href be different than calendar.php?s=$session[sessionhash] ? |
Very cool! Thank you, thank you!
One question, I want to include the event date on my homepage, but when I use $event['eventdate'] I get the date in the format 2001-08-24. How would I either: 1.) Change it from 2001-08-24 to 08-24-2001 or 2.) What I really want to do is to not show the year on my homepage, displaying just 08-24 for the event instead of 2001-08-24. Thanks again! |
Use this query:
Code:
SELECT DATE_FORMAT(eventdate,'%m-%d') AS eventdate, eventid, subject |
Thanks again.
Now it's in the format I want (just Month-date wihtout a year to shorten it) but this messes up the sorting. I have one event entered in Feb 2002, and if I leave off the year according to your instructions it is now showing up at the top of the list (2-06 (of 2002) is now coming before 8-15) Any ideas on how to fix the sorting and still leave off the year from the displayed list? For that matter, would it be possible to use some kind of array (?) to convert 01 to Jan, 02 to Feb, 03 to Mar, etc... so the date would display as Aug 15 for example? Thanks again for the original mod which is already fantastic! |
PHP Code:
|
This is a great hack :-) OK, not to sound dumb, but where exactly do I use this? I am new to PHP so this is a great learning experience!
Do I add the code above to the todaysevents.php file? I'd like to place the events on the top of my VB as a reminder of deadlines for my students. My class homepage (http://www.collegeteacher.org) is set up with SSI. Can I call the script through SSI to include on the homepage as well? I know that converting the whole site to PHP is probably the right answer, but that will have to wait till next semester. School starts tomorrow! Thanks for your help :D |
What I did was to create a new php file called showevents.php with just the code above.
Then on my SSI pages, I include an include statement like: <!--#include virtual="/forums/showevents.php"--> And it works like a charm! |
how could i call calander events for a specific user?
|
An interesting side effect I just noticed is that a visitor to any of the pages on which you've included the list of upcoming events now shows up in the online.php section and counts as a visitor on the forum homepage...
|
please please please help me with my question ive been asking it for days
|
Oooooooh YEAH It works..displays the events
fim but on top of the 5 events listings I get this error: Warning: Failed opening './global.php' for inclusion (include_path='') in D:\websites\clubFREESTYLE.com\test.php on line 138 you can see for youself on our test page: http://www.clubfreestyle.com/test.php (left side column) ----------------------- If i change the code to reflect: forum/admin I get this error: Warning: Failed opening '/forum/global.php' for inclusion (include_path='') in D:\websites\clubFREESTYLE.com\test.php on line 137 Thanks |
UPDATE:
I removed the : include('./global.php'); call and it works fine with no error Is this ok to do? |
Hi everyone,
this hacks just works fine - if, yes if the php file which includes the calendar_hack.php3 is in the vb directory. I would like to include the hack code like this PHP Code:
When I do this from outside that dir, it always give me a Quote:
So, how do I have to include correctly (best would be in absolute paths) that it works for pages from outside the vb directory??? Many thanks in advance! Markus |
Ok thanks,
chdir('directory'); before the inclusion is the correct way... Markus |
Quote:
tried this but get this error: Fatal error: Failed opening required './admin/config.php' (include_path='.:/usr/local/lib/php') in /home/atease/public_html/forums/global.php on line 72 does anyone know what i might have done wrong? i'd appreciate it. thanks |
Well, I have a completely new (but spectacular) issue with this great little scrap of code that calls out the next 5 events.
First, it works, :) However, I'm changing things over to a PostNuke front page and content pages for a site, with VB as the workhorse forum and community. I need the little events script to run in a standard php block for PostNuke. The PostNuke is in a separate mySQL database from the vBulletin. Now, I did get it to run. BUT, it seems to *clobber* the living daylights out of a couple (but not all) other modules that are used with PostNuke. So the page loads, the events are listed, but the moment you try to go to one of the affected modules, it starts spitting out: Warning: Supplied argument is not a valid MySQL result resource and goes on to give the path of the php file, which I won't bore you with here. There's a few warnings like this. It's really quite spectacular all over the screen. ;) First, let me say I know enough about php and mySQL to be dangerous. But I follow directions very well! I have a suspicion that after the events query is made, the rest of the page gets confused about what database it is in. But why this only happens with some modules and not others is a mystery to me. I might be all wrong. Whatever is happening, it isn't pretty, and I'd really like to be able to include the events on the front page. I don't know how to fix it, whether it is what I think it is or not, though. :| Would someone please explain to me what could be going on, and how to fix it? I can point you to specific files and examples if needed, but I'll bet you vBulletin and php gurus would know what to do in your sleep with your hands tied and your computer off! It seems like some sort of obvious error condition like that to me. :( Halp Mr. Wizard! -deb |
I can get this to work fine if I call the events.php file itself. But when I try to include that file on my front page I get the following:
Warning: Failed opening './global.php' for inclusion (include_path='') in /path/to/my/board/events.php on line 3 Fatal error: Call to a member function on a non-object in /path/to/my/board/events.php on line 5 I tried putting the assolute path in line 3: include('/path/to/my/board/global.php'); but that simply produces a blank screen? |
I just found this, and it is EXACTLY what I'm looking for. When I originally installed the hack, I had less than 5 next events. I then added a lot more dates (about 15 more).
Now, I receive this error: Warning: Cannot add header information - headers already sent by (output started at /path/username/to/boards/calendarfront.php:3) in /path/username/to/boards/admin/functions.php on line 1581 I named this PHP script calendarfront.php Thanks for any help! |
I did some more trouble shooting with this and found that when I went DIRECTLY to the page that loads the script I get that error. However, if I first go to my message boards, and then go to the page, it works fine.
EX: Go to http://www.finheaven.com/, then http://www.finheaven.com/seasonal/dates.shtml in a new browser window after all other windows are closed Someone I talked to said that it sounds like a cookie issue, but that's just a guess - i.e. expecting a cookie to exist that does not However, if you go to the message boards: http://boards.finheaven.com/ and then type the URL in the Address bar it works fine. Strange.... Any ideas? |
I found out why the problem was being caused. Thank you for your time.
|
Could you let us know how you solved that problem Webmasta please ? I remember getting the same errors when I was trying something and I gave up after it
|
I am not a programmer or anything cool like that. I am a geek who just knew how to read a SQL DB and get this thing working under vB3
So here is the code: (EDIT - Corrected a major error in the code date setup due to vb3) PHP Code:
PHP Code:
works like a freaking charm :) |
Is there anyway to get this to show up easily on any VB (really a webtemplates) page via an $events tag or something?
Thanks |
Okay, does anyone have the full code for this for vb3, that they could share? I've managed to get, well, something, pulling into the non-forum page, and I have it linking to the calendar, but I'm only getting one event, and the link isn't quite correct (it links to the calendar okay, but not to the event). I'm all confused. :)
|
Right so this doesn't work even a little or is just to complex for me to understand. Probably both.
|
ah there it goes! kicked in with some tinkering. Nice little script guys! Good work.
|
Hi guys.
I too would love someone to simply post the php coding they are using for vB3. I presume most are creating a file, say eventlist.php, and calling it into their page via include statements? If someone could post the code in the php file that would be appreciated greatly! Cheers Krit |
I actually managed to get this working, eventually, but just discovered that it's showing old events that are already past. Eep! I've checked over the code, and it looks like it should be working correctly, but I'm definitely getting old events.
I checked the sql query in phpmyadmin, and I get the same results. The query is: Code:
SELECT UNIX_TIMESTAMP( ) AS dateline, dateline_from, eventid, title Code:
dateline dateline_from eventid title *confused* :) |
I still need some help with this. :) I managed to finally get it posting only upcoming events, and not events which have already past. However, now I'm getting the wrong dates displaying on the events. If an event is in the calendar for Feb 30, it displays on the non-vb page as being on Feb 29. All events are dated one day early.
Here's what I currently have. PHP Code:
:) |
Quote:
Anyone? :) |
All times are GMT. The time now is 04:44 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:
|