Version: 1.00, by Admin (Coder)
Developer Last Online: Nov 2024
Version: 2.2.x
Rating:
Released: 02-17-2002
Last Update: Never
Installs: 23
No support by the author.
This is a rather old hack I did some time ago for someone, but never really released it as a full hack.
Very simple, this hack lets you change the template the first post is using (in either all forums or only one), so it can look differently.
Great for article and review forums.
Before installing the hack, create a new template named "postbit_first" from the current "postbit" template. After you're done, you can edit that template and it will control the first post in the threads.
Everything else you need is in the attached file, have fun!
Chen
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
For example, if it's showing no post, and just showing the reply/post bars above and below where the post should be then your postbit_first template needs to be expanded due to the expand/contract hack. So just redo the template. If that's not your problem, give us some info
I was trying to do as SirSteve suggested, to remove the Author/Thread/New Thread/Post Reply bit in the beginning of the post, and to have it only after the first post. So, I thought I could modify showthread.php like this:
if ($counter==1 and $pagenumber==1 and ($thread['forumid']==6 or $thread['forumid']==7 or $thread['forumid']==8 or $thread['forumid']==4)) {
eval("dooutput(\"".gettemplate("showthread_first")."\");");
} else {
eval("dooutput(\"".gettemplate("showthread")."\");");
}
Then I created a template called showthread_first which did not have that table cell with such things as author, thread, etc.
Unfortunately, that didn't work. I'm a newbie in PHP, but that seemed to have been a good solution for what I was trying to achieve. I'd appreciate any input on this...
Warning: Missing argument 2 for getpostbit() in /usr/www/users/gandalf/starwarsguide.com/forums/admin/functions.php on line 57
It is an easy fix. and maybe firefly can update his hack with this if he feels like it . He has you change the following:
function getpostbit($post) {
To the following:
function getpostbit($post,$templatename) {
How about instead of that, you change it to the following:
function getpostbit($post,$templatename='postbit') {
That makes it so that second argument is optional, and if its not used, it defaults its value to postbit. That means that if any other calls are made to getpostbit() expecting the unhacked version of the function, they will operate as expected
Something else I thought might work would be to allow the first post to use the postbit vb3 while the rest use legacy postbit. This would be sufficiant. Anything like this?