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.
  #16  
Old 14 Jul 2004, 19:58
DaveLogic DaveLogic is offline
 
Join Date: Jun 2003
Real name: David
Originally Posted by Colin F
Theoretically yes.

Try making $post[message] = $message;
This works with the main message content but would it be possible to say include a link (alike the original ) say Click here for full info which would rthen link back to the calendat???
Reply With Quote
  #17  
Old 14 Jul 2004, 21:05
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Do you want the message content as well as a link back, or just part of the message content and a link saying something like [...more]?

The first could be done with something like

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

__________________
Reply With Quote
  #18  
Old 16 Jul 2004, 05:52
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001

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

Any idea what went wrong?
__________________
AndroidETC.com :: Android, and other stuff.
Reply With Quote
  #19  
Old 24 Jul 2004, 08:46
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
surround EventBot with 's
making it:

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

__________________
Reply With Quote
  #20  
Old 28 Jul 2004, 15:35
obsidian's Avatar
obsidian obsidian is offline
 
Join Date: Apr 2003
Real name: Barry
I tried this out using Colins original hack and it comes up with a thread title that is one day off of the event. The "posted by" on the thread view is also blank. I ended up trying Kirby's code as well and the username shows up but the date is 1 day off as well.

Edit: After digging through the calendar.php file I assume this is because I am using a single all day event. If I do the ranged event it comes up correctly. I guess when it gets the single all day event it starts the previous day plus how ever many hours. Anyways anyone have an idea on a simple fix for it
__________________
www.LonestarAirsoft.com

Last edited by obsidian; 28 Jul 2004 at 15:44.
Reply With Quote
  #21  
Old 30 Jul 2004, 19:08
PUPSTAHS PUPSTAHS is offline
 
Join Date: Jul 2004
Originally Posted by obsidian
I do the ranged event it comes up correctly. I guess when it gets the single all day event it starts the previous day plus how ever many hours. Anyways anyone have an idea on a simple fix for it
I'm having the same problem. Links to all day events always link to the day *before* the event starts, but ranged events work fine.

Anyone got a fix?

BTW great hack colin
Reply With Quote
  #22  
Old 09 Aug 2004, 20:35
PUPSTAHS PUPSTAHS is offline
 
Join Date: Jul 2004
So, is anyone working on a fix for the all-day-event bug mentioned above? It would be very much appreciated by at least several users.
Reply With Quote
  #23  
Old 10 Aug 2004, 05:08
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
I assume this is because of the timezone settings of some users. As I'm in GMT+1, I don't have any problems with this.

I'll have a look at it tonight though...
__________________
Reply With Quote
  #24  
Old 10 Aug 2004, 20:08
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
I've updated the first post with some info to (hopefully) fix the allday problem some users are having.

The changes are in the two calles to the function date(). These are now changed to vbdate() and some parameters were added.
__________________
Reply With Quote
  #25  
Old 20 Aug 2004, 09:34
SamirDarji SamirDarji is offline
 
Join Date: Apr 2004
This is exactly the type of hack I've been searching for. Well, all except one thing--I want the new thread to be displayed as part of the calendar event listing page. It doesn't sound too hard in theory, but you never know until you get into it. Thoughts anyone?
__________________
Pics of the Huntsville Car Scene: www.huntsvillecarscene.com, hsv.streetracing.org
Pics of the Huntsville Night Life: www.thetoe.cc
Reply With Quote
  #26  
Old 31 Oct 2004, 00:22
Lionel Lionel is offline
 
Join Date: Dec 2001
Real name: Lionel
I am able to fix the problems on that one. Wish I could solve my problem with the other hack by the same author.
Reply With Quote
  #27  
Old 10 Nov 2004, 16:16
Torqued Torqued is offline
 
Join Date: Oct 2004
Originally Posted by Colin F
Theoretically yes.

Try making $post[message] = $message;

Actually.. I want both. I want the $message text as well as an automated message @ the bottom of the post.. so how do I modify the code below to put a couple of blank lines between the $message and the "This is an automatically generated blah blah blah"

$postmessage = $message."This is an automatically generated thread for the event ".$title.".
More information on this event is available on [url=".$vboptions['bburl']."/calendar.php?".$session[sessionurl]."do=getinfo&e=".$eventid."&day=".vbdate("Y-n-j",TIMENOW,false,true,false,true)."&c=".$calendarid."]this page[ /url].";
Reply With Quote
  #28  
Old 10 Nov 2004, 16:24
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Originally Posted by Torqued
Actually.. I want both. I want the $message text as well as an automated message @ the bottom of the post.. so how do I modify the code below to put a couple of blank lines between the $message and the "This is an automatically generated blah blah blah"
Change this:

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

to this:

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

Not sure if that works though.... you might also be able to use /n
__________________
Reply With Quote
  #29  
Old 10 Nov 2004, 16:34
Lionel Lionel is offline
 
Join Date: Dec 2001
Real name: Lionel
I used \n to insert a blank line
Reply With Quote
  #30  
Old 19 Nov 2004, 14:46
obsidian's Avatar
obsidian obsidian is offline
 
Join Date: Apr 2003
Real name: Barry
Is there a way to move the forum jump dropdown into this and use it as a selection box for where to post the thread? Reason I ask is that I now have a couple calendars for different groups. I would like to be for the people to post their events on their private calendar and have this hack post the thread in their private forum.
__________________
www.LonestarAirsoft.com
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 11:16.

Layout Options | Width: Wide Color: