The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Firstly, let me say I made an honest and lengthy attempt to do this myself before bothering my fellow vB owners.
The Goal I have a vB forum catering to chess players. Obviously tournaments are played and announced regularly, although the Calendar feature gets ignored big time. What I would like to have is, when a member posts a new thread about their upcoming chess tournament, an option like the Post a Poll Option. As everyone is aware the poll option firstly posts the members post as post #1 of the new thread, and then it re-directs them to the create your poll page. I'm after pretty much the same thing, except once they have posted their first post in the new thread, I want them redirected to the Ranged Calendar entry page - http://www.ozchess.com.au/calendar.php?do=add&c=1 As the Additional Options are often ignored, I was hoping this could be a button alongside the Submit New Thread and Preview Post buttons when someone is posting a new thread. Maybe the button could be called New Thread + Calendar Entry. Is there anyone who could please tell me how I can achieve this? |
#2
|
|||
|
|||
![]()
In template newthread you can add your button like this: find the existing buttons by searching for submit_new_thread and add
Code:
<input type="submit" class="button" name="calendar" value="New Thread + Calendar Entry" accesskey="c" tabindex="1" /> Then add a plugin to get the value if that button is pushed: hook location newthread_post_start, code: PHP Code:
One more plugin to redirect to the calendar, hook location newthread_post_complete, code: PHP Code:
The only thing about this is that after filling in the calendar entry it won't take you back to your thread, but maybe that's OK (or maybe you can work that part out). |
#3
|
||||
|
||||
![]()
Thank you dude!
![]() You are a legend. Thanks again. |
#4
|
||||
|
||||
![]()
The above didn't work unfortunately
![]() |
#5
|
|||
|
|||
![]()
Well, I did test it before posting, but it's possible that your setup is different somehow, or maybe I misunderstood what you wanted. Does it not work at all, or what does it do?
|
#6
|
|||
|
|||
![]()
I made the above changes into the attached product file you can import, and I also added phrases.
|
#7
|
|||
|
|||
![]()
kh9 this looks like good work I think it's the kind of thing quite a few will want.
What I need is to make all new posts in a selected forum redirect to a certain URL once they have posted. Not as a user option, as 100% always. I need to put it on several forums but it is always the same URL destination. Is that possible? |
#8
|
|||
|
|||
![]()
Yes, you could just copy the code that's under the hook location into a plugin so you can change it. In other words, make a new plugin using hook location newthread_post_complete with this code:
PHP Code:
Code:
$vbulletin->url = "http://www.foo.com"; |
#9
|
|||
|
|||
![]()
kr9 I get the outline but I'll need to ask you more questions. Hope that's OK.
Right now I don't see how to make this apply to a selected forum only. |
#10
|
|||
|
|||
![]()
Oh..sorry, I missed that part. you could do something like this:
PHP Code:
If you wanted you could have different forums redirect to different URLs by adding "else if" to that first if statement. --------------- Added [DATE]1291058521[/DATE] at [TIME]1291058521[/TIME] --------------- Sorry, the above had a mistake that I (hopefully) fixed. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|