The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Please help: Adding events programatically
I am trying to add events programaticaly from my custom CMS.
I have added the following 2 events event id 178 was added via my CMS and does NOT show up in the vbulletin calendar. event id 179 was added via vbulletin and does show up in the vbulletin calendar. details.... 178 1 <strong>The Chemical Brothers</strong><p><br/> <im... The Chemical Brothers 1 0 1 a:0:{} 1 1195034917 0 1204887600 0 0 179 1 test Chemical bros 1 0 1 a:0:{} 1 1195036164 0 1204848000 0 0 Why does event id 179 no appear in the calendar? Is their a cache i need to refresh? Thanks, Josh |
#2
|
||||
|
||||
Copy the 'add event' code in calendar.php starting on line 1613, and it should work.
|
#3
|
|||
|
|||
Awesome. Will do tonight
|
#4
|
|||
|
|||
OK I now have been able to add events and they are appearing at the bottom of the forums:
http://www.joshandfriends.com.au/forums/ BUT the events aren't appearing in the Calendar: http://www.joshandfriends.com.au/forums/calendar.php I only have 1 calendar by the way and the events are definately being linked to that calendar. Any ideas? |
#5
|
|||
|
|||
Does anyone know what might be the problem??
Thanks --------------- Added [DATE]1195540217[/DATE] at [TIME]1195540217[/TIME] --------------- A good example is here: http://www.joshandfriends.com.au/for...1-23&e=160&c=1 I click on that link and can see the event. When I click on the date 23rd of November in the breadcrump it shows no events. Even though it is there. |
#6
|
||||
|
||||
Post the code that you're using to add events.
|
#7
|
|||
|
|||
The following is java code but it should be fairly simple to read.
long currentDateLine = Calendar.getInstance().getTimeInMillis() / 1000; long eventDateLine = (event.getDateTime().getTime()) / 1000; forumEvent.setTitle(event.getTitle()); forumEvent.setDescription(description); forumEvent.setCreatedBy(event.getCreatedBy()); forumEvent.setDateline(currentDateLine); forumEvent.setFromDate(eventDateLine); forumEvent.setCustomFields(CUSTOM_FIELDS); forumEvent.setCalendarId(systemConfiguration.getVB ulletinCalendarId()); event.setForumEvent(forumEvent); The event object is then saved via a hibernate an the above row is inserted in the vbulletin_event table. Please let me know if I am missing anything. Thanks, Josh |
#8
|
|||
|
|||
Any further thoughts on this? What else am i missing?
|
#9
|
||||
|
||||
As long as you're doing everything in the 'add event' code in calendar.php, it should work fine.
|
#10
|
|||
|
|||
The problem is i don't know php so i don't know what i'm missing
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|