vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Quick Reply Box (https://vborg.vbsupport.ru/showthread.php?t=34597)

Genesis 03-30-2002 05:06 PM

Patience never was a good quality of mine.

I fixed this by adding the USERNAME input box from the REGISTER page.

If you are logged in it overrides it though. Meaning if you enter TEST as username it will take your logged in name (which is good). If you are not logged in it will USE what you entered in the box.

However while that override is good i'd rather have it just DID NOT appear if the user is regged.

Code:

<tr>
        <td bgcolor="{secondaltcolor}"><normalfont><b>User Name:</b></normalfont></td>
        <td bgcolor="{secondaltcolor}"><normalfont><input type="text" class="bginput" name="username" size="25" maxlength="$maxuserlength"></normalfont></td>
</tr>


Gen

boatdesign 03-30-2002 09:33 PM

Is there a way to only show the quick reply for users who are logged in?

I allow guests to post, but would prefer if unregistered users post with the standard full post screen:
1.) So that they can enter their name in the username field (so the post is posted from John LastName/Guest User rather than Unregistered/Guest User)
2.) To reduce spam. I really want this to be avaible for registered logged-in users to make posting for them quicker, but I don't want to make it too easy for visitors to spam my board, even though I do want to allow guest users to post (just not this easily :)

boatdesign 03-30-2002 09:43 PM

Has anyone tried to make it so the quick reply box only appears on the last page of the thread (so people won't reply having read only the first page without reading the whole thread first?)

Visionray 03-31-2002 05:11 AM

Great hack! Works perfectly.

Genesis 03-31-2002 12:15 PM

Hmmm. The fix i did to allow a username box seems to have backfired. It works great for unregged users however if you are registered and you type in a username the post is MADE AS YOUR REGGED NAME BUT if you look at the thread it says Last post by "username you entered" and not the one you where logged in. It also does this on the mainpage. Firefly any help plz ?

/Gen

Jawelin 03-31-2002 12:39 PM

How could make this hack automatically subscribe to the just replied thread if the user config has subscription enabled ?
Is the proper hidden var enough ?

Thanks

Admin 03-31-2002 01:12 PM

Yes Jaweli and Genesis try using $logincode in the showthread_replybox template.

DFX 03-31-2002 03:43 PM

Quote:

Originally posted by FireFly
Error 28 means "no space left on device". Nothing to do with this hack. :)
Ok :)

It seems to work on most of the threads if used on "Page 1" and not on pages 2-3 etc. However on some pages it won't work on "Page 1" and they don't have multiple pages. :(

Genesis 03-31-2002 06:04 PM

Quote:

Originally posted by FireFly
Yes Jaweli and Genesis try using $logincode in the showthread_replybox template.
see,

This is why i opted for a paying solution rather than using one of those free boards on the net.
Quality support :)
I don't know if FF gets payed for what he does but he sure does it GOOD.

Thanks :)
It works perfectly now.

Keep up the good work FireFly.
Tis appreciated.

Greetz

Gen

Ignite 03-31-2002 08:00 PM

I installed everything, but the box came at the top of the thread, not the bottom.

boatdesign 03-31-2002 08:41 PM

Quote:

I installed everything, but the box came at the top of the thread, not the bottom.
Look at step 3 and where you have placed the $replybox variable in the showthread template - you need to move $replybox to the right place.

Ignite 03-31-2002 08:53 PM

this is how I have it, and its still at the top:

<!-- first unread and next/prev -->
<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextra} align="center">
<tr>
<td><smallfont>$pagenav $firstunread&nbsp;</smallfont></td>
<td align="right"><smallfont>
<img src="{imagesfolder}/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="{imagesfolder}/next.gif" alt="" border="0">
</smallfont></td>
</tr>
</table>
<!-- first unread and next/prev -->

$replybox

DFX 03-31-2002 08:56 PM

Ok I just tried installing the other quick reply box metioned in the second post in this thread and it wouldn't work either. S I set up a testboard with 2.2.4 (same version my main board is on) and both of the qrb's work perfect. So I'm assuming this is a database problem of some sort, but when I try to run repair.php from the admin directory it says all tables are "OK" using the 2 default lines listed on the page. Any help?

Austin Dea 03-31-2002 09:03 PM

the hack calls for you to look for this...

Quote:

<!-- 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="https://vborg.vbsupport.ru/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="https://vborg.vbsupport.ru/images/next.gif" alt="" border="0">
</smallfont></td>
</tr>
</table>
<!-- first unread and next/prev -->
now compare the codes :D.

*cough* it's the second occurence of a <!-- first unread and next/prev --> section ;)

Ignite 03-31-2002 09:38 PM

who me? is that what I am looking for? b/c my reply box is still at the top

boatdesign 03-31-2002 10:35 PM

If you look at the showthread page, there is a < Last Thread Next Thread > section at both the top of the thread table and the bottom of the thread table. I believe you put $replybox below the first when you should have put $replybox under the second next/prev section - you just need to move "$replybox" in your showthread template until you get it where you want it to display.

boatdesign 03-31-2002 10:36 PM

P.S. Anyone figure out how to only show the quick reply box for users who are logged in? (And not for unregistered users who are also allowed to post as guests... only for people who are logged in?)

(Forgive me because I am still very weak at PHP)...

Looking at the other posts in this forum I see this code:
Code:

if (!in_array($bbuserinfo['usergroupid'], array(5,6,7))) {
$replybox='';
} else {
$textareacols = gettextareawidth();
eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");
}

Is something like this all I need to do to not show the quick reply box to Unregistered Users (who do have permission to post, but I still want to encourage them to register and thus don't want to make it too easy to post as a guest.) Would I just enter the usergroupid for Unregistered in the array?

Or shoud I use this which I also see up in the thread:

Code:

if (($bbuserinfo['usergroupid']=="5") or ($bbuserinfo['usergroupid']=="6")) {
  /*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;
}
$textareacols = gettextareawidth();
eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");
} else {
  $replybox=''
};

If one of the PHP experts could come up with the definitive code to use to not show the quick reply to guests (Unregistered Group who do have permission to post) I would really appreciate it.

boatdesign 04-01-2002 03:11 AM

Previously in the thread I see that putting the quick reply box only on the last page was discussed, and many didn't see a point. I guess my reasons are that:

1.) Even though you can hit the normal "Post Reply" on any page, at least you see the recap on the newreply page so you won't accidentally miss the second page and post something redundant.

2.) Placing the reply box on the last page makes it clearer that the first page isn't all there is. I'm afraid if the reply box is on every page that I'll have to make all the page numbers bigger so newbies don't miss multiple page threads.

3.) Putting the quick reply on all pages rather than just the last page encourages people to post without reading what is already there (as I myself was guilt of earlier in this thread ;))... how can you know if your post is redundant if you haven't read all the way to the end of the thread?

Or is it really difficult to only show it on the last page?

boatdesign 04-02-2002 05:28 AM

OK - it was easier than I thought.

Just add

Code:

} elseif ($bbuserinfo['usergroupid']=="1") {
        $replybox='';

in the list of conditionals to not show the reply box to guests.

Now the only thing I can't figure out is how to only show the reply box if:
1.) it is the last page of a multipage thread, or
2.) it is a single page thread.

I can use
} elseif ($pagenumber!="1") {
$replybox='';

for example to not show it on page 1 but to show it on page 2.

I see above there is this conditional statement:
if ((!isset($pagenumber) or $pagenumber==0) and $pagenumber!="lastpage") {

Which I thought I would be able to easily adapt, but I can't seem to make it work.

Can anyone give me a hand?

Webmasta XT 04-02-2002 10:29 AM

when i add the smilies box and press one smilie it doesnt add one in the box...

pHAZE_1 04-02-2002 04:01 PM

hey firefly

i installed this hack, but the box is above the thread and i want it below the thread, just like it is here, how would i do that? please be specifi. thanks

btw it is very cool.

hukgwai 04-02-2002 09:46 PM

Firefly: great hack.. it's working pefectly on my board..

just a cosmetic question..

how would i go about putting the reply buttons right next to the form rather than another table below it?

boatdesign 04-02-2002 11:08 PM

Quote:

how would i go about putting the reply buttons right next to the form rather than another table below it?
From your admin CP edit the showthread_replybox template.

boatdesign 04-02-2002 11:12 PM

Quote:

i installed this hack, but the box is above the thread and i want it below the thread, just like it is here, how would i do that? please be specifi. thanks
If you look at the showthread page, there is a < Last Thread Next Thread > section at both the top of the thread table and the bottom of the thread table. I believe you put $replybox below the first when you should have put $replybox under the second next/prev section - you just need to move "$replybox" in your showthread template until you get it where you want it to display.

hukgwai 04-03-2002 12:37 AM

Quote:

Originally posted by boatdesign

From your admin CP edit the showthread_replybox template.

i already know that much.. i don't know what to do... just cut and paste and make it a nested table? i would appreciate it if someone showed me exactly what the code is.. thanks

banoota 04-05-2002 06:49 PM

am i the only one having trouble installing this?!

banoota 04-05-2002 06:56 PM

Quote:

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="https://vborg.vbsupport.ru/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="https://vborg.vbsupport.ru/images/next.gif" alt="" border="0">
</smallfont></td>
</tr>
</table>
<!-- first unread and next/prev -->
i don't get this bit, you mean we should put the code in our original showthread.php template? and if yes, where exactly?

cuz the text above sounds like "type $replybox" after the code block above

i couldn't find such thing in the original showthread.php

JTMON 04-06-2002 01:02 AM

Can anyone tell me why I get parse error on line 480 on 2.2.5, the last line?

JTMON 04-06-2002 01:13 AM

fixed it, I missed a '}'

Sadie Frost 04-06-2002 01:54 AM

Quote:

Originally posted by banoota


i don't get this bit, you mean we should put the code in our original showthread.php template? and if yes, where exactly?

cuz the text above sounds like "type $replybox" after the code block above

i couldn't find such thing in the original showthread.php

It's not in showthread.php, it's in the showthread template in teh admin cp :) And yes, after that code in the template, put $replybox on the next line

Hope that helps :)

banoota 04-06-2002 07:36 AM

Quote:

Originally posted by Sadie Frost


It's not in showthread.php, it's in the showthread template in teh admin cp :) And yes, after that code in the template, put $replybox on the next line

Hope that helps :)

oopth! i feel dumb :ermm:

thanks =)

Jawelin 04-06-2002 11:40 AM

Quote:

Originally posted by Jawelin
How could make this hack automatically subscribe to the just replied thread if the user config has subscription enabled ?
Is the proper hidden var enough ?

Thanks

As asked in Post #246 I put some addon to choose:
- subscribe to the thread (defaulted to 'no' in the original hack)
- add signature in quick-replied post (defaulted to 'yes' in the original hack)
Both are initially set to user's default values within UserCP:

In showthread.php
PHP Code:

// replace :
    
$textareacols gettextareawidth();
    eval(
"\$replybox = \"".gettemplate('showthread_replybox')."\";");

// with :
    
$textareacols gettextareawidth();
    if (
trim($bbuserinfo[signature])!= "")  $signaturechecked="checked";
    if (
$bbuserinfo[emailnotification]!=0)  $emailchecked="checked";
    eval(
"\$replybox = \"".gettemplate('showthread_replybox')."\";"); 

In showthread_quickreply template:
Code:

# remove two separate lines:

<input type="hidden" name="email" value="">
<input type="hidden" name="signature" value="yes">


# then add :

                <td nowrap valign="bottom"><smallfont>
                &nbsp;&nbsp;<input type="checkbox" name="email" value="yes" $emailchecked> Subscription<br>
                &nbsp;&nbsp;<input type="checkbox" name="signature" value="yes" $signaturechecked> Signature<br>
                &nbsp;&nbsp;<br>&nbsp;</smallfont></td>

# right after :

        <smallfont><a href="javascript:checklength(document.vbform);">[check message length]</a><br><br></smallfont></td>

That's all, folks.
Thanks to FF for the great hack, again... but many users asked me such an enhancement.
Bye

Admin 04-06-2002 11:45 AM

Good addition, only one thing.
You should really replace this:
Code:

if (trim($bbuserinfo[signature])!= "")  $signaturechecked="checked";
    if ($bbuserinfo[emailnotification]!=0)  $emailchecked="checked";

With this:
Code:

    if (trim($bbuserinfo[signature]) != '') {
        $signaturechecked = 'checked';
    } else {
        $signaturechecked = '';
    }

    if ($bbuserinfo['emailnotification'])
        $emailchecked = 'checked';
    } else {
        $emailchecked = '';
    }

So people can't add stuff to the $emailchecked variable through the URL (this is why 2.2.5 was released). :)

inetd 04-06-2002 12:01 PM

Jawelin, good addon :) :super:

P.S. FireFly, you edit only for 2.2.5?

Jawelin 04-06-2002 12:03 PM

Yes, of course.
Thanks for pointing it out.

P.S.: I wouldn't affect your code too much... ;)

Even the resulting behavior of the table isn't too changed with those two little boxes... Otherwise, I moved the two buttons inside that table, btw.

jeevsy 04-07-2002 08:23 AM

workd perfectly in vb2.2.5 BUT..............


i get this error when i try and edit any of the posts:

Fatal error: Call to undefined function: unindexpost() in /home/flashdo/public_html/board/editpost.php3 on line 264


but if you then press back, back a few times in ie then refrech on the page, the changes HAVE taken place.


any ideas what's up with this error message?

===========
www.flash-group.com/board
===========

thanks,
J

Admin 04-07-2002 11:12 AM

Nothing to do with this hack.

Xube 04-07-2002 02:30 PM

Thanks (once again!) Chen. I've installed this hack and it is great, but I'm finding that when board members reply to messages using the quick reply box that this hack creates it doesn't automatically generate an email to members who have opted to receive email replies to the thread. :surprised: The automatic email continues to work when board members reply using the normal reply button. Is there a way to upgrade the coding for this hack so that it defaults to sending the auto emails out? Here are a couple of example posts from members on my board who have discovered this problem:

Quote:

email notification gone?
What happened to email notification when someone replies to a post you have participated in? I have it turned on in my profile, but I stopped getting them about the time the quick reply option went into effect.
Quote:

Re: email notification gone?
Maybe you replied using QuickReply box. In that case, email notification is NOT turned on. The only way I have gotten the emails to work when using the quick reply box is to go back in thread and edit your post. Make sure "Email Notification" is checked. Just did it for that particular post.

Xube 04-07-2002 02:49 PM

Quote:

Originally posted by Jawelin
How could make this hack automatically subscribe to the just replied thread if the user config has subscription enabled ?
Is the proper hidden var enough ?
Thanks

...sorry, found this thread by searching & saw this fix after I posted.

Oopth! <==== what a great word banoota :D

inetd 04-08-2002 10:05 AM

FireFly if not login to vB and to send the answer through Quick Reply Box the form for input login|password will appear. After input login&password there is a message: No thread specified. If you followed a valid link, please notify the webmaster. Having returned on two pages back any more you will not see the typed answer. Fix it please!


All times are GMT. The time now is 02:25 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02006 seconds
  • Memory Usage 1,863KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (1)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete