Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: 1.00, by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

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.

Comments
  #32  
Old 03-02-2002, 10:48 AM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is definately a bug with this of some sort, it's that to see the 1st post on my board, you have to click 'contract all'

So I just have to edit my template. Maybe you could mention this in your first post Firefly? Thanks to the guy who said about this
Reply With Quote
  #33  
Old 03-02-2002, 02:24 PM
SirSteve SirSteve is offline
 
Join Date: Oct 2001
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have the same hack installed (contract/expand) and mine works just fine. I do have another bug though...

Warning: Missing argument 2 for getpostbit() in /usr/www/users/gandalf/starwarsguide.com/forums/admin/functions.php on line 57
Reply With Quote
  #34  
Old 03-02-2002, 04:04 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Gang, this is a very easy hack to do but it can take hours of work to get the templates right - depending on what you want to do with it. If these directions aren't quite right, check out the original instructions on vbulletin.com.

Amy
Reply With Quote
  #35  
Old 03-02-2002, 04:19 PM
SirSteve SirSteve is offline
 
Join Date: Oct 2001
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by amykhar
Gang, this is a very easy hack to do but it can take hours of work to get the templates right - depending on what you want to do with it. If these directions aren't quite right, check out the original instructions on vbulletin.com.

Amy
Can you provide the direct link? Thanks.
Reply With Quote
  #36  
Old 03-02-2002, 06:06 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Amy. It took me a while to figure out that the invisble post was because it was 'minimised', to only visible when I clicked expand all. Then I had to setup the template to counter this. Once I did it now works like a dream.
Reply With Quote
  #37  
Old 03-02-2002, 06:17 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If anyone wants the template I've used to make this:


Use and modify this: (NOTE: this uses the expand/contract hack!)
Code:
<table bgcolor="{pagebgcolor}" width="90%" cellpadding="0" cellspacing="0" border="0"><tr><td width="10"><img width="10" height="1" src="{imagesfolder}/space.gif" alt=""></td><td width="100%"><!-- spacer -->

<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<DIV id="p$post[postid]h" style="display:$ph">
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr>
	<td bgcolor="$post[backcolor]" valign="top" nowrap><nobr>$plusimg <normalfont>This news item was posted at <a href="http://www.racesimcentral.com" target="_blank">Racesim Central</a> or <a href="http://www.gplea.org" target="_blank">GPLEA.org</a> at
      $post[posttime] $post[postdate]</nobr></td>
</tr>
</table>
</DIV>

<DIV id="p$post[postid]e" style="display:$pe">
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr>
	<td bgcolor="$post[backcolor]" valign="top" nowrap>
    <p align="left">
	<a name="post$post[postid]"></a>
    $post[firstnewinsert] <nobr>$minusimg <normalfont>This news item was posted at <a href="http://www.racesimcentral.com" target="_blank">Racesim Central</a> or <a href="http://www.gplea.org" target="_blank">GPLEA.org</a> at
    $post[posttime] $post[postdate]</nobr>
    <p align="center"><nobr> </normalfont></nobr></p>
      <table border="0" align="center" width="90%" cellpadding="3" cellspacing="1"><tr><td><normalfont><b>News:</b></normalfont></td></tr><tr><td style="BORDER: #000000 1px solid; COLOR: black; FONT-FAMILY: Verdana,Arial; BACKGROUND-COLOR: #D0D0D0;"><normalfont>$post[message]</normalfont></td></tr></table>
      <p align="center"><br><smallfont>News Item: $usertherdcoun | Forum News Views: $personal<br>
<b>ADMIN:</b> <smallfont><a href="http://www.racesimcentral.com/news.html" target="_blank">POST RSC</a> | <a href="http://gplea.racesimcentral.com/news.html" target="_blank">POST GPLEA</a> | <a href="editpost.php?s=$session[sessionhash]&amp;action=editpost&amp;postid=$post[postid]">EDIT</a>
      $post[iplogged]<br><b>USERS:</b> <a href="http://forum.racesimcentral.com/newthread.php?s=$session[sessionhash]&action=newthread&forumid=122" target="_blank">SUPPLY RSC NEWS</a> | <a href="mailto:kotr@gmx.net">SUPPLY GPLEA NEWS</a> | <a href="search.php?s=$session[sessionhash]&amp;action=finduser&amp;userid=$post[userid]">SEARCH</a>&nbsp;|
      <a href="newreply.php?s=$session[sessionhash]&action=newreply&postid=$post[postid]">QUOTE</a></p>
    </td>
	
</tr>
</table>
</DIV>
</td></tr></table>

<!-- spacer --></td><td width="10"><img width="10" height="1" src="{imagesfolder}/space.gif" alt=""></td></tr></table>
Reply With Quote
  #38  
Old 03-02-2002, 07:27 PM
SirSteve SirSteve is offline
 
Join Date: Oct 2001
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is your style still showing the other forum options like Author, New Thread and Post/Reply buttons?
Reply With Quote
  #39  
Old 03-03-2002, 01:10 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes it is - but I need it to anyway
Reply With Quote
  #40  
Old 03-03-2002, 01:14 PM
SirSteve SirSteve is offline
 
Join Date: Oct 2001
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you see a way of getting rid of it?
Reply With Quote
  #41  
Old 03-16-2002, 05:01 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No because the first post hack this is just edits what's shown on my screenshot, and then only on the first post. But what you want to do can be done (VERY EASILY).

Create another set of templates, edit the showthread and postbit templates, then under 'Forums & Moderators' click modify, then edit the forum you want to use those templates, and simply under 'Style Options' select the style you want it to use then 'yes' to 'Override users custom styles'...

There ya go.

I'm sure someone with a bigger talkin tongue can type this out for more of an explanation.
Reply With Quote
  #42  
Old 03-18-2002, 06:31 AM
mas404 mas404 is offline
 
Join Date: Nov 2001
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it is not working
same problem wich SirSteve had !!!

also i have expand/contract hack installed .. what i should do now?
Reply With Quote
  #43  
Old 03-18-2002, 07:30 AM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HOW is it not working? SOME details might help

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
Reply With Quote
  #44  
Old 05-01-2002, 07:33 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack. thanks firefly. i needed exacly this.
Reply With Quote
  #45  
Old 06-04-2002, 02:47 AM
The Piper's Avatar
The Piper The Piper is offline
 
Join Date: Apr 2002
Location: Brazil
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:

Original Code:
Code:
  eval("dooutput(\"".gettemplate("showthread")."\");");
Modified Code:
Code:
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...

Thanks a lot!

Paulo
Reply With Quote
  #46  
Old 07-27-2002, 01:22 AM
hamoe hamoe is offline
 
Join Date: Jul 2002
Location: oregon
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For those who had a problem like this one:

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
Reply With Quote
Reply


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 06:28 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.05481 seconds
  • Memory Usage 2,364KB
  • Queries Executed 30 (?)
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
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (16)post_thanks_box
  • (16)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (16)post_thanks_postbit_info
  • (15)postbit
  • (16)postbit_onlinestatus
  • (16)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete