The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How to hyperlink to start New Thread with Title?
I know you can hyperlink to start a new thread in a specific forum with this:
Code:
http://www.YOURSITE.COM/forum/newthread.php?action=newthread&forumid=XXX |
#2
|
|||
|
|||
You would need a plugin to do that, but it's a one liner. Use hook newthread_form_start and this code:
Code:
$newpost['title'] = $vbulletin->input->clean_gpc('r', 'subject', TYPE_STR); and then add something like &subject=thread%20title to your url. (Of course your title will need to be URL-encoded, specifically spaces need to be represented as %20). |
#3
|
||||
|
||||
Quote:
That being said, I have one follow up question... If I attempt use a vBulletin variable in the Thread Title and it contains an ampersand in the variable the Thread Title will stop processing at that point and cut the rest of the title off. Is there a work around for this? Example: I use ...&subject=Issues%20with%20{vb:raw cruiseline} Where cruiseline = P&O Cruises, then the results displayed for title are "Issues with P". |
#4
|
|||
|
|||
Use {vb:urlencode cruiseline} instead of vb:raw.
BTW, user Sarteck came up with virtually the plugin I did, but deleted the post because I happened to post first. But I wanted to point something out that I hadn't thought of - I used 'subject' because that's what's used by the vb code when you submit a thread, but there's no reason you couldn't use any name you want, as long a it's the same in the plugin and where you construct the link. So for instance if you like &title=something better you could use that. |
#5
|
||||
|
||||
Quote:
Using: &subject=Issues%20with%20{vb:raw cruiseline} {vb:raw cruiseline} = "Issues with P" {vb:urlencode cruiseline} = "Issues with cruiseline" As you can see that didn't work. (Thanks, for the additional info on the plugin.) |
#6
|
|||
|
|||
oops, try {vb:urlencode {vb:raw cruiseline}}
|
#7
|
||||
|
||||
Thanks for the quick replies, that did it - works perfect now!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|