PDA

View Full Version : multi-page links in forum display last page hack


05-29-2000, 02:47 PM
One of the suggestions in the Suggestions Forum is, when having the board shorten the multi-page list in forumdisplay, have it include a link to the last post in the thread. This will do that, and adds a toggle to the control panel.

In forumdisplay.php

Find:

$pagenumbers.=" more... ";


Replace with:

/*
* Multi page display hack by Moonwolf
*/
if ($displastpage==1) {
if ($totalpages!=$maxmultipage) {
$pagenumbers.= " ... ";
}
$pagenumbers.=" <a href=\"showthread.php?threadid=$thread[threadid]&pagenumber=$totalpages\">$totalpages</a> ";
} else {
$pagenumbers.=" more... ";
}
/*
* End Multi page display hack
*/


In options.php

Find:

<tr><td colspan=2>The number of threads to display on a forum page before splitting it over multiple pages.<br></td></tr>


Add below:

<tr>
<td><b>maxmultipage</b></td>
<td><input type=\"text\" size=\"35\" name=\"newoption[maxmultipage]\" value=\"$maxmultipage\"></td>
</tr>
<tr><td colspan=2>When linking to multiple pages in the forum display, this allows you to set the cut off point on which long posts stop adding more page numbers and are replaced by 'more...'<br></td></tr>


And you're all set. You can use the control panel to set whether or not to list "1 2 more ..." or "1 2 ... 8".

Enjoy

Katherine

05-29-2000, 03:27 PM
Very nice! Thanks! :D

05-29-2000, 03:39 PM
How about the bug where Moonwolf's post in this thread is widening the table?

05-29-2000, 03:43 PM
That is due to Johns template, and nothing to do with the code, although if he starts releasing it with these exact templates, then I guess they should be fixed before that:)

05-29-2000, 03:51 PM
UBB had the same problem, it's how [code] tags are processed if I remember.

Katherine

05-29-2000, 03:58 PM
Actually this is not due to the code tags. The stretching of the tables is, but not the distortion of the table as you can see in your post above, this is a new problem due to the templates.:)

05-29-2000, 03:59 PM
I should say I believe that is the case :D

05-29-2000, 04:58 PM
This board just has each different reply in a different table, so all the content isn't in one huge table (good for loading). So, if someone's post stretches out the layout, it only stretches out that post. It's not a bug. :)

05-29-2000, 05:11 PM
Well the 'feature' should be resolved as it is visually distracting and down-right ugly imho.

05-29-2000, 05:21 PM
It is no worse than the default way. The code tag is supposed to preserve code, so how do you propose that to be possible without distortion?

05-30-2000, 01:21 AM
Good point, especially considering problems with putting lines that should be one line in source on multiple lines in the thread. For those not used to hacking their code it could make for all sorts of problems.

Katherine