The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I have searched and narrowed the problem down to my template. I'm using a very stripped down template for a mobile website. I'm lost when it comes to coding it to work correctly. I tried pulling the quickreply code from another template but then it doesn't display correctly. I do not want the WYSIG options, just a basic text input box and a "post" button.
Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]" xmlns="http://www.w3.org/1999/xhtml"> <head> $headinclude <title>$thread[title]<if condition="$pagenumber>1"> - <phrase 1="$pagenumber">$vbphrase[page_x]</phrase></if> - $vboptions[bbtitle]</title> </head> <body onload="$onload"> <div class="mobiletitle"> App <a id="homeButton" class="mobilebutton" href="forumdisplay.php?$session[sessionurl]f=$forumID">Back</a> <a class="mobilebutton" href="/search.php">Search</a> </div> <div align="left"> $navbar </div> <div align="center"><h2 id="title-thread">$thread[title]</h2></div> <if condition="$show['largereplybutton']"> <if condition="$show['closethread']"><a class="mobile_button" href="#respuesta"></a><else /><div align="center"><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></div></if> </if> <!-- / controls above postbits --> $postbits <if condition="$show['pagenav']">$pagenav</if> <if condition="!$show['search_engine']"> <ul> <li class="inline"> <strong>«</strong> <a href="showthread.php?$session[sessionurl]t=$threadid&goto=nextoldest" rel="nofollow">$vbphrase[prev_thread]</a> | <a href="showthread.php?$session[sessionurl]t=$threadid&goto=nextnewest" rel="nofollow">$vbphrase[next_thread]</a> <strong>»</strong> </li> </ul> </if> <a name="respuesta"></a> <if condition="$show['quickreply']"> <!-- quick reply --> <h1>$vbphrase[quick_reply]</h1> <ul> <li style="text-align:center;"> <form action="newreply.php?do=postreply&t=$threadid" method="post" name="vbform" onsubmit="return qr_prepare_submit(this, $vboptions[postminchars]);" id="qrform"> $messagearea <input type="hidden" name="fromquickreply" value="1" /> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="do" value="postreply" /> <input type="hidden" name="t" value="$threadid" id="qr_threadid" /> <input type="hidden" name="p" value="$qrpostid" id="qr_postid" /> <input type="hidden" name="parseurl" value="1" /> <input type="hidden" name="loggedinuser" value="$bbuserinfo[userid]" /> <input type="submit" class="button" style="margin-top: 20px;" value="$vbphrase[post_quick_reply]" accesskey="s" title="(Alt + S)" name="sbutton" tabindex="2" id="qr_submit" onclick="clickedelm = this.value" /> </form> </li> </ul> <!-- end quick reply --> </if> $wrt_template $footer </body> </html> |
#2
|
||||
|
||||
![]()
Here is the article about the security tokens - it has the line you need to add to your form in there. Implementing CSRF Protection in modifications
|
#3
|
|||
|
|||
![]()
add
HTML Code:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
HTML Code:
<input type="hidden" name="s" value="$session[sessionhash]" />
|
#4
|
|||
|
|||
![]()
you find
showthread_quickreply showthread_quickreply_full and add HTML Code:
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" /> <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" /> |
#5
|
|||
|
|||
![]()
why can't updated versions of vBulletin add the above codes ?
|
#6
|
||||
|
||||
![]()
Updated versions of the vB code does add in the above code. Problem is, too many admins don't bother to upgrade their templates after an upgrade and so they code doesn't get added.
You *need* to upgrade your custom templates after an upgrade! |
#7
|
|||
|
|||
![]()
I created a style using the style generator and occasionally still have the same problem
|
#8
|
||||
|
||||
![]()
Ok, if i get it right, every where we have the sessionhash value, we should find the security token under it ! Right?
I'm having some trouble with one skin in particular, my other 4 are all ok but this one is giving me trouble with some options! Could it be this???? |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|