![]() |
Yea.. i think i copied/pasted code, and forgot to change a word when doing a gettemplate()
I'll put a new version online tonight when I get home. It'll have 2 little fixes. |
Quote:
|
new release .. verison 4 -- check the first post for the attached zip
easy upgrade for v2&3 users, just upload the new todaysevents.php |
version 4
|
Thanks for Hack the code ! Very useful !
:cool: |
how would one make the events be pulled from this week or even this month?
|
mess with the where clause of the sql query, and possibly $today.
:) |
Quote:
mmm PHP Code:
|
check out calendar.php
you'll need to do something like this PHP Code:
this hack is for the event of the day, and im pretty busy, or else i'd help further... sorry |
Quote:
Dave |
just a gentle bump
|
I tried to install this with no success. :(
When i try to access my forum I get an error on line 79 of my index.php file. What did i do wrong? |
paste line 79 of your code into a reply, and we'll see whats happening....
|
Here's line 69....
PHP Code:
PHP Code:
|
can you also paste the error
(and did you mean line 69 or 79?) |
It was line 79......and darn it if i didnt save the error message. And i dont want to interrupt my users now.
Lets see if i can remember it. I think it was something like, "there is a parse error on line 79 of index.php" |
ok well
you pasted line 69... i'd need to see line 79 if the error was on line 79 all you have to do to index.php is after this: PHP Code:
PHP Code:
my guess is either you mistyped that, or there was a problem copy/pasting it. also, make sure that todaysevents.php is in the same directory as index.php (the main vbulletin dir) |
Im still pretty sure i posted line 79. *confused*
Thanks. I'll try that tonight when the board isnt busy. :) |
Quote:
|
D'oh.....sorry, twas a typo
|
Is it just me, or is there only one event allowed per date?
I don't know if it might be related to the Today's Event addition, but I suspect it isn't. I try to add a second event to the calendar, it takes the place of the first, the previous one does not appear on either the calendar, or the Today's Events listing. I upgraded to vb2.03 the other day, if that matters. Although I don't recall scheduling more than one thing before anyway. -deb |
i just tested it out on my board
2.0.3 w/this todays-events hack. worked fine. two events. both on calendar both on main page maybe re-upload calendar.php, make sure you have 2.0.3's version (not to say it isnt there already...but just in case) |
just installed v4. first time using this hack. works great.
two comments: 1) it would be nice to have a condition where if there are no events for that day it says 'none', or something to that effect. 2) i too would like to have this functionality in my header. i didn't see any 'how to' things in this thread for that. on the same note. what php file controls functionality in the header? |
what a great hack, a doddle to install and so effective
good work!!! |
Jakeman:
I did move it to the header, and regretted it. Although it works FINE in displaying the event for that day, it 'breaks' your calendar, and you can only have one event per day, the last one that was entered. I suspect a variable is being tromped on, but I haven't looked into it. So, when I did the 2.03 update, I didn't put it back in the header, and I'm ... gonna get around to it someday, but I don't think I have the luxury of breaking two events on any day just now. -deb |
anyone else had any luck moving this functionality into the header?
|
Has anyone gotten this to display the next WEEKS events? or next MONTHS events?
Its a GREAT hack, but to me, telling someone that there is an event today is a bit late :) JC |
i agree.
what would be pimp is to have a stand alone hack for a calendar like vbportal's calendar. http://www.phpportals.com/ |
|
I modified this to show the next months events but when I click on an event, it does not show the date in the calendar template.
I know, this should be over at vb.com but they said come here! :mad: Anyone know how to hack the date into the calendar template to show what day you are looking at? Thanks much, JC |
any changes in this Hack on vB 2.2.x ?
I can?t find: PHP Code:
:confused: Sascha |
[stupid q]
where is the link to the todaysevents.php file? [/stupid q] :o god bless |
https://vborg.vbsupport.ru/attachmen...&postid=141943
Thats the link to the attachment. It was in one of my replies on page 3, i believe. The link in the first post has been updated. It still referenced vbulletin.com, not vbulletin.org :) |
:o
much appreciated! :) |
I am trying to make some slight html modifications to the code.
Unfortunately I do not know php so, I usually play around with the code until what I get what I need done. With this hack, I can't seem to figure out how to add some code after the events have been displayed. Basically, - I want to have a "</td></tr></table>" to close up my "Today's Events" I am used to code like write.line "</tD></tr></table>" What is the PHP equivalent? I was thinking of adding this just above the last } in todaysevents.php Thanks For your help! :) |
First of all, great hack!, thanks Mister..
I modified the hack to display events for the next two weeks by modifying the SQL query to this: Code:
SELECT eventid, subject, eventdate, public Im running into 2 problems. (1) The function designed to remove the trailing commas does not seem to work. The code is this: Code:
$todaysevents = substr($todaysevents,0,strlen($todaysevents)-2); (2) The other problem is based on a further modification of this hack. I wanted to separate Todays Events from Upcoming Events so I made separate variables to represent todays events and events from today+1 until today+14days. The problem is that it doesnt work. All the code makes sense to me except I can't figure out where $caltitlelength comes from. Im reusing that variable in both If/then statements. That may be the problem, but I dont understand the variables source or purpose so I cant modify it to suit my needs. Any help there would be greatly appreciated. I'd be happy to post the modified code if that will help. Thanks |
I just realized another problem with modifying this hack to display events in the near future. Birthdays aren't stored in the calendar_events table. So to display ALL events in the near future (for whatever time period) you will have to query calendar_events AND users and concantenate events from both queries. I'm afraid this is beyong my PHP abilities, I still can't figure out how to concantenate two simple string values much less two recordsets.
I could probably throw a poor hack together reusing Mister's code if I can figure out what $caltitlelength is. |
Kyrnel,
If you finally get this working, let me know. I've been wanting to display events ahead of time on my own forums. |
Quote:
What I can;t get it to to is show 2 separate lines of events, one for todays events and another for upcoming events, and this hack does not show birthdays at all, because they are not stored in the calendar_events table but rather just in the user's profile. I am working on figuring this out. I think I can make it work if I can figure out what $caltitlelength is. I'm planning on adding some more features to it too, like an option in the user's options to display upcoming events or not and maybe how long into the future they want them to be displayed (just today, 1 week, 2 weeks, 1 month). I'll post as soon as I have something. |
Awesome! Thanks! :)
|
All times are GMT. The time now is 11:34 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:
|