![]() |
[QUOTE]Originally posted by bira
FireFly you must have the same checks or this file will become a way for users to look at hidden threads, for example. I stripped off what clearly isn't needed (like go to next/last thread, like go to newest post, etc). But you still have to make the same "work" as you would for showthread: [...] In short, you treat it almost exactly like you'd treat a thread. Well, it IS a thread. Just only one poster's messages in it :) |
oh, I see what you mean, sorry! ahahaha, sorry - I completely misunderstood you :)
That's nifty - I didn't think of doing what you did :blush: I can only see one small change, really, but that can be overcome easily, so I'll edit the first post now and post the new lean version of the hack :D Thanks |
... or has Kaizen would say, "the penny has dropped for you". :p
[QUOTE]Originally posted by bira I can only see one small change, really, but that can be overcome easily, so I'll edit the first post now and post the new lean version of the hack :D |
Actually I prefer it in a separate file, FireFly - less calls and code parsing. There's no need to parse the entire showthread.php code for this function, hence I'd rather separate them and be more economic.
If, however, you prefer to only edit showthread.php, then what you did is not enough. Do the following: 1) Find Code:
if ($goto=="nextnewest") { Code:
if (($goto=="nextnewest") && (!isset($postuserid))) { Code:
if ($goto=="nextoldest") { Code:
if (($goto=="nextoldest") && (!isset($postuserid))) { 3) Find Code:
// draw nav bar Code:
// draw nav bar Code:
if ($thread[pollid]) { Code:
if (($thread[pollid]) && (!isset($postuserid))) { Code:
$postscount=$DB_site->query_first("SELECT COUNT(*) AS posts FROM post WHERE post.threadid='$threadid' AND post.visible=1"); Code:
$postscount=$DB_site->query_first("SELECT COUNT(*) AS posts FROM post WHERE post.threadid='$threadid' ".iif(isset($postuserid), "AND post.userid='$postuserid'", "")." AND post.visible=1"); Code:
$getpostids=$DB_site->query(" Code:
$getpostids=$DB_site->query(" 7) Find Code:
$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage"); Code:
$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid".iif(isset($postuserid), "&postuserid=$postuserid", "")."&perpage=$perpage"); Cheers, Bira |
Thanks bira for letting me know. :)
I actually only did the 3rd, 5th, 6th and 7th changes you listed, the others are really minor and not worth it. :) Oh, and you have one ." too many here, and also something else: :) Code:
$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage".iif(isset($postuserid), "&post.userid='$postuserid", "")."); |
redid that line for clarity's sake :)
|
You forgot to remove the dot between post and userid in that line. ;)
Sorry for being petty. :) |
argh, bloody hell, heh. I'm not focused today, think I'll go have dinner and watch telly. Shouldn't be messing with code in my state :D
|
A seperate file is very appealing, ease of installation and bug hunting, less rehacking to do before an upgrade and if all hacks were *somehow* made this way we could keep our support for unedited files. Just a thought, as they say.
What are the disadvantages of using many files? |
[QUOTE]Originally posted by Martz
What are the disadvantages of using many files? |
All times are GMT. The time now is 01:46 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|