 |
|
|
|
 |
DigiNut
You kids get off my lawn!

Registered: Dec 2002
Location: Toronto, Self-proclaimed Centre of the Universe
|
|
|
| quote: | Originally posted by Arbiter
I don't think it should be that hard. Every time a thread or group of threads is retrieved from the database it must retrieve the username of the thread starter of each thread in order to display that column on the forum table.
So the each "row" result of the query probably contains a field like 'thread_starter.' It would be pretty easy to simply compare that field to the contents of the logged in user's ignore list and not echo the row of information if a match is found.
The only problem I see is that the algorithm probably retrieves a constant number of threads and displays them, so if you had ignored threads in the bunch it might display fewer threads on a page than it otherwise would. This could be avoided by repeating the querying process until threadsperpage threads have been displayed, but this would place additional stress on the database which may not be worth it. |
Actually come to think of it, it's probably very easy to implement without putting any stress on the database.
If it's a SQL database, the threads are probably retrieved using an sproc that doesn't and can't take any user-specific parameters (just generic ones like forum ID and how far back to retrieve posts from), so changing the database itself to handle the issue would be nearly impossible. That's what I was originally thinking about but then I realized that there's no need to change the database at all.
Since the PHP script has to parse through all the returned records anyway to display them, all Del would have to do is stick an extra 2 or 3 lines in the PHP script with an "if" statement that checks against the ignore list and just doesn't display the record if the user is ignored. So we're not trying to modify the query's result set, just ignore some of the records inside it. I think that's essentially what the "in-thread" viewer script already does, it's just not implemented in the thread "list" script.
The thread count might end up being wrong, but in that case you could just add one more line to the if statement that decrements it for every record that gets ignored.
That should be pretty simple, right Del? I know you're a busy guy but I think this is actually a lot more straightforward than it seemed at first. 
___________________
My party schedule:
2009-02-21 - DJ Attention @ I'm So Popular
2009-06-18 - DJ Annoying @ People Need To Know Where I'll Be
2012-11-32 - DJ Insufferable ɸ Or At Least the Stalkers I Complain About
2048-06-66 - Spastic & Whocares ¶ Although I'm Actually Flattered
9999-45-81 - Tweaker Gimp ☼ I Probably Won't Even Go To This But I Have To Make Sure I Fill Up All The Available Space Here
|
|
Oct-07-2004 23:26
|
|
|
 |
 |
StereoPrincess
sassy one-piece

Registered: May 2001
Location: SPFRI
|
|
|
Oct-08-2004 17:52
|
|
|
 |
 |
|  |
All times are GMT. The time now is 01:15.
Forum Rules:
You may not post new threads
You may not post replies
You may not edit your posts
|
HTML code is ON
vB code is ON
[IMG] code is ON
|
|
|
|
|
|
Contact Us - return to tranceaddict
Powered by: Trance Music & vBulletin Forums
Copyright ©2000-2026, Jelsoft Enterprises Ltd.
Privacy Statement / DMCA
|