View Full Version : Calendar / Thread Integration Hack
Session
05-14-2003, 10:00 PM
Ok, this is my first VBulletin hack so please be calm on me :) As this is a beta BACKUP the files to be edited (as always)
I always wanted to link the calendar events to a thread aswell. So that if you make a public event, it also generates a thread from the same info. Now i always thought this was going to be hard, but actually it is really simple.
There are 5 steps to do in total in just 2 files. It concerns the calendar.php and the newthread.php
I tested this on vb 2.30 & works smoothly now at my site www.livesets.com
what does it do exactly:
When people push the New Thread button in a particular forum (can be specified as you like) you will be redirected to the Add Public Event screen
After filling in the required info it generates a public event just like it would do normally
next to that it will generate a thread in the forum where you pushed the New Thread button with topic title [date] title ( f.e. "[2003-05-14] Awakenings, Amsterdam NL" ) adn the same content as the Public Event
after that it updates all counters (forum,thread,user)
redirects to the new thread
NOTICE: on several places you will have to manually insert the forumid you want to use for this, in the example attached here the forumid used was 2
Please give some feedback :D I'm really happy i got this to work ;) Some members already requested something like this, this is to make them happy :classic:
Greets,
Session.
gengar003
05-15-2003, 01:08 AM
Sounds nice... I might install it, I'll ask my memz. Great idea, really.
Erwin
05-15-2003, 01:40 AM
Good idea. :)
Dark_Wizard
05-15-2003, 10:32 AM
Yesterday at 08:00 PM Session said this in Post #1 (https://vborg.vbsupport.ru/showthread.php?postid=395234#post395234)
NOTICE: on several places you will have to manually insert the forumid you want to use for this, in the example attached here the forumid used was 2
Let us know if you need help in placing this in the admincp so the forum is selectable from there rather than manually entering it into the files.
Session
05-15-2003, 11:36 AM
Today at 12:32 PM Dark_Wizard said this in Post #4 (https://vborg.vbsupport.ru/showthread.php?postid=395394#post395394)
Let us know if you need help in placing this in the admincp so the forum is selectable from there rather than manually entering it into the files.
Yeah, would be great :) Would make it a lot easier..
Another thing i still want to add is a "Reply" button on the View Event screen, in such a way that it links to New Reply in the related thread. I hope i can find some time to add this.
ps. does anyone know how to change the default sort order for just 1 forum?
Dean C
05-15-2003, 02:34 PM
Thankyou for releasing this :)
- miSt
kaotic
05-19-2003, 08:05 PM
Any idea when it will be taken out of beta?
Session
05-20-2003, 04:12 PM
Ehm, when it's tested a bit more... I'm still having some trouble converting the date format from [2003-5-4] to [2003-05-04].. I thought it was easier :S
People who can assist?
Cyricx
05-20-2003, 08:22 PM
This is an awesome hack, truly loving it :)
I don't know much about date, still fighting with trying to create an additional calendar field for location hehehe.
Only thing I can think of to improve it a bit more is maybe a link in the newly created event post to the thread?
Thanks so much for releasing this :)
Session
05-20-2003, 08:41 PM
I've already made it with a Reply button included when you view the Event.. ;)
I've got some more stuff to add to the thing, before i release it :D I'll try to give you some response on that! Thanks for trying it, install went well???
Cyricx
05-20-2003, 08:58 PM
Went great and works perfectly, not hitches at all :)
Trying to learn php now so I can add more fields to the calendar, but will sooo be watching this forum for your updates. Awesome idea integrating the reply button. :)
Cyricx
06-11-2003, 02:47 PM
Hmmm
Found a bug?
We have Public and Private events enabled on our forum. When you submit a private event it creates a thread as well =/
Anyway to only make this effect public events?
gmarik
06-11-2003, 02:55 PM
Oh, this is something. You could add:
Sort by Moth: August, September ... (Threads)
Session
06-12-2003, 02:59 PM
Yesterday at 04:47 PM Cyricx said this in Post #12 (https://vborg.vbsupport.ru/showthread.php?postid=407559#post407559)
Hmmm
Found a bug?
We have Public and Private events enabled on our forum. When you submit a private event it creates a thread as well =/
Anyway to only make this effect public events?
Yeah, i noticed this myself aswell.. Still working on that part, still have a small todo list to complete. Lack of time is stagnating it a bit hough
Talisman
06-12-2003, 05:15 PM
Awesome hack!
Cyricx
08-14-2003, 09:13 PM
Still workin on this Session? or moved on?
I love this hack, but am having problems integrating new calendar fields, plus the private events problem :(
Session
08-14-2003, 09:16 PM
Ehm, well.. to be honest i kinda moved on.. It's working reasonably well at my site at the moment (some small buggy things now and then).
And it's being used massively.. as you can see the calandar fills up very fast now (www.livesets.com)
If you have a specific problem i might be able to look into it, but my time is very sparse :(
Session
08-14-2003, 09:25 PM
By the way, i still need to adjust the form so that you also need to fill in a country and a location..
At the moment i still have to do a lot of manual editing.. so i think i will improve it again soon (when i have more time)
Cyricx
08-15-2003, 11:52 AM
Hmm, mainly what I'm needing is I think I've figured out how to create a new field in the calendar (in my case I did "meeting place"), but I can't figure out how to get through your code to get it to post in the subject area of the thread it creates, so get a DB error when posting a new event.
I'd need to create like 2 or 3 new fields in the calendar, other then that, I'd be absolutely happy with this hack :), very very few have a need or use for the private events.
bloodkat
08-21-2003, 09:01 PM
So, I am super new to this, and I am probably missing something obvious... but I installed this hack, and the only people that can use it so far are the admins (for whom it works flawlessly :)). I am confused, because I do not see any permissions settings in the hack, and I have not set any custom permissions on the calendar or the forum in question, but everyone besides the admins that attempt to add a new event, enters in their new thread info, and when they hit submit, they get a vBulletin message that says:
You do not have access to do this.
I have been poking around, but I can not seem to find the problem here. Anyone have any thoughts?? Would REALLY appreciate the help.
SRozhon
09-02-2003, 03:07 AM
excellant! Great Job!!!
FleaBag
09-08-2003, 03:36 AM
08-21-03 at 11:01 PM bloodkat said this in Post #20 (https://vborg.vbsupport.ru/showthread.php?postid=427732#post427732)
So, I am super new to this, and I am probably missing something obvious... but I installed this hack, and the only people that can use it so far are the admins (for whom it works flawlessly :)). I am confused, because I do not see any permissions settings in the hack, and I have not set any custom permissions on the calendar or the forum in question, but everyone besides the admins that attempt to add a new event, enters in their new thread info, and when they hit submit, they get a vBulletin message that says:
You do not have access to do this.
I have been poking around, but I can not seem to find the problem here. Anyone have any thoughts?? Would REALLY appreciate the help.
Isn't this because as default, only admins can add public events? I'm assuming you need to use one of the hacks to enable any members to use this hack.
Session, you stated earlier you had worked out how to get a Reply button, is it possible you could share this with us?
Thank you!
Session
09-09-2003, 07:13 AM
I will post an update soon, i'm close to having it 100% perfect with country / city / eventname selection.. see www.livesets.com
only thing i need to do is make it editable in the same way ( i need to extract the different fields again when i want to edit )
Give it a week or 2
Cyricx
09-14-2003, 02:26 PM
Bloodkat, get ahold of me on MSN IM and we will poke around :)
I'm betting its in your calendar access or in the forums permission settings :)
Session, awesome man, look forward to the update, this is most definately one of the most useful hacks on my site. And being I use 80 some hacks lol, that's saying alot :)
DaveLogic
10-02-2003, 01:30 PM
I haven't installed this hack yet but I have managed to create several extra fields, i.e Event, Venue, Date, Price etc and they all work perfectly....Is it at all possible to have the calendar entries linking to threads, i.e when you click on a calendar link it takes you to the thread not the calendar entry?? This way it will allow for images to be posted within calendar events..
Cyricx
10-03-2003, 02:26 AM
Okay, I've figured out how to add a new field and everything, and got it integrated enough with this hack that it doesn't break anything hehehe. However I need to find or figure out a way to get it to add to the thread.
It's a "meeting place" field
So at the beginning of your hack code I have this -
$DB_site->query("INSERT INTO calendar_events (userid, event, eventdate, public, subject, allowsmilies, location)
VALUES ('$bbuserinfo[userid]', '$message', '$date', $public, '$subject', $allowsmilies, '$location')");
$eventid = $DB_site->insert_id();
$DB_site->query("INSERT INTO thread Now what I'm wondering is how I can get the $location to add into the $subject field of the new thread maybe like a
Meeting Place: $location
< br >
$message
or something like that. Is there a $message="meetingplace $location, < br > $message
kinda code I can do? or any other ideas? =/
I want to add several fields but I just need an example of how to do it once and I can easily duplicate the code :)
Any ideas?
EDIT - Nm, after a lot of digging finally figured it out, and learned a bit more about php too :)
here is what I did for those wondering the same..
took this part of sessions code
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,iconid,visible)
VALUES (NULL,'$threadid','$subject','$bbuserinfo[username]','$bbuserinfo[userid]','".time()."','0','$message','1','0','0','0','1')");
$postid=$DB_site->insert_id();
and altered the $message to Meeting Place: $location < br > < br > $message
like so
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,iconid,visible)
VALUES (NULL,'$threadid','$subject','$bbuserinfo[username]','$bbuserinfo[userid]','".time()."','0','Meeting Place : $location < br >< br > $message','1','0','0','0','1')");
Removing the spaces before and after the "br" of course :)
Hope this helps anyone wondering the same. :)
Anyway I can add an attachment to the event?
fmoise99
11-12-2003, 04:52 PM
Great hack! May use this in the future!
fmoise99
11-12-2003, 04:54 PM
Anyway I can add an attachment to the event?
That would be nice. Even multiple attachments! ;)
DaveLogic
11-12-2003, 07:44 PM
That would be nice. Even multiple attachments! ;)
If this hack could have even one attachment it will immediately become THE mother of all hacks IMO...
DaveLogic
11-13-2003, 11:13 AM
Has anybody tested this with 2.3.2 - When I edit the Newthread.php everything is fine (redirects to caldendar.php etc) but as a soon as I make edits in Calendar.php using the default ForumIDs of 2 the whole thing white screens...
DaveLogic
11-13-2003, 12:39 PM
All OK...Sorted it now....just a typo
DaveLogic
11-18-2003, 01:31 PM
I will post an update soon, i'm close to having it 100% perfect with country / city / eventname selection.. see www.livesets.com
only thing i need to do is make it editable in the same way ( i need to extract the different fields again when i want to edit )
Give it a week or 2
Tried to incorporate with the Add attachment on Edit Post hack by Tommy Boy but everytime I resave the thread it looses the timestamp in the thread subject........Any news on the Reply button BTW...
FleaBag
12-02-2003, 12:55 AM
Working a treat on my 2.3.0. Cheers. :)
gbarton
01-07-2004, 02:06 PM
Great hack.
Couple things.
1) How can I get a link in the Calendar Event back to the thread that originated the event?
2) Where in the php code do I change the date format that appears in the title of the thread created? Currently, my format does not match what you have listed. I have 2004-1-7 and yours shows 2004-01-07 with the extra formatted zeros.
Thanks!
FleaBag
04-26-2004, 05:16 PM
Anyone have any idea how to port this to vB3?
gbarton
04-28-2004, 01:07 PM
This is an awesome hack, truly loving it :)
I don't know much about date, still fighting with trying to create an additional calendar field for location hehehe.
Only thing I can think of to improve it a bit more is maybe a link in the newly created event post to the thread?
Thanks so much for releasing this :)
I agree, this new post link would really enhance this hack.
Anyone?
Again, Great Work!
scratche
03-09-2005, 03:53 PM
hi there im lookin for this same mod... i want my users 2 b able to .. post in a selected forum then it post the in my case event on the calendar>>>>>?>?>? will this work for me
scratche
03-23-2005, 03:55 AM
ne one........
TotlKaos
05-02-2005, 09:51 PM
Sorry to Ask but has anyone ported this hack to 3.0?
Thanks!
Russ
Cyricx
05-17-2005, 01:45 PM
V3 version - https://vborg.vbsupport.ru/showthread.php?t=67074
lionslair
07-10-2005, 03:21 AM
See our site
www.commodorecarclubwa.com
We have two events calendars. One for offical club events and one for non-club events.
they each have an associated forum.
club events - http://www.commodorecarclubwa.com/forumdisplay.php?f=30 I would like to add to this calendar http://www.commodorecarclubwa.com/calendar.php?c=2
non-club events - http://www.commodorecarclubwa.com/forumdisplay.php?f=31 I want to add this to this calendar http://www.commodorecarclubwa.com/calendar.php?s=&month=7&year=2005&do=&c=4
Can this be done with this hack?
Any comments would be great thanks.
COBRAws
07-10-2005, 03:30 AM
V3 version - https://vborg.vbsupport.ru/showthread.php?t=67074
That hack doesnt do what this hack does:
When people push the New Thread button in a particular forum (can be specified as you like) you will be redirected to the Add Public Event screen
That link u specified does the oposite.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.