vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Different PostBit - Read More inside (https://vborg.vbsupport.ru/showthread.php?t=60827)

Xyphen 01-27-2004 03:50 PM

Different PostBit - Read More inside
 
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:
PHP Code:

    else if ($ignore["$post[userid]"]/* AND !in_array($post['userid'], explode(' ', $bbuserinfo['buddylist']))*/)
    {
        
$maintemplatename 'postbit_ignore';
    } 

Replace with:
PHP Code:

    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


All times are GMT. The time now is 08:06 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
  • Page Generation 0.01017 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete