The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Is it possible to automatically prefill the title field when creating a new thread?
Hey,
the title might sound confusing but it's a lot more straightforward than it sounds. Does vBulletin have a way in which by clicking a link to make a new thread for example: http://popoverdose.com/newthread.php?do=newthread&f=29&title=hey it would automatically type in the title field 'hey'? Or would this require a plugin? Thanks |
#2
|
|||
|
|||
I would think it is, I've be able to grab the get var using javascript but for some reason its not adding it to the input.
All edits are made in the newthread template Just below <head> I added this: Code:
<script type="text/javascript"> // this function grabs the hey from &title=hey function getUrlVars() { var vars = {}, parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { vars[key] = value; }); return vars; } // Making life easier, cleaning text up and relevant get var var newtitle = decodeURIComponent(getUrlVars()["title"]); // this should add the hey as the inputs value but it doesn't and I'm not sure why document.getElementById("titlefromurl").value=newtitle; </script> Code:
<input id="titlefromurl" type="text" class="bginput" name="subject" |
Благодарность от: | ||
greigeh |
#3
|
|||
|
|||
I think this might be what we were talking about in this thread: https://vborg.vbsupport.ru/showthread.php?t=285718
|
Благодарность от: | ||
greigeh |
#4
|
|||
|
|||
Thanks a bunch!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|