vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   "In reply to" Hack (threaded info for linear users) (https://vborg.vbsupport.ru/showthread.php?t=61490)

coloradok5 12-10-2004 10:23 PM

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

WetWired 12-10-2004 11:50 PM

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.

coloradok5 12-11-2004 05:14 AM

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.

WetWired 12-11-2004 04:31 PM

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]

MickDoneDee 12-11-2004 07:03 PM

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 -->


MickDoneDee 12-11-2004 07:16 PM

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>


coloradok5 12-11-2004 08:03 PM

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.

coloradok5 12-12-2004 12:29 AM

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?

WetWired 12-12-2004 02:13 AM

Do you mean the option
Automatically Quote Post / Thread Title
in
Message posting and eding options?

coloradok5 12-12-2004 02:23 AM

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:


All times are GMT. The time now is 05:48 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.01097 seconds
  • Memory Usage 1,796KB
  • 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
  • (11)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete