PDA

View Full Version : Different PostBit - Read More inside


Xyphen
01-27-2004, 03:50 PM
I need to know if someone can tell me how to generate different postbit template.

Eg, A topic is created, the first post of the topic is different then the rest, also this can be customized for different forums by specifying the FORUM ID's to use the custom postbit template for. Just the one first post, and the rest of them different, kind of like someone posts a wallpaper so the first post looks like a Gallery sort of thing or whatever and the rest appear as comments.

Anyone can do that?? if not, thanks anyways.

Something like this in the showthread functions file...

if $forumid = 24 and $postnumber = 1 then fetch template $custompostbit // for the main post part
else if $forumid = 24 fetch template $custompostbit2 // for the comments part

i know its not just a two line thing, but i'm just writing that to let u kno what im talking about, lol

Link14716
01-27-2004, 09:45 PM
You'd be suprised...

In includes/functions_showthread.php find:
else if ($ignore["$post[userid]"]/* AND !in_array($post['userid'], explode(' ', $bbuserinfo['buddylist']))*/)
{
$maintemplatename = 'postbit_ignore';
}Replace with: else if ($ignore["$post[userid]"]/* AND !in_array($post['userid'], explode(' ', $bbuserinfo['buddylist']))*/)
{
$maintemplatename = 'postbit_ignore';
}
else if ($thread['forumid'] == "24" && $thread['firstpostid'] == $post['postid'])
{
$maintemplatename = 'postbit_custom_firstpost';
}
else if ($thread['forumid'] == "24" && $thread['firstpostid'] != $post['postid'])
{
$maintemplatename = 'postbit_custom_otherposts';
}
Then create the two templates postbit_custom_firstpost and postbit_custom_otherposts.

Tell me if it works. :)

Xyphen
01-28-2004, 05:15 PM
Is there a way I can specify that a Specific image code be displayed at a specific place?

like <if condition=$vbcode [image]>

or like a custom field I can add where the user specifies a URL of an image when posting and it is prased as $customimg