Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Mod Name / Version - Update B_ParentUser for older posts
Description - The B_ParentUser field is a new field added back for 6.3 which holds the user number of the person you are replying to. It's how the "Re: Username" is displayed in flat mode. While this was a standard feature in UBB.Threads prior to version 6.2, it was removed, and now has been added back. This leaves all your old posts without a clue as to who they are in reply to.
This script runs down through all your posts, grabs the user number of the person who you are replying to and fills in B_ParentUser so that the "Re: Username" will display for all posts.
Pre-requisites - UBB.Threads 6.3
Author - JoshPet - www.joshuapettit.com
Credits - my idea / my creation
Files Altered - none
Database Altered - no
New Files - updateposts.php
Any other info - This is alot of queries on the database. Use at your own Risk - BACKUP your Database First!!!. This worked for me with about 50,000 posts, but if you had alot of posts, it may time out. Although I don't believe it could do any harm if it times out. It just won't update all the posts.

Instructions - Copy into your threads directory and run in your browser.
Attachments
76540-updateposts.php.zip (0 Bytes, 28 downloads)

Last edited by JoshPet; 04/21/2003 11:10 AM.
Sponsored Links
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Thanks Josh, we will use at our own Rish

BTW - is there anyway to do a similar thing with the last post column in the postlist page?


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
[]Credits - my idea / my creation[/]

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Good Idea. Probably could tweak it to do that.

Dave - Glad you like it.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
[]Ian_W said:
Thanks Josh, we will use at our own Rish

BTW - is there anyway to do a similar thing with the last post column in the postlist page? [/]

Did the same thing to update Last Poster here.


Sponsored Links
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Cool - got to keep you on your toes


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Works like a charm.

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
Timed out on my board. No biggie though.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
ADK - I forgot to add.. if it didn't finish... it's coded to only deal with posts without a value.... so you shoudl be able to safely run it again.... until all the posts are filled in.
Should be harmless.

On large boards with a low time limit (or safe mode on) you might need to run it a couple of times.

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
Ok. Thanks!

AKD

Sponsored Links

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
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 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
Morgan 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 20240430)