Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 07-19-2004, 08:01 AM
kira kira is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Change Style of First Post (from vb2 hack)

For vb2, Chen created the very useful "Change Style of First Post" hack that allowed you to create a unique look for the first post in a thread. This gave you the option of making the first post appear more like an article, or even just an image, with the replies within that thread simply look like regular posts. (You could also restrict this layout change to specific forums only, so the rest of your forums could have the regular thread style.)

Here's an example from my site. Only the threads in my "article" forum use this hack.

I know that with the creation of the Articles hack, this may not have as much of a following, but what I liked about this hack was that since these first posts are regular forum posts (just with different template style), they appear within searches.

Is there any interest in creating something like this for vb3, assuming it seems like a useful hack to others? Or is there some other hack that has these capabilities?

Many thanks.
Reply With Quote
  #2  
Old 07-19-2004, 01:03 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You don't need to hack that at all anymore, as it's doable with a postbit template modification

just use
HTML Code:
<if condition="$post['postid'] == $threadinfo['firstpostid']">
first post bit in here
<else />
normal postbit here
</if>
Reply With Quote
  #3  
Old 07-19-2004, 01:13 PM
nexialys
Guest
 
Posts: n/a
Default

you can even do a little change in showthread to select a different template of your choice when doing the first post...

-- maybe someone can do a hack of that kind..
Reply With Quote
  #4  
Old 07-19-2004, 05:55 PM
kira kira is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ooh! Thank you, Xenon. So what I'd do is create a new style for that forum, add that conditional to the postbit template, and voila?

I'm sorry to be so needy. I'm so damn lame when it comes to conditionals and understanding what the various bits of code mean -- like, "firstpostid," I never would've thought of that, even though it seems so obvious. Do the vbulletin documentation pages have a reference section explaining how all these bits and pieces come together?

I do agree with Nexialys, though -- that "template switch" would be a very cool option to offer people.

Anyway, thanks again Xenon.
Reply With Quote
  #5  
Old 07-19-2004, 07:53 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this not tested but it should work ^_^

in showthread.php
find:
PHP Code:
        if ($post['isdeleted'])
        {
            
$template 'postbit_deleted';
        } 
underneath that add:
PHP Code:
        else if($post['postid']==$threadinfo['firstpostid'])
        {
            
$template ='postbit_whatevayouwant';
        } 
Reply With Quote
  #6  
Old 11-14-2004, 02:31 PM
hockyfan hockyfan is offline
 
Join Date: Mar 2003
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm a bit confused as to how to do this; how exactly do I get/make a template for use in a specific forum, and consequently have the first post in that forum look as it does in kira's example?

I can't really use the articles hack since I have a lot of current "threads" which I would need to be made into articles, and apparently there's no way to do that. So changing the templates of that forum would really work well for me.

h
Reply With Quote
  #7  
Old 11-15-2004, 01:25 AM
lancepoint lancepoint is offline
 
Join Date: Sep 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how do i get the template used here on vb. the first post on on a thread thats hosting a hack. . i want to the bold text options on top... etc.
Reply With Quote
  #8  
Old 11-15-2004, 03:35 AM
HiDeo's Avatar
HiDeo HiDeo is offline
 
Join Date: Oct 2003
Posts: 306
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by lancepoint
how do i get the template used here on vb. the first post on on a thread thats hosting a hack. . i want to the bold text options on top... etc.
The modification used here is not released !
Reply With Quote
  #9  
Old 11-15-2004, 09:59 AM
hockyfan hockyfan is offline
 
Join Date: Mar 2003
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And my question.....?

h
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:22 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03986 seconds
  • Memory Usage 2,238KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (8)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete