![]() |
"In reply to" Hack (threaded info for linear users)
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. |
not a bad hack at all :)
|
:) I think it's very useful too .. nice work.
|
Changed to version 1.01 (updated the hack file in the original post). There was a missing field in two querys. Surprised it worked at all.
|
This is what i wanted !
BIG THANX ! Acido clicks Install |
Quote:
|
Quote:
The main style on my forum doesn't have post numbers currently, (I don't like them 'cause they change whenever a post is deleted and so are pretty much useless) so I didn't think of that. [edit]Okay, this is great: The post numbering behavior varies from display mode to display mode, too. Since the numbers used for the display by the hack would be regenerated every view, I guess it can work for that, but I seriously question why the post numbers were added in the first place.[/edit] |
Short description?!
|
Quote:
The simplest explanation is to simply look at the example screenshot. Besides that, the second sentence in my post: Quote:
|
Nice. "Waits for activity hack to be released" :p
[high]* Logikos Clicks install.[/high] |
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. I decided that using the beginning of the post instead of "untitled post" was better than using the post number both from usability and overhead perspectives. |
Very cool! Installed w/o a hitch.
Thanks! :D |
It's a very nice hack, but you might want to consider renaming it since the search engine on this site won't search for "regarding".
Cheers |
Hmm, I changed the thread name, but I really don't know anything more searchable that describes it.
|
What happens if someone replies to another post inside the thread ... instead of the first post?
|
Quote:
It shows which post inside the thread that a person replied to. |
Quote:
In your txt document at the bottom you said: "The following is an example of the code that you might add to the postbit or postbit_legacy and (optionally) to postbit_deleted, postbit_ignore, and postbit_ignore_global templates, which demonstrates the use of all variables:" I've only added the template change to postbit. How can I view these other templates you mention - postbit_deleted, postbit_ignore, and postbit_ignore_global templates - to decide whether to add the same changes to them. I don't know what these other templates do. |
You need to expand the Postbit Templates:
Postbit Templates [» «] * postbit [Customize] * postbit_attachment [Customize] * postbit_attachmentimage [Customize] * postbit_attachmentmoderated [Customize] * postbit_attachmentthumbnail [Customize] * postbit_deleted [Customize] * postbit_ignore [Customize] * postbit_ignore_global [Customize] * postbit_ip [Customize] * postbit_legacy [Customize] * postbit_onlinestatus [Customize] * postbit_reputation |
Sorry Live Wire, my question was not clear. How can I view those templates in the forum to see the effect of the changes? I know where to see the effect of postbit changes in the showthread display. Where can those other templates be viewed within the forum?
postbit_deleted Is that the postbit left after a post has been soft-deleted? postbit_ignore Is that the postbit left from a poster on someone's Ignore List? postbit_ignore_global Is that the postbit left from a poster on the Global Ignore List? |
Quote:
|
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. :o |
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]&postcount=$post[postcount]" target="new"><strong>$post[postcount]</strong></a></if> Code:
<if condition="isset($post['re_postid'])"> Code:
<!-- message --> Code:
<if condition="isset($post['re_postid'])"> If you still have trouble with this, you can ICQ me. |
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. |
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"> Code:
<div class="normal" style="float:$stylevar[left];width:14em"> http://mydomain.com/forum/newreply.php?do=newreply&p=478835 becomes http://mydomain.com/forum/newreply.php?do=newreply&p=478835&noquote=1 [/edit] |
Quote:
Code:
<!-- controls --> Code:
<!-- controls --> |
Quote:
Code:
|
Quote:
My server is up now, I didn't want to power up, always something. |
Quote:
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? |
Do you mean the option
Automatically Quote Post / Thread Title in Message posting and eding options? |
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: |
That's what the option I pointed out controls, if I understand correctly. Realize, however that this takes effect at post time, and will not be retroactively applied.
|
Quote:
The following additional variables will be defined for posts that don't begin a thread: $post[re_postid] --The ID of the parent post. $post[re_title] --The title of the parent post. $post[re_tittype] --Type of title: 1-actual title, 2-start of post, 0-no suitable content found $post[re_userid] --ID of the user who posted the parent post, or 0 if a quest posted it. $post[re_username] --Username of the user who posted the parent post $post[re_url] --URL to parent post. If the post is on the same page, this will just move the position on the page. If the post is not on the same page, this will Do I need to put them somewhere in postbit? |
They were already part of the example code to add to the postbit. I explained them all fully so that admins could set it up in their postbit however they liked (for instance exactly copying UBB threads).
|
Quote:
|
Hmmm, I redid everything and still the default title gets displayed even though it shouldn't, any ideas?
http://coloradok5.com/forums/showthread.php?t=123231 |
Quote:
UPDATE post SET title="" WHERE title LIKE "Re: %" This will remove all titles starting with Re: and allow the in reply hack to use the starting lines. |
Quote:
Admin CP -> vBulletin Options -> Automatically Quote Post / Thread Title If you enable this setting, the title field of new posts will be filled with the thread or parent post's title, prefixed by 'Re: '. The user can still edit it if they wish. If you disable this setting, the title box will be blank by default. |
Ahhh, OK cool. :cool: Is there anyway to also not have the icon and hor. rule display?
http://coloradok5.com/forums/showthr...=1#post1089917 |
Quote:
|
Kick ass, it works perfect now, I didn't know those settings were there. :rolleyes:
Thanks for all the help. |
All times are GMT. The time now is 05:35 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|