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

 
 
Thread Tools
"In reply to" Hack (threaded info for linear users) Details »»
"In reply to" Hack (threaded info for linear users)
Version: 1.10, by WetWired WetWired is offline
Developer Last Online: Sep 2014 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 02-11-2004 Last Update: 02-29-2004 Installs: 23
 
No support by the author.

vB3.0/hack version "frozen"; vB3.5/plugin version released
You can get the plugin for vb3.5 here. There will be no more releases for the vB3.0 version.

Description
This hack allows the display of the title and author of the post that each post is in response to. (See screenshot if clarification is needed)

The purpose of this hack is to provide missing information to linear view mode users. I got the idea from a board I visit that used to be UBB Threads, though my choice of presentation is a bit different.

See the attached screenshot for an example of how this can look. The hack itself only provides the additional items in $post, so it is up to the templates exactly how it looks. (The changes I used are included as an example in the hack instructions)

Complexity
This hack changes one file, requires no queries, and requires changes to one template.

Technical
This hack has been tested on vB3.0.3,vB3.0.0RC4 and vB3.0.0RC2.
It adds 1 query to showthread in linear mode, and adds 1 additional query in linear mode for each consecutive layer of deleted parents of posts displayed on a page. (If a displayed post is a reply to a deleted reply to an undeleted reply to a deleted reply to an undeleted post, 2 total queries are added to showthread, but if a displayed post is a reply to a deleted reply to a deleted reply to a deleted reply to an undeleted post, 4 total queries are added to showthread. If both examples are displayed in the same page, only 4 total queries are added to showthread.)

Update (v1.10 2004-03-01)
Version 1.10 released, which uses the beginning of a post as a title if the post does not have a title, and also trims long titles down to a decent size. Minor optimizations. regardinghackupdate.txt added for existing users, regardinghack.txt updated for new users.

Support
Please click the install button above if you install this hack.

The hack version of this modification will have no further updates, but I will still answer questions in this thread.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 12-10-2004, 10:23 PM
coloradok5 coloradok5 is offline
 
Join Date: Dec 2004
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, I'm not sure I understand the template part, where exactly does this need to be added in the postbit template, and is that all that is needed there?

<if condition="isset($post['re_postid'])">
Posted in reply to <if condition="$post['re_userid']"><a href="member.php?userid=$post[re_userid]">$post[re_username]</a><else />$post[re_username]</if>'s <if condition="$post['re_tittype']!=0">post <if condition="$post['re_tittype']==2">starting</if></if> <a href="$post[re_url]" <if condition="!$post['re_isonpage']">target="_blank"</if>><if condition="$post['re_tittype']==0">untitled post<else />"$post[re_title]"</if></a>
</if>


I get a Parse error: parse error, unexpected T_LIST on line 862? I could have easy messed something up.
Reply With Quote
  #23  
Old 12-10-2004, 11:50 PM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, that looks right; maybe you accidentally pasted it in the middle of something. The where depends on preference and what you've already done to your postbit. In the case of my example image, you would search for
Code:
		<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new"><strong>$post[postcount]</strong></a></if>
in your postbit_legacy template and put it before it, except to left align it, I modified it slightly, so paste
Code:
<if condition="isset($post['re_postid'])">
<span class="smallfont" style="float:left;">
Posted in reply to <if condition="$post['re_userid']"><a href="member.php?userid=$post[re_userid]">$post[re_username]</a><else />$post[re_username]</if>'s <if condition="$post['re_tittype']!=0">post <if condition="$post['re_tittype']==2">starting</if></if> <a href="$post[re_url]" <if condition="!$post['re_isonpage']">target="_blank"</if>><if condition="$post['re_tittype']==0">untitled post<else />"$post[re_title]"</if></a>
</span>
</if>
		&nbsp;
before that part I said to search for. If you don't use legacy postbits, then I would suggest just putting the original code from the hack txt above
Code:
		<!-- message -->
If you wanted to copy UBB threads exactly, BTW, the code would be
Code:
&nbsp;<if condition="isset($post['re_postid'])">
[Re: <a href="$post[re_url]" target="_blank">$post[re_username]</a>]
</if>
And you would put it to the right of the post title. Much simpler, but not as useful ultimately.

If you still have trouble with this, you can ICQ me.
Reply With Quote
  #24  
Old 12-11-2004, 05:14 AM
coloradok5 coloradok5 is offline
 
Join Date: Dec 2004
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, I am getting somewhere now, I re-edited the showthread.php and it works fine, here is what I have so far on my test site:
http://coloradok5.com/vbtestforums/s...d.php?t=123105

I want it to act just like the forum below:
http://www.world-a-team.com/showthread.php?t=1720

I can't quite get the code right to remove the old Re: title setup, I know it involves this code I think:
----------------------------------------------------------------

<!-- icon and title -->

<div class="smallfont">
<if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>
<if condition="$post['title']"><strong>$post[title]</strong></if>
</div>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<!-- / icon and title -->

----------------------------------------------------------------

Any ideas?
Also, what is the best way to handle the reply button on every post like http://www.world-a-team.com has?

Thanks for the help.
Reply With Quote
  #25  
Old 12-11-2004, 04:31 PM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't access your test forum to tell you how to remove whatever, but I can tell you that to place the reply information like world-a-team.com, you should find
Code:
		<div class="normal">
			<!-- status icon and date -->
			<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
			<if condition="!$show['announcement']">
				$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
			<else />
				<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
			</if>
			$post[firstnewinsert]
			<!-- / status icon and date -->
		</div>
and replace it with
Code:
		<div class="normal" style="float:$stylevar[left];width:14em">
			<!-- status icon and date -->
			<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
			<if condition="!$show['announcement']">
				$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
			<else />
				<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
			</if>
			$post[firstnewinsert]
			<!-- / status icon and date -->
		</div>
<if condition="isset($post['re_postid'])">
<div class="normal">
Posted in reply to <strong><if condition="$post['re_userid']"><a href="member.php?userid=$post[re_userid]">$post[re_username]</a><else />$post[re_username]</if></strong>'s <if condition="$post['re_tittype']!=0">post <if condition="$post['re_tittype']==2">starting</if></if> <a href="$post[re_url]" <if condition="!$post['re_isonpage']">target="_blank"</if>><if condition="$post['re_tittype']==0">untitled post<else />"$post[re_title]"</if></a>
</div>
</if>
[edit]Apparently, for the non-quoting reply button, just copy the link for the quoting button, but add "&noquote=1" to the end of the url. For example,
http://mydomain.com/forum/newreply.php?do=newreply&p=478835
becomes
http://mydomain.com/forum/newreply.php?do=newreply&p=478835&noquote=1
[/edit]
Reply With Quote
  #26  
Old 12-11-2004, 07:03 PM
MickDoneDee MickDoneDee is offline
 
Join Date: Mar 2003
Location: Sydney
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by coloradok5
Any ideas?
Also, what is the best way to handle the reply button on every post like http://www.world-a-team.com has?

Thanks for the help.
I'm the admin for www.world-a-team.com and I've added a few hacks including a quick edit, reply without quote and multiquote. So now the controls section looks like:
Code:
   <!-- controls --> 
<if condition="THIS_SCRIPT=='showthread' and !is_browser('opera') and $post['editlink'] and $bbuserinfo[userid]>0">
$quickedit
</if>
<if condition="$post['editlink']"> 
   <a href="$post[editlink]"><img border='0' src='$stylevar[imgdir_button]/edit.gif' alt='$vbphrase[edit_delete_message]' /></a></if> 
<if condition="$SHOWQUICKREPLY AND !$show['threadedmode']"> 
   <a href="$post[replylink]" onclick="return qr($post[postid]);"><img border='0' src='$stylevar[imgdir_button]/quickreply.gif' alt='$vbphrase[quick_reply_to_this_message]' /></a></if> 

<if condition="$post['forwardlink']"> 
   <a href="$post[forwardlink]"><img border='0' src='$stylevar[imgdir_button]/forward.gif' alt='$vbphrase[forward_message]' /></a></if> 

<if condition="$post['replylink']"> 
   <a href="$post[replylink]&amp;noquote=1"><img border='0' src='$stylevar[imgdir_button]/reply_small.gif' alt='$vbphrase[reply]' /></a></if> 


<if condition="$post['replylink']"> 
   <a href="$post[replylink]"><img border='0' src='$stylevar[imgdir_button]/quote.gif' alt='$vbphrase[reply_with_quote]' /></a></if> 


<img src="$stylevar[imgdir_button]/mq_img_off.gif" alt="$vbphrase[multi_quote]" border="0" width="13" height="13" name="mq_post_$post[postid]" id="mq_post_$post[postid]" onclick="multiquote($post[postid], this)" style="cursor: hand" />
   <!-- / controls -->
In original postbit template the code for the forward, reply, quote and edit buttons is:
Code:
			<!-- controls -->
			<if condition="$post['editlink']">
				<a href="$post[editlink]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
			</if>
			<if condition="$post['forwardlink']">
				<a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
			</if>
			<if condition="$post['replylink']">
				<a href="$post[replylink]"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
			</if>
			<if condition="$SHOWQUICKREPLY AND !$show['threadedmode']">
				<a href="$post[replylink]" onclick="return qr($post[postid]);"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
			</if>
			<!-- / controls -->
Reply With Quote
  #27  
Old 12-11-2004, 07:16 PM
MickDoneDee MickDoneDee is offline
 
Join Date: Mar 2003
Location: Sydney
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by coloradok5
I want it to act just like the forum below:
http://www.world-a-team.com/showthread.php?t=1720
The code I use after <!-- / status icon and date --> in the postbit template is:
Code:
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
<if condition="isset($post['re_postid'])">
Posted in reply to <if condition="$post['re_userid']"><strong>$post[re_username]</strong><else />$post[re_username]</if>'s <if condition="$post['re_tittype']!=0">post <if condition="$post['re_tittype']==2">starting</if></if> <a href="$post[re_url]" <if condition="!$post['re_isonpage']">target="_blank"</if>><if condition="$post['re_tittype']==0">untitled post<else />"$post[re_title]"</if></a>
</if>
Reply With Quote
  #28  
Old 12-11-2004, 08:03 PM
coloradok5 coloradok5 is offline
 
Join Date: Dec 2004
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MickDoneDee
The code I use after <!-- / status icon and date --> in the postbit template is:
Code:
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
<if condition="isset($post['re_postid'])">
Posted in reply to <if condition="$post['re_userid']"><strong>$post[re_username]</strong><else />$post[re_username]</if>'s <if condition="$post['re_tittype']!=0">post <if condition="$post['re_tittype']==2">starting</if></if> <a href="$post[re_url]" <if condition="!$post['re_isonpage']">target="_blank"</if>><if condition="$post['re_tittype']==0">untitled post<else />"$post[re_title]"</if></a>
</if>
Man, you guys are great, I will play with this some more tonight, I think I will skip the multi-edit for now and keep it as simple as I can and just have the reply with no quote. This is how VB should come out of the box. :surprised:
My server is up now, I didn't want to power up, always something.
Reply With Quote
  #29  
Old 12-12-2004, 12:29 AM
coloradok5 coloradok5 is offline
 
Join Date: Dec 2004
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MickDoneDee
The code I use after <!-- / status icon and date --> in the postbit template is:
Code:
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
<if condition="isset($post['re_postid'])">
Posted in reply to <if condition="$post['re_userid']"><strong>$post[re_username]</strong><else />$post[re_username]</if>'s <if condition="$post['re_tittype']!=0">post <if condition="$post['re_tittype']==2">starting</if></if> <a href="$post[re_url]" <if condition="!$post['re_isonpage']">target="_blank"</if>><if condition="$post['re_tittype']==0">untitled post<else />"$post[re_title]"</if></a>
</if>
Mick
Thanks, I think I have it. Looking at your site, it looks like if someone replies to a post and does not change the title the original title does not get outputed, how ddi you do that?
Reply With Quote
  #30  
Old 12-12-2004, 02:13 AM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you mean the option
Automatically Quote Post / Thread Title
in
Message posting and eding options?
Reply With Quote
  #31  
Old 12-12-2004, 02:23 AM
coloradok5 coloradok5 is offline
 
Join Date: Dec 2004
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, just like how he got rid of the default "re title name" if it didn't change:

Example
http://www.world-a-team.com/showthread.php?t=1720

Notice how on the first post the default title is displayed: "Current ICC OneDay Championship Table - 5th December 2004"
Then on the following posts they are not, yet on post #6 the user changed the title to: "Zimbabwe / Zimbabyou" and it now displays without the icon.

That is what I would like to do if I could. :up:
Reply With Quote
 


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:32 PM.


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.08417 seconds
  • Memory Usage 2,333KB
  • Queries Executed 25 (?)
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
  • (11)bbcode_code
  • (4)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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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