![]() |
New Thread on Calendar Event
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:
|
Tips and Tricks
What's with the ugly US date format in the title? If you want to change the date format in the title, just change the variable dateformat. The european format is: d.m.Y (with leading zeros on day and month) or j.n.Y (without leading zeros on day and month). All the recognized characters in the date format can be found under http://www.php.net/date It's all english! Where can I translate it? ORHow can I change the post text? The whole posttext is saved in the postmessage variable. It can be translated, changed to your liking. New lines are achieved simply by having a new line in the code, no <br /> or \n\r. Also, smileys,bbcode,img tag as well as HTML can be used if you have these options enabled for the forum specified in forumid I want all these event threads to have a special icon Easy. Just edit the variable iconid to the iconid of the icon you wish to use. Can I use the Event poster as the user that posts the thread? Sure. Just change the 2 lines PHP Code:
PHP Code:
Questions and Problems The postcount of my bot/the user that is used to post threads hasn't changed! It isn't supposed to. As the whole system is automated, I don't think they count as posts. Also, no one is interested in the postcount of a bot :) |
Just what I've been looking for - but is there a way to make the thread creator the user who adds the event to the calendar?
|
yeah i was to suggest this.. i don't know why you use a BOT... just put the author's ID would do better... i don't see why using a bot anyway, it's not an automated feature, the creation of the thread is asked by a user...
|
Quote:
And I wonder why this hack re-invents the wheel instead of just using build_new_post()? PHP Code:
|
getting error
Database error in vBulletin 3.0.0: Invalid SQL: INSERT INTO thread (title, lastpost, forumid, open, replycount, postusername, postuserid, lastposter, dateline, iconid, visible) VALUES ('[] test event', 1089597260, 41, 1, 0, EventBot, 1364, EventBot, 1089597260, 0, 1) mysql error: Unknown column 'EventBot' in 'field list' mysql error number: 1054 |
Quote:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
awesome hack! thank you
|
OK, looks like my small hack just got fully rewritten :) Thanks for the help KirbyDe!
I just did this the first way I saw how from looking at the code. I haven't tested it, but KirbyDe's Code would probably work just as well if anyone wants to use that. |
maybe a little setting in the admincp, calendar section, where we can disable the feature, and select what forum to use, and maybe more options, like groups that can post...
i'm suggesting, maybe i will do that later anyway. |
All times are GMT. The time now is 08:45 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:
|