Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
New Thread on Calendar Event Details »
New Thread on Calendar Event
Mod Version: 1.00, by Colin F (Member) Colin F is offline
Developer Last Online: Apr 2014 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.0.3 Rating: (0 vote - 0 average) Installs: 19
Released: 11 Jul 2004 Last Update: Never Downloads: 1
Not Supported Re-usable Code Translations Is in Beta Stage  

New Thread on Calendar Event

What it does:
This rather small hack is easy: it starts a new thread in a specific forum for every Event that is posted in the calendar. On our forum it is used for discussion of partys (as it's a party calendar).

Is it complicated?
There is actually very little to change, but in that small part, there are a lot of variables to be edited which are forum specific. That might make it a bit hard for php newlings

Changes:
New files (0):
none

Changed files(1):
calendar.php

New database fields/tables(0):
none

New templates(0):
none

Changed templates(0):
none

New phrases(0):
none


Screenshots:
No visible changes

Instructions:
  • Backup all your forum files as well as your database
  • Copy the following code into your favorite PHP editing program (Dreamweaver, Wordpad, Notepad...) and edit it to fit your forums.

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

    The variables to be edited (marked green) are:
    • forumid is the forumid of the forum in which the Bot will be posting the threads to the calendar events
    • botuserid is the userid of the user that will be shown as the author of the thread. I suggest making a special user and naming him something like EventBot
    • botusername is the username of the user that will be shown as the author of the thread. Should be the username to the userid indicated in botuserid. Make sure the username is enclosed in quotation marks ("").
  • Open your calendar.php and look for
    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

  • Above that add the code you just edited.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #61  
Old 27 May 2005, 14:33
Torqued Torqued is offline
 
Join Date: Oct 2004
Originally Posted by HeloHi
I am getting this error too. Anyone else run into this problem and figured out what is wrong with it?
which version of the code did you install?

There are about 3 different versions in this thread.
Reply With Quote
  #62  
Old 28 May 2005, 03:36
HeloHi's Avatar
HeloHi HeloHi is offline
 
Join Date: Feb 2005
Originally Posted by Torqued
which version of the code did you install?

There are about 3 different versions in this thread.

I used Collin's original code, but modified to user usernames etc ect rather than bots. I also used the rolling 24 hour method rather than the midnight-midnight method. I will try KirbyDE's method and report back on how that works. I should have done that in the first place, I just got ahead of myself I guess when the error popped up hehe.

Edit: Tried Kirby's code and it doesn't create a thread. Is it just code to replace Collin's completely, or is it supposed to be added in somewhere? I am sorry for my noobness, but I really don't know alot about this stuff. I don't think I am the only one who had this problem though...

Originally Posted by YLP1
Newbie here...... Where would KirbeDEs code go and is his code in addition to Colin's?
I am going to integrate your checkbox hack as well, Torqued, whenever I can straighten this out. Maybe someone who has this working could just put the hacked code from their calander.php here?

Last edited by HeloHi; 28 May 2005 at 04:18.
Reply With Quote
  #63  
Old 31 May 2005, 11:35
mfarmerhi mfarmerhi is offline
 
Join Date: Apr 2003
Beautiful, Colin. And big thanks to Torqued for compiling everything and printing exact instructions for adding the check box option (EXACTLY what I was looking for).

Installed.

*** Edited additional question***

Been testing it. Question: What does this hack do with re-occurring events? Still only initiate one thread (the very first time you post the event), then never again, despite the fact the event reoccurs?

Because the only one extra thing I'd REALLY want:

the ability to make this only post the new thread on the actual date of the event.

That is, say you have an event on July 4th. I'd like the hack to allow me to enter a calendar event for the 4th, and then *only when it get's to the 4th* post that event.

Re-occurring events would initiate a new thread every time the event reoccurred.

Any easy way to make it do that?

Last edited by mfarmerhi; 31 May 2005 at 12:00.
Reply With Quote
  #64  
Old 31 May 2005, 16:17
SamirDarji SamirDarji is offline
 
Join Date: Apr 2004
Originally Posted by mfarmerhi
Been testing it. Question: What does this hack do with re-occurring events? Still only initiate one thread (the very first time you post the event), then never again, despite the fact the event reoccurs?

Because the only one extra thing I'd REALLY want:

the ability to make this only post the new thread on the actual date of the event.

That is, say you have an event on July 4th. I'd like the hack to allow me to enter a calendar event for the 4th, and then *only when it get's to the 4th* post that event.

Re-occurring events would initiate a new thread every time the event reoccurred.

Any easy way to make it do that?
It's interesting that you bring up recurring events. A similar suggestion was posted for the Event Attendance hack. The problem is in how vb treats recurring events.

Recurring events seem to be the same as a regular event in the db, but with some sort of flag that allows it to show up multiple times. But with it actually being a single entry, everything associated with that event is stored only once including any hacks applied to the event listing. I don't really see any way to do it without having something to track the various dates of a recurring event or for recurring events to be re-designed so that they actually populate the calendar with multiple event listings that can be changed individually or as a whole.
__________________
Pics of the Huntsville Car Scene: www.huntsvillecarscene.com, hsv.streetracing.org
Pics of the Huntsville Night Life: www.thetoe.cc
Reply With Quote
  #65  
Old 31 May 2005, 19:29
Torqued Torqued is offline
 
Join Date: Oct 2004
Originally Posted by SamirDarji
It's interesting that you bring up recurring events. A similar suggestion was posted for the Event Attendance hack. The problem is in how vb treats recurring events.

Recurring events seem to be the same as a regular event in the db, but with some sort of flag that allows it to show up multiple times. But with it actually being a single entry, everything associated with that event is stored only once including any hacks applied to the event listing. I don't really see any way to do it without having something to track the various dates of a recurring event or for recurring events to be re-designed so that they actually populate the calendar with multiple event listings that can be changed individually or as a whole.
One way I can think of around that is to run a daily query/script that looks for events scheduled for that day and then have that process create new threads for those events.
Reply With Quote
  #66  
Old 31 May 2005, 21:18
SamirDarji SamirDarji is offline
 
Join Date: Apr 2004
Originally Posted by Torqued
One way I can think of around that is to run a daily query/script that looks for events scheduled for that day and then have that process create new threads for those events.
Actually, what would be even better is a cron that looks at the recurring events list and then makes and event entry for a particular day if one isn't present. Then any hacks related to that particular entry would work fine. The only disadvantage is that once an event listing is created this way, changing the recurring event listing won't change the spawned event listing.
__________________
Pics of the Huntsville Car Scene: www.huntsvillecarscene.com, hsv.streetracing.org
Pics of the Huntsville Night Life: www.thetoe.cc
Reply With Quote
  #67  
Old 31 May 2005, 22:35
mfarmerhi mfarmerhi is offline
 
Join Date: Apr 2003
Originally Posted by SamirDarji
Actually, what would be even better is a cron that looks at the recurring events list and then makes and event entry for a particular day if one isn't present. Then any hacks related to that particular entry would work fine. The only disadvantage is that once an event listing is created this way, changing the recurring event listing won't change the spawned event listing.
I am NOT educated in PHP, but isn't it possible to somehow just attach the date to event listings? I mean, that coding is already in there... can't the variable {event} be distinguished from the variable {event[today's_date]} ?
Reply With Quote
  #68  
Old 01 Jun 2005, 00:54
SamirDarji SamirDarji is offline
 
Join Date: Apr 2004
Originally Posted by mfarmerhi
I am NOT educated in PHP, but isn't it possible to somehow just attach the date to event listings? I mean, that coding is already in there... can't the variable {event} be distinguished from the variable {event[today's_date]} ?
Probably, but then what do you do for recurring events?
__________________
Pics of the Huntsville Car Scene: www.huntsvillecarscene.com, hsv.streetracing.org
Pics of the Huntsville Night Life: www.thetoe.cc
Reply With Quote
  #69  
Old 02 Jun 2005, 03:51
mfarmerhi mfarmerhi is offline
 
Join Date: Apr 2003
Originally Posted by SamirDarji
Probably, but then what do you do for recurring events?
Well, store that new variable, so that it's reoccurring event[5.30.05]; next months is event[6.30.05]... you can suddenly treat them (at least each of those variables) as separate events, although, for the sake of the rest of vB, they're treated as a single event.

The cron job actually sounds promising for both of the features I'd need -- actually starting the thread on the day it's scheduled (instead of simply when you enter the data on the calendar. I mean, if you're already typing in the info, why not just copy and paste it yourself into a new thread? As it stands, this hack isn't really saving you much but 2 or 3 extra mouse clicks...).

By treating each of the reoccurring events as a separate event (even if only as a separate data item) and using the cron jobs, it's open up a whole LOT of new possibilities for this hack...
Reply With Quote
  #70  
Old 02 Jun 2005, 06:19
SamirDarji SamirDarji is offline
 
Join Date: Apr 2004
Not a bad idea. I'm sure it would also help those of us that use the Event Attendance hack that are needing something for the recurring events.
__________________
Pics of the Huntsville Car Scene: www.huntsvillecarscene.com, hsv.streetracing.org
Pics of the Huntsville Night Life: www.thetoe.cc
Reply With Quote
  #71  
Old 21 Jun 2005, 15:40
Luciolle Luciolle is offline
 
Join Date: Nov 2003
Ok sorry I bump this old message but I try to install on vbulletin 3.0.7, I know it's for vb 3.0.3 but it'S supposed to work, but I have always the same error as some people before on this subjet:

Error:

Database error in vBulletin 3.0.7:

Invalid SQL:
UPDATE forum
SET replycount = replycount + 1,
threadcount = threadcount + 1,
lastpost = 1119364576,
lastposter = FrancoisEVENBOT,
lastthread = '[d-m-y] TEST 2435425252523 !!!',
lastthreadid = 119,
lasticonid = 0
WHERE forumid = 63

mysql error: Unknown column 'FrancoisEVENBOT' in 'field list'

mysql error number: 1054

Some body have a solution for that ?
Thanks

(P.S.: I read all messages and I don't find solution or I'm not looking so great ^^)
Reply With Quote
  #72  
Old 21 Jun 2005, 16:47
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Originally Posted by Luciolle
Ok sorry I bump this old message but I try to install on vbulletin 3.0.7, I know it's for vb 3.0.3 but it'S supposed to work, but I have always the same error as some people before on this subjet:

Error:

Database error in vBulletin 3.0.7:

Invalid SQL:
UPDATE forum
SET replycount = replycount + 1,
threadcount = threadcount + 1,
lastpost = 1119364576,
lastposter = FrancoisEVENBOT,
lastthread = '[d-m-y] TEST 2435425252523 !!!',
lastthreadid = 119,
lasticonid = 0
WHERE forumid = 63

mysql error: Unknown column 'FrancoisEVENBOT' in 'field list'

mysql error number: 1054

Some body have a solution for that ?
Thanks

(P.S.: I read all messages and I don't find solution or I'm not looking so great ^^)
See this post: http://www.vbulletin.org/forum/showp...27&postcount=7
__________________
Reply With Quote
  #73  
Old 18 Jul 2005, 20:04
YLP1 YLP1 is offline
 
Join Date: Aug 2004
Originally Posted by Torqued
Ok. Here is what I did to enable a check box. This will add a check box to the Miscellaneous Options when you are creating or editing a calendar event.

When creating a new event:
1: Checking the check box will copy the event as a new thread in $forumid (defined in the code).
2: Leaving the check box unchecked will only create the event on the calendar.

When editing an existing event:
1: Checking the check box will copy the event as a new thread in $forumid (defined in the code).
2: Leaving the check box unchecked will only update the calendar entry.

Now... if you already created a thread and go edit the event later and check the check box, it does not update the previous thread - it creates a new thread.

Also, if you want to convert an existing event to a new thread, you do not really have to "edit" anything. Just click on edit event, check the check box, and save. This will create the new thread in your forum.


In calendar.php, find the following code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And add this code above that. Be sure you edit the $forumid to be the forum you want posts to show up in.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Still in calendar.php, find this code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And add this code above it. Be sure you edit the $forumid to be the forum you want posts to show up in.



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Adding the check box:

Log into your AdminCP and go to the Style Manager.

Open the calendar_edit template and find this code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And add this below that code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
I am so confused... I have three instances of this code: require_once('./includes/functions_databuild.php');

which one do I put the last piece of code above?
Reply With Quote
  #74  
Old 27 Jul 2005, 16:41
jugo jugo is offline
 
Join Date: Feb 2004
can someone port this to vb3.5.
__________________
NovaWarfare.com - Bringing back the Game - http://www.NovaWarfare.com

Website Hosting - Game Server Hosting - http://www.freaks-network.com
Teamspeak Status Block for vBAdvanced / PHP-Nuke / php Include

PM me if you need hacks installed or simple template modifications...I'm cheap..
Reply With Quote
  #75  
Old 24 Sep 2005, 06:11
djsydeburnz djsydeburnz is offline
 
Join Date: May 2005
quick question. lets say that i would prefer to have my title list as 'Event, Date, Location' and I have my 'location' listed as a custom field in my database. I know that in the database, the custom id #4 is for location. I can figure out everything but the location in posting it to the title of the forum.

$post[title] = .$title"|".vbdate($dateformat, $dateline_from,false,true,false,true)."|" ?unknown code;

shoud give me:

Event Title | Event Date | Event Location
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 23:15.

Layout Options | Width: Wide Color: