PDA

View Full Version : Link to individual posts


DarkReaper
10-29-2001, 10:00 PM
Well, with the newly discovered "view single post" feature I found today, I made some alterations to a hack that was released a while ago, not sure what happened to it.

This allows you to have the postnumber/replynumber of a post in a specific thread shown, and linked to. You can place this wherever you want, I stuck it next to the "IP: Logged" bit.

Open showthread.php. Find this:

while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {


And before it, add this:

$countposts = ($pagenumber-1)*$perpage;


Now a few lines down, find this:

$postbits .= getpostbit($post);


And before it, add this:

$countposts = $countposts+1;


I chose to add this to postbit, I can't really think of any other place for it ;). You can stick it anywhere in postbit that you want, I threw it next to the "IP: Logged" text.

Open your postbit template, find this:

<p align="right"><smallfont><a href="report.php?s=$session[sessionhash]&postid=$post[postid]">Report this post to a moderator</a> | $post[iplogged]</smallfont></p>


And replace it with this:

<p align="right"><smallfont><a href="report.php?s=$session[sessionhash]&postid=$post[postid]">Report this post to a moderator</a> | $post[iplogged] | <a href="showthread.php?s=$session[sessionhash]&action=showpost&postid=$post[postid]">Post $countposts</a></smallfont></p>


That's it!

Justice
10-30-2001, 01:25 AM
good idea for a hack

i got this error though:

Fatal error: Cannot redeclare stripslashesarray() in ./global.php on line 10

DarkReaper
10-30-2001, 01:50 AM
Er....no clue as to why its giving you that. What's line 10? I don't have stripslashesarray() or anything relating to it used anywhere...:confused:

Justice
10-30-2001, 04:47 AM
// get rid of slashes in get / post / cookie data
function stripslashesarray (&$arr) {

those are lines 9 and 10

coincidentally (although maybe not), I never could get the "View Ignored Post" feature to work either. I've seen other people with similar problems. This was before I had even started hacking my vB

DarkReaper
10-30-2001, 10:55 AM
I've got no clue...anyone else have any idea?

eva2000
10-30-2001, 10:57 AM
handy.. i think tubedogg has such a similar thing on his forums for idleworld :)