Version: 1.00, by Colin F
Developer Last Online: Apr 2014
Version: 3.0.3
Rating:
Released: 07-10-2004
Last Update: Never
Installs: 19
Re-useable Code Translations Is in Beta Stage
No support by the author.
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.
PHP Code:
$forumid = 1; // forumid in which to post
$botuserid = 1; //userid of poster
$botusername = "EventBot"; // username of poster
$dateformat = "m-d-y";
$threadtitle = "[".vbdate($dateformat, $dateline_from,false,true,false,true)."] ".$title;
$postmessage = "This is an automatically generated thread for the event [b]".$title."[/b].
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].";
$iconid = 0;
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
PHP Code:
if ($calendarinfo['neweventemail'])
Above that add the code you just edited.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Was wondering if there is a hack, or a way that this can be switched around.. In PhpbbFM you post a thread, and in the thread you can edit the date you would like this to go to and it will automatically be added into the calendar.. Pretty much just the opposite of what it is now.. But it was much easier.
yeah, that would be great too...
what i'm currently having a problem is that I've set up my forum in which the threads from the calendar are being posted as a moderated one - meaning, all new threads should be approved by mods, but since this script bypasses that check and directly inserts a new thread into the forum it's making my jump thru the hoops and checking all the threads/removing them manually every time someone posts something that should not have been approved in the first place.
So, is there any way the new threads can be created in that "moderation" queue or whatever the way the moderated threads are stored, and allow me to approve/delete them before they get posted. I can do that with the calendar events, but not the threads too.
And yeah, did anyone figure out how to link the thread # inside the event post as well? or even better, update the event post every time the matching thread is updated (the original post), or vice versa? that'd be great...
Was wondering if there is a hack, or a way that this can be switched around.. In PhpbbFM you post a thread, and in the thread you can edit the date you would like this to go to and it will automatically be added into the calendar.. Pretty much just the opposite of what it is now.. But it was much easier.
im lookin for this same mod... is there anyway to use this one like that??? or is there somthing thats like this
ok, just a question regarding starting new threads.
if i am inserting a new thread/post (from that calendar.php hack code that needs to be added) and if I want it to be moderated before going public, does that INSERT statement need to be changed to insert the new thread somewhere else, or is it being inserted into the same tables but with a different flag or something. How does the vbulletin know which threads need to be moderated and which don't? Where is that setting or where are those threads stored?
I'm just asking because I can't figure out how to moderate the new threads made with this script first, since it publishes the new thread right away, directly into the tables/database.
and change the "visible" value for the first two INSERT statements to zero (from "...$iconid, 1" to "...$iconid, 0" to make the threads invisible until approved)
I broke something but don't know what......I have about 40 events for the Month of April yet it says No events for the next 30 days... any ideas on how to fix this issue?
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.