| If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|||||||
| Suggestions or Questions Tell us how we can improve dumblaws or ask questions |
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#1
|
||||
|
||||
|
// ##################################################
// ################ Quick Reply Box ################# // ########### Hack version 1.0 (01.29.02) ########## // ############## for vBulletin v2.2.2 ############## // ################################################## // ########### by Chen 'FireFly' Avinadav ########### // ########## (chen.avinadav@vbulletin.com) ######### // ################################################## 1. In showthread.php find this bit of code: // ################################################## if (!$getperms['canviewothers'] and ($thread['postuserid']!=$bbuserinfo['userid'] or $bbuserinfo['userid']==0)) { show_nopermission(); } if ((!isset($pagenumber) or $pagenumber==0) and $pagenumber!="lastpage") { $pagenumber=1; } // ################################################## And replace it with the following: // ################################################## if (!$getperms['canviewothers'] and $thread['postuserid']!=$bbuserinfo['userid']) { show_nopermission(); } if (($bbuserinfo['userid']!=$thread['postuserid']) and (!$getperms['canviewothers'] or !$getperms['canreplyothers'])) { $replybox=''; } elseif (!$getperms['canview'] or (!$getperms['canreplyown'] and $bbuserinfo['userid']==$thread['postuserid'])) { $replybox=''; } elseif (!$thread['open'] and !ismoderator($thread['forumid'],'canopenclose')) { $replybox=''; } else { $textareacols = gettextareawidth(); eval("\$replybox = \"".gettemplate('showthread_replybox')."\";"); } if ((!isset($pagenumber) or $pagenumber==0) and $pagenumber!="lastpage") { $pagenumber=1; } // ################################################## 2. Create a new template, with the name "showthread_replybox": // ################################################## <script language="javascript"> <!-- var postmaxchars = $postmaxchars; function validate(theform) { if (theform.message.value=="") { alert("Please complete the message field."); return false; } if (postmaxchars != 0) { if (theform.message.value.length > $postmaxchars) { alert("Your message is too long.\n\nReduce your message to $postmaxchars characters.\nIt is currently "+theform.message.value.length+" characters long."); return false; } else { return true; } } else { return true; } } function checklength(theform) { if (postmaxchars != 0) { message = "\nThe maximum permitted length is $postmaxchars characters."; } else { message = ""; } alert("Your message is "+theform.message.value.length+" characters long."+message); } //--> </script> <form enctype="multipart/form-data" action="newreply.php" name="vbform" method="post" onSubmit="return validate(this)"> <input type="hidden" name="s" value="$session[sessionhash]"> <input type="hidden" name="action" value="postreply"> <input type="hidden" name="threadid" value="$threadid"> <input type="hidden" name="title" value=""> <input type="hidden" name="iconid" value="0"> <input type="hidden" name="parseurl" value="yes"> <input type="hidden" name="email" value=""> <input type="hidden" name="disablesmilies" value=""> <input type="hidden" name="closethread" value=""> <input type="hidden" name="hiddenreply" value=""> <input type="hidden" name="signature" value="yes"> <input type="hidden" name="rating" value="0"> <table cellpadding="0" cellspacing="0" border="0" bgcolor="#555576" width="100%" align="center"><tr><td> <table cellpadding="4" cellspacing="1" border="0" width="100%"> <tr> <td bgcolor="#8080A6" colspan="2"><normalfont color="#EEEEFF" class="thtcolor"><b>Post Reply</b></normalfont></td> </tr> <tr> <td bgcolor="#DFDFDF" valign="top" nowrap><normalfont><b>Your Reply:</b></normalfont></td> <td bgcolor="#DFDFDF"> <table cellpadding="0" cellspacing="0" border="0"> <tr valign="top"> <td><textarea name="message" rows="7" cols="$textareacols" wrap="virtual" tabindex="1"></textarea><br> <smallfont><a href="javascript:checklength(document.vbform);">[check message length]</a></smallfont></td> </tr> </table> </td> </tr> </table> </td></tr></table> <br> <table cellpadding="2" cellspacing="0" border="0" width="100%" align="center"> <tr> <td align="center"><normalfont> <input type="submit" class="bginput" name="submit" value="Submit Reply" accesskey="s" tabindex="2"> <input type="reset" class="bginput" name="reset" value="Reset Form" accesskey="r" tabindex="3"> </normalfont></td> </tr> </table> </form> // ################################################## 3. In the "showthread" template add $replybox right after the following: // ################################################## <!-- first unread and next/prev --> <table cellpadding="2" cellspacing="0" border="0" width="95%" align="center"> <tr> <td><smallfont>$pagenav </smallfont></td> <td align="right"><smallfont> <img src="http://www.vbulletin.org/forum/images/prev.gif" alt="" border="0"> <a href="showthread.php?s=$session[sessionhash]&threadid=$threadid&goto=nextoldest">Last Thread</a> <a href="showthread.php?s=$session[sessionhash]&threadid=$threadid&goto=nextnewest">Next Thread</a> <img src="http://www.vbulletin.org/forum/images/next.gif" alt="" border="0"> </smallfont></td> </tr> </table> <!-- first unread and next/prev --> // ################################################## You're all done, now upload showthread.php back to your server and enjoy this hack. :-) Chen I'll add more code the author of the hack posted in replies rather than onthis one post Also note to back up the original code before applying the hack to the forums, that way if it gets screwed you can reinstall the original code Last edited by BeetleJuice; November 20th, 2002 at 11:21 PM. |
|
#2
|
||||
|
||||
|
how can I make it so that alllllll active members can view it ?
cheerz chen ... lovely hack 02-01-02 10:37 AM FireFly [] Gone bitfielding For cyrus: Replace: [code]if (($bbuserinfo['userid']!=$thread['postuserid']) and... (post #57) 02-01-02 01:43 PM FireFly [] Gone bitfielding FireFly is away! Registered: Sep 2001 Local Time: 05:19 AM Style: Plain Green (post #57) For cyrus: Replace: code: if (($bbuserinfo['userid']!=$thread['postuserid']) and (!$getperms['canviewothers'] or !$getperms['canreplyothers'])) { $replybox=''; } elseif (!$getperms['canview'] or (!$getperms['canreplyown'] and $bbuserinfo['userid']==$thread['postuserid'])) { $replybox=''; } elseif (!$thread['open'] and !ismoderator($thread['forumid'],'canopenclose')) { $replybox=''; } else { $textareacols = gettextareawidth(); eval("\$replybox = \"".gettemplate('showthread_replybox')."\";"); } with: code: $textareacols = gettextareawidth(); eval("\$replybox = \"".gettemplate('showthread_replybox')."\";"); __________________ Chen Avinadav vBulletin.org Administrator vBulletin.com Support Team and Moderator chen.avinadav@vbulletin.com If you want the Quicky Reply Box to not appear when the thread is closed, you can simply wrap an if statement around it. ORIGINAL: code: if (($bbuserinfo['userid']!=$thread['postuserid']) and (!$getperms['canviewothers'] or !$getperms['canreplyothers'])) { $replybox=''; } elseif (!$getperms['canview'] or (!$getperms['canreplyown'] and $bbuserinfo['userid']==$thread['postuserid'])) { $replybox=''; } else { $textareacols = gettextareawidth(); eval("\$replybox = \"".gettemplate('showthread_replybox')."\";"); } New: code: if ($thread[open]) { if (($bbuserinfo['userid']!=$thread['postuserid']) and (!$getperms['canviewothers'] or !$getperms['canreplyothers'])) { $replybox=''; } elseif (!$getperms['canview'] or (!$getperms['canreplyown'] and $bbuserinfo['userid']==$thread['postuserid'])) { $replybox=''; } else { $textareacols = gettextareawidth(); eval("\$replybox = \"".gettemplate('showthread_replybox')."\";"); } } |
|
#3
|
||||
|
||||
|
for more on board hacks go to vBulletin .
You may have to register to read the forums Tim P.S. Some of the threads qare pretty long. Just the one dealing with the hack I posted was over 15 pages and I'm still reading. |
|
#4
|
||||
|
||||
|
Whats sad is I look at this and can almost understand what its saying :D
|
|
#5
|
||||
|
||||
|
Quote:
You need to get out more, Tim! Good work. Let's hope Lynda can make sense of it all... :D
__________________
Ceci n'est pas un sig. |
|
#6
|
||||
|
||||
|
Quote:
Theres no arguing that :D. Glad I was able to contribute. I try to be helpful that way ;) |
|
#7
|
||||
|
||||
|
Accccckkkkkkkk
I had to take two aspirins and go lie down after reading this.
Think I better not try it and leave that for Andy to do if we ever hear from him around here. Guess their fame is keeping them busy.
__________________
“The great masses of the people will more easily fall victims to a big lie than a small one” Adolf Hitler” ![]() |
|
#8
|
|||
|
|||
|
Hi, TalkPhotography forums run the same software as BT forums as far as i can see, and they have a nifty quick reply feature in their PM system. Any chance of seeing that here?
|
|
#9
|
||||
|
||||
|
This already has the quick reply in it
__________________
“The great masses of the people will more easily fall victims to a big lie than a small one” Adolf Hitler” ![]() |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|