Previous Thread
Next Thread
Print Thread
Hop To
Where would be a good spot to run a custom mysql query in ubbthreads.php? #237462 06/14/2010 2:28 PM
Joined: Jan 2007
Posts: 72
Softrak Offline OP
journeyman
OP Offline
journeyman
Joined: Jan 2007
Posts: 72
I tried just putting a custom mysql query at the end of the doc (like line 502) but doesn't seem to be calling. Just wondering if there would be a more desirable location in the php doc for some custom code? (note - I would like this code executed each time the ubbthreads.php file is loaded)

Express Hosting
Re: Where would be a good spot to run a custom mysql query in ubbthreads.php? [Re: Softrak] #237464 06/14/2010 3:41 PM
Joined: Jun 2006
Posts: 9,246
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,246
Hmm, your best bet is probably to add it to be executed when the footer gets called. For that you can edit the libs/html.inc.php file and look for the send_footer function.

Re: Where would be a good spot to run a custom mysql query in ubbthreads.php? [Re: Rick] #237494 06/15/2010 5:36 PM
Joined: Jan 2007
Posts: 72
Softrak Offline OP
journeyman
OP Offline
journeyman
Joined: Jan 2007
Posts: 72
Thanks. I found the best place to run it was in the header from the HTML includes.

Re: Where would be a good spot to run a custom mysql query in ubbthreads.php? [Re: Softrak] #237504 06/16/2010 1:54 PM
Joined: Jun 2006
Posts: 9,246
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,246
That works too wink


Additional Resources
UBB Developers
UBB Wiki
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Strange Merge Issue
by Baldeagle - 08/16/2019 3:37 PM
Formatting Links
by Ty Griffin - 08/13/2019 4:39 PM
Changing from iso-8859-1 to UTF-8?
by Daryl Fawcett - 08/13/2019 9:58 AM
Threaded Mode
by ToddUGA - 08/10/2019 9:18 PM
Who's Online Now
3 registered members (Baldeagle, ECNet, SD), 57 guests, and 200 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
dslam
dslam
NJ
Posts: 50
Joined: May 2007
Show All Member Profiles 
Forum Statistics
Forums34
Topics35,320
Posts192,716
Members11,865
Most Online2,569
Jul 27th, 2019
Random Gallery Image
Latest Photos
The Sky
Land Rocks
Cozy Places
Trees
Powered by UBB.threads™ PHP Forum Software 7.7.3