The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Opening a new thread with preset title
Hi,
I have two questions. I really hope you can help me out: 1. I would like to have my users clicking a special link to open a new thread, and then the title/subject will be filled out already. For example: They click the link http://www.mysite.com/newthread.php?...SPECIALSUBJECT and the new thread site opens with the title field already filled out with "MYSPECIALSUBJECT". 2. I want to be able to add an extra id to a new thread, and save it along with the other thread info in the mysql database when the users submits the new thread. It should work in the same way as the other, so when they click the link to open a new thread: http://www.mysite.com/newthread.php?...3&extraid=5000 it would add the value "5000" in a field in the database when they submit the thread. I know how to create the field in the database, I just don't know how to add these data into it. I hope you can help me out. Thanks. Kind regards Henrik |
#2
|
||||
|
||||
As for 1: install this. (Admin CP -> Plugins & Products -> Download / Upload Plugins)
This would make your special link work. |
#3
|
|||
|
|||
Thanks nico_swd. It worked perfectly!
Just stuck with my question #2 now I think I know the solution some of the way... But I can't figure out where in the process of starting a New Thread that the values are put in the database. Because it should be here that I need to add some extra lines... I'm used to working with php and mysql, but with this I can't find the place in the php codes where it "INSERT"s the values into the database after submitting a new thread. Does somebody know in what file this is hidden? |
#4
|
|||
|
|||
nice plugin.
How to add same function to new pm form? |
#5
|
|||
|
|||
Hopefully nico_swd won't mind here:
(Credit to nico_swd for original code) |
#6
|
||||
|
||||
Thanks for the plugin (1), nico_swd. It works great to place a thread title through a link, but is it also possible to add a body-message/txt to the editor as well?
Example: Code:
http://www.mysite.com/newthread.php?do=newthread&f=3&subject=MYSPECIALSUBJECT&message=MYSPECIALMESSAGE I'm aware that with the 'Thread Stencil' product one can put pre-defined info in, but I need to pass variables in use of the script through the link. And as I said, plugin (1) works great! |
#7
|
||||
|
||||
Beside the fact this thread was started over a year ago , I figured it out.
A new plugin in: newthread_form_start Code:
if (empty($newpost['message'])) { $newpost['message'] = $vbulletin->input->clean_gpc('g', 'message', TYPE_NOHTML); } does the trick... |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|