TD Talk Forum Archives Dumb Laws Dumb Criminals Dumb Lawsuits Real Haunted Houses

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.

Go Back   TD Talk(Formally Dumb Laws) - News, Politics, and Life > Talk about TD Talk > Suggestions or Questions

Suggestions or Questions Tell us how we can improve dumblaws or ask questions

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 3.00 average. Display Modes
  #1  
Old November 20th, 2002, 10:52 PM
BeetleJuice's Avatar
BeetleJuice BeetleJuice is offline
Not Guilty
Safe Cracker
 
Join Date: May 2001
Location: Williamston SC USA
Posts: 339
Rep Power: 0
BeetleJuice is on a distinguished road
Default Quick reply hack

// ##################################################
// ################ 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&nbsp;</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>
&nbsp;
<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.
Reply With Quote
  #2  
Old November 20th, 2002, 11:39 PM
BeetleJuice's Avatar
BeetleJuice BeetleJuice is offline
Not Guilty
Safe Cracker
 
Join Date: May 2001
Location: Williamston SC USA
Posts: 339
Rep Power: 0
BeetleJuice is on a distinguished road
Default more codes with the questions preceding them

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')."\";");
}
}
Reply With Quote
  #3  
Old November 20th, 2002, 11:44 PM
BeetleJuice's Avatar
BeetleJuice BeetleJuice is offline
Not Guilty
Safe Cracker
 
Join Date: May 2001
Location: Williamston SC USA
Posts: 339
Rep Power: 0
BeetleJuice is on a distinguished road
Default

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.
Reply With Quote
  #4  
Old November 20th, 2002, 11:45 PM
BeetleJuice's Avatar
BeetleJuice BeetleJuice is offline
Not Guilty
Safe Cracker
 
Join Date: May 2001
Location: Williamston SC USA
Posts: 339
Rep Power: 0
BeetleJuice is on a distinguished road
Default

Whats sad is I look at this and can almost understand what its saying :D
Reply With Quote
  #5  
Old November 21st, 2002, 09:40 AM
Serendipity's Avatar
Serendipity Serendipity is offline
A dip in my serenity
Prosecutor
 
Join Date: Oct 2000
Location: Cumbria UK
Posts: 5,596
Rep Power: 30
Serendipity is on the highest pedestalSerendipity is on the highest pedestalSerendipity is on the highest pedestalSerendipity is on the highest pedestalSerendipity is on the highest pedestalSerendipity is on the highest pedestalSerendipity is on the highest pedestal
Default

Quote:
Originally posted by BeetleJuice
Whats sad is I look at this and can almost understand what its saying :D
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.
Reply With Quote
  #6  
Old November 21st, 2002, 08:46 PM
BeetleJuice's Avatar
BeetleJuice BeetleJuice is offline
Not Guilty
Safe Cracker
 
Join Date: May 2001
Location: Williamston SC USA
Posts: 339
Rep Power: 0
BeetleJuice is on a distinguished road
Default

Quote:
Originally posted by Serendipity
You need to get out more, Tim! Good work. Let's hope Lynda can make sense of it all... :D

Theres no arguing that :D.

Glad I was able to contribute. I try to be helpful that way ;)
Reply With Quote
  #7  
Old November 22nd, 2002, 06:28 PM
Idnew's Avatar
Idnew Idnew is offline
Live, Laugh, Love
Warden
 
Join Date: Jun 2000
Location: Redneck Country
Posts: 14,441
Rep Power: 94
Idnew is on the highest pedestalIdnew is on the highest pedestalIdnew is on the highest pedestalIdnew is on the highest pedestalIdnew is on the highest pedestalIdnew is on the highest pedestalIdnew is on the highest pedestalIdnew is on the highest pedestalIdnew is on the highest pedestalIdnew is on the highest pedestalIdnew is on the highest pedestal
Send a message via AIM to Idnew Send a message via Yahoo to Idnew
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”

Reply With Quote
  #8  
Old December 21st, 2010, 03:44 AM
Mak_smeata Mak_smeata is offline
Arrested
Shop Lifter
 
Join Date: Dec 2010
Location: US
Posts: 2
Rep Power: 0
Mak_smeata is just really niceMak_smeata is just really nice
Default Quick reply hack

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?
Reply With Quote
  #9  
Old January 3rd, 2011, 02:28 PM
Idnew's Avatar
Idnew Idnew is offline
Live, Laugh, Love
Warden
 
Join Date: Jun 2000
Location: Redneck Country
Posts: 14,441
Rep Power: 94
Idnew is on the highest pedestalIdnew is on the highest pedestalIdnew is on the highest pedestalIdnew is on the highest pedestalIdnew is on the highest pedestalIdnew is on the highest pedestalIdnew is on the highest pedestalIdnew is on the highest pedestalIdnew is on the highest pedestalIdnew is on the highest pedestalIdnew is on the highest pedestal
Send a message via AIM to Idnew Send a message via Yahoo to Idnew
Default Re: Quick reply hack

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”

Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:11 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.

Forum software by those guys. Everything else:
Copyright ©2000 - 2005, The Dumb Network.