Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
#231500 01/01/2003 8:55 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
This will add the "Re: Username" replied to post link back into showflat mode for .threads 6.2

Mod Name: Reply To Who 1.0

Description: This will add the "Re: Username" information back to posts in showflat mode.

Author: JustDave www.chattersonline.com
           For discussion and bug reports go to www.ubbdev.com

Date: 01/01/03

Working Under: 6.2

Files Modified: showflat.php, /templates/default/showflat.tmpl

New Files: None

Database Modifications: None

Notes: Restores functionality from 6.1. Adds only 2 queries.


Ummm... download zip, open, read, follow instructions, upload and go.







Edit Note: Last updated 01/02/03 8:21 AM CST
Attachments
63321-replytowho.6.2.zip (0 Bytes, 173 downloads)

Last edited by JustDave; 01/19/2003 2:54 PM.
Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Hmmmm...

Something doesn't work right with this. It makes all showflat show blank.

I'm looking to see if I missed something.

Daine #231502 01/01/2003 11:43 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I can't figure it out. I follow the directions carefully... and the showflat mode just has no posts.... the page is there, it's just not showing any of the posts.

Must be a step missed.

Daine #231503 01/02/2003 7:30 AM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I'll look again but I don't think I missed anything. Perhaps another modification is causing problems? I'll have to check things over but there wasn't much to modify.

Joined: Oct 1999
Posts: 282
Enthusiast
Enthusiast
Offline
Joined: Oct 1999
Posts: 282
Just installed your Hack. Great! Thanks a lot!!!

There's just one small bug:

[]### Find this:
$postrowsize = $i;
$dbh -> finish_sth($sth);[/]

Keep the line
$postrowsize = $i;
and it will work.


Another thing: It displays [[:"blue"]Re:**DONOTDELETE**[/]] if replying to an anonymous user.

Sponsored Links
Daine #231505 01/02/2003 9:23 AM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I forgot to add the line being replaced in the last showflat.php step back in with what's being added. The zip has the updated instructions. Also, I had left the <span id=... portion of code around the subject which didn't need to be in there for this mod so I took that out as well.

It *will* work now.

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Dave - I am getting the following error...

Parse error: parse error in /home/sites/site30/web/forums/showflat.php on line 956

Which seems to be this section...

$postrow[$i]['Subject'] = $Subject;
$postrow[$i]['replyto_link'] = "<a href="{$config['phpurl']}/showthreaded.php?Cat=$Cat&Board=$Board&Number=$ParentPost&page=$page&view=$view&sb=$sb&o=$o&vc=1" target="_new" title="{$ubbt_lang['RESPONSE_TO']}$ParentPost" alt="{$ubbt_lang['RESPONSE_TO']}$ParentPost">";

Any thoughts? Re-checked the few alterations all okay.

Ian


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Works Great Now!!! Awesome Dave!

Gorlum #231508 01/03/2003 10:07 AM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
What you posted looks to be ok. I'm not sure what may be going on...

Perhaps a template error? Make sure you have the backets {} around the variable.

Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
Is this the hack that was noted to increase the load significantly for large databases?

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
No.... this is better. Only 2 queries. Mine was 2 per post. Dave's is 2 total. Almost no load.

JustDave rules.

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
I added this one and it works great!

Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
Added it to mine and I'm sure it will make a lot of members happy! Doesn't seem to create a server burden either

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
For some reason, I had the following code in showflat.php - I am not sure where that came from, as I do not recognise it from any mod installed since 6.2. I checked it against a copy from the members area at Infopop. I also noticed that all files on there are dated 30/12/02 - have they been updated????

Code
  		 else {<br />		 	 $postrow[$i]['Subject'] = "<span id=\"subject$i\">$Subject</span>";<br />		 }


So I can only assume this is from the origianl copy and since been removed

Strange, as I wasn't getting any errors until I installed your mod - which works fine once I take out the code above.

Just posting this in case anyone else gets a similar problem.

Ian



Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
That code is from your quick reply modification.

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Darn it - for the benefit of anyone who has the quick reply mod installed, the installation should look like this...

Code
 <br /><br /><br /><br />### In showflat.php find this:<br /><br /><br />         $Parentlink = "";<br />         if ($ParentPost) {<br />             $postrow[$i]['Subject'] = "<a href=\"{$config['phpurl']}/showthreaded.php?Cat=$Cat&amp;Board=$Board&amp;Number=$ParentPost&amp;page=$page&amp;view=$view&amp;sb=$sb&amp;o=$o&amp;vc=1\" target=\"_new\" title=\"{$ubbt_lang['RESPONSE_TO']}$ParentPost\" alt=\"{$ubbt_lang['RESPONSE_TO']}$ParentPost\">$Subject</a>";<br />         }<br /><br />else <br />{		 	 <br />$postrow[$i]['Subject'] = "<span id=\"subject$i\">$Subject</span>";<br />		 }<br /><br /><br />### and change it to this:<br /><br /><br />		 $postrow[$i]['Subject'] = $Subject;<br />         $postrow[$i]['replyto_link'] = "<a href=\"{$config['phpurl']}/showthreaded.php?Cat=$Cat&amp;Board=$Board&amp;Number=$ParentPost&amp;page=$page&amp;view=$view&amp;sb=$sb&amp;o=$o&amp;vc=1\" target=\"_new\" title=\"{$ubbt_lang['RESPONSE_TO']}$ParentPost\" alt=\"{$ubbt_lang['RESPONSE_TO']}$ParentPost\">";<br />$postrow[$i]['Subject'] = "<span id=\"subject$i\">$Subject</span>";<br /><br />  


This ensures that both the 'Reply to Who' and the 'Quick Reply' mods both work

Ian


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Will work in 6.2.1.

Daine #231517 01/15/2003 9:31 AM
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
I just installed this 2 times 100% according to the instructions on a clean 6.2 install with some design changes. (not in the showflat files)
I have the same problem. Blank screen.

Regards,

Ron.
www.sat4all.com


Those who fail to read ask many questions:-)
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Same thing needs to be done here...

If it's a reply to user number 1... then it needs to fetch the anonname from the posts table. Otherwise you get "Re: ***DONOTDELETE***" if it's a reply to an anon post.

Tried to fix this one too....but it stumped me. If I do it, it'll probably use unneeded queries.

Daine #231519 01/18/2003 8:32 AM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I'll get this worked on sometime today. There should be no extra queries needed.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
*bump*

Updated to display anonymous usernames.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369

Daine #231522 01/20/2003 5:26 AM
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
Thx for the update!
You may want to initalize the following variables to avoid warnings, when there are no replies:
$parentinfo[0]['poster_id'] = '';
$parentinfo[0]['post_num'] = '';
$pusername["X$Unum"] = '';

Sorry, i know error level 15 can be annoying.

EDIT: $parentinfo[0]['anon_name'] = ''; is missing in my list.

Last edited by Astaran; 01/20/2003 6:03 AM.
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Thanks Astaran.

Yes 15 can be a pain. (don't look at IIP through them glasses) LoL

Joined: Dec 2002
Posts: 4
Lurker
Lurker
Offline
Joined: Dec 2002
Posts: 4
For change
[Re: Author]- Underline only for Author
to
[re: Author] - underline both re: Author how in 6.1.1

Just find in showflat.php:
$postrow[$i]['replyto_link'] = "<a href="{$config['phpurl']}/showthreaded.php?Cat=$Cat&Board=$Board&Number=$ParentPost&page=$page&view=$view&sb=$sb&o=$o&vc=1" target="_new" title="{$ubbt_lang['RESPONSE_TO']}$ParentPost" alt="{$ubbt_lang['RESPONSE_TO']}$ParentPost"> ";

Change to
$postrow[$i]['replyto_link'] = "<a href="{$config['phpurl']}/showthreaded.php?Cat=$Cat&Board=$Board&Number=$ParentPost&page=$page&view=$view&sb=$sb&o=$o&vc=1" target="_new" title="{$ubbt_lang['RESPONSE_TO']}$ParentPost" alt="{$ubbt_lang['RESPONSE_TO']}$ParentPost">re: ";

Find
$postrow[$i]['replyto_link'] = " [Re:$replytolinkstart" . $parentnum["X$Bnum"] . "</a>]";

Change to
$postrow[$i]['replyto_link'] = " [$replytolinkstart" . $parentnum["X$Bnum"] . "</a>]";



Joined: Mar 2000
Posts: 180
Member
Member
Offline
Joined: Mar 2000
Posts: 180
I'm guessing this will work on a 6.2.2 board?

Was the upgrade from 6.1 to 6.2 generally aimed at speed? The "re: username", and the "new posts" on the main page were both changed...am I wrong, or were they looking for ways to speed things up?

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
The upgrade to 6.2.2 is bug fixes. The features of 6.2.1 should be the same for 6.2.2

I haven't tried this with 6.2.2 but it should work or be fairly close to figure it out.

Joined: Mar 2000
Posts: 180
Member
Member
Offline
Joined: Mar 2000
Posts: 180
Good...this is one of the first things my users noticed. I wasn't 100% what they were referring to, until I stumbled across this thread!

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
hehe...

If this works with 6.2.2 please post back and let us know.

It should but it would be nice to have a definative answer.

Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
Works well on my 6.2.2 test installation!

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Good to hear! Thanks

Joined: Mar 2000
Posts: 180
Member
Member
Offline
Joined: Mar 2000
Posts: 180
Someone care to help a newbie?

I edited showflat.php fine, but when trying to edit showflat.tmpl, when I save it in NotePad, it scrunches all the code together, like it's doing away with all the formatting? WordPad also has problems working with it. I've never had problems editing any other files...where am I going wrong?

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Strange. I don't think I have had any problems like this before. Anyone else?

Joined: Mar 2000
Posts: 180
Member
Member
Offline
Joined: Mar 2000
Posts: 180
Figures! LOL!

Oh, I went and tried it on another computer...same thing.

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
I had thought that all the text files were in Unix text format, so I would expect that result if you try to use Notepad. However, I checked a few of the files, and saw that they're inconsistent. Some of them are in Unix text format, and some of them are in DOS text format, which isn't good.

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
It is a well known problem with Notepad. What I do is open Wordpad and that opens the file OK. Then I copy all the content, open the same file in Notepad and paste it back. There seems to be problem with the crlf character that Unix creates and with Notepad translating it.


Nikos
Joined: Aug 2002
Posts: 218
Member
Member
Offline
Joined: Aug 2002
Posts: 218
Best is to take ultraedit for such things. This will not mess up your text and you have a nice highlightning for the code.

edr #231537 02/19/2003 4:08 PM
Joined: Mar 2000
Posts: 180
Member
Member
Offline
Joined: Mar 2000
Posts: 180
EDIT: Well, I got it...it seems to be working now!

Another great hack!

Last edited by Chevy454; 02/19/2003 4:33 PM.
Joined: Jul 2001
Posts: 442
Enthusiast
Enthusiast
Offline
Joined: Jul 2001
Posts: 442
Very cool, works great, just upgraded to 6.2.2 and after 1 min my users BBQ'ed me because they didn't have the reply to.

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Is this hack different than this one
[6.2] Postlist Last Post By for 6.2 ? (which I have installed)

Page 1 of 2 1 2

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)