PDA

View Full Version : Show Thread Enhancements - Neater Postbit Legacy Fields


Adam21
05-26-2007, 10:00 PM
Hi.I would like to share my postbit_legacy template codes with you guys.Here's another way to make your postbit legacy info look neater.Your Post counts,Location and any other info which you want,can be 'boxed' up nicely under your avatar.This should work in most versions of vb i believe and should be able to use it in the postbit template too though i havent try that out yet.Anyway,here how to do it....

1)In your Admincp,under Style Manager,Main CSS options,add inside the Additional CSS box


.postdata {
border-top: solid 1px #E0E0E0;
border-left: solid 1px #E0E0E0;
border-right: solid 1px #D7D7D7;
border-bottom: solid 1px #D7D7D7;
margin: 3px 5px;
padding: 2px;
color: #808080;
background: #FFFFFF;
font-size: 10px;
}
and click Save

NOTE:You should change the color of the background of the box or size accordingly to the style you are using.

2)In your AdminCP,Style Manager,Edit Templates options,go to edit the Postbit_Legacy option,under this code,

<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
<if condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>



Edit the relavent <div> tags that you wish to become enclosed in the box to become <div class="postdata">.Meaning,you should get something like this

<if condition="$post['joindate']"><div class="postdata">$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div class="postdata">$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"> <div class="postdata">$vbphrase[age]: $post[age]</div></if>
<div class="postdata">
$vbphrase[posts]: $post[posts]
</div>
<if condition="$show['infraction']"><div class="postdata">$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>


See those changes i've made in red to what i meant.You can have as many details as enclosed neatly in the boxes and in what colors as you wish(just edit the values in the Step 1)

Screenshot below.I'm just sharing what i think is neat,i'm not a designer nor coder,so dont be hard on me!Thanks for reading!:)

Luky
05-27-2007, 07:08 AM
Some styles box them by default ^^

Jibba Jabbas
05-27-2007, 09:29 AM
Brilliant thanks a lot for this!

Kap O
05-27-2007, 10:07 PM
thanks

JamieLee2k
05-28-2007, 08:48 AM
So if I add more profile fields does that mean I have to edit them too with the ones you put in red?

Adam21
05-28-2007, 10:03 AM
So if I add more profile fields does that mean I have to edit them too with the ones you put in red?

Yup.Just add in the ones in red.

killa101
05-28-2007, 09:48 PM
I have been looking for this for a while now. Good addition. Some questions though.

1. What is the point of ".usertitle { color: #444; }" ?

2. In the .postdata, what does "color: #808080;" do?

3. How do I get the boxes to be fully left aligned with everything else in the postbit? Currently it is indented a bit.

Adam21
05-29-2007, 09:07 AM
I have been looking for this for a while now. Good addition. Some questions though.

1. What is the point of ".usertitle { color: #444; }" ?

2. In the .postdata, what does "color: #808080;" do?

3. How do I get the boxes to be fully left aligned with everything else in the postbit? Currently it is indented a bit.

1)Ah.sorry,my wrong,that's part of my whole add.css codes i just added.its not necessary for the postbit legacy fields.you can omit that out if you wish

2)tha'ts the color you can change it as you wish.try playing around with it to suit your styles

3)what you mean by align with everything else in the postbit?try add the texts without the brackets [align="left"] after the <div tag and see? you have a screenshot?

whiteeagle0
05-29-2007, 07:54 PM
Won't Work For Me :(

Look At The Screen Shot It Does Nothing :(


I Added The <div class"postdata"> and it doesn't do anything :(

can you possibley add them for me


<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<if condition="$show['announcement']">
<td class="thead" style="font-weight:normal" colspan="2">
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" />
<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
</td>
<else />
<td class="thead" style="font-weight:normal" $post[scrolltothis]>
<!-- 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>
$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
$post[firstnewinsert]
<!-- / status icon and date -->
</td>
<td class="thead" style="font-weight:normal" align="$stylevar[right]">
&nbsp;
<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a></if>
<if condition="$show['inlinemod']">
<input type="checkbox" name="plist[$postid]" id="plist_$postid" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" onclick="inlineMod.toggle(this)" />
</if>
</td>
</if>
</tr>
<tr valign="top">
<if condition="$show['moderated']">
<td class="alt2" id="td_post_$post[postid]">
<else />
<td class="alt1" id="td_post_$post[postid]">
</if>

<if condition="$show['messageicon'] OR $post['title']">
<!-- 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 -->
</if>

<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->

<if condition="$show['attachments']">
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">

<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachmentlink']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[imageattachmentlinks]
</table>
</fieldset>
</if>

<if condition="$show['otherattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_files]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[otherattachments]
</table>
</fieldset>
</if>

<if condition="$show['moderatedattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attachments_pending_approval]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[moderatedattachments]
</table>
</fieldset>
</if>

</div>
<!-- / attachments -->
</if>

<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>

<if condition="$show['postedited']">
<!-- edit note -->
<div class="smallfont"> <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<em>
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
<if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
</em>
</div>
<!-- / edit note -->
</if>

</td>
<td class="alt2" width="175">

<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>

<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>

<if condition="$show['avatar']">
<div class="smallfont">
&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if>
<div class="smallfont">
&nbsp;<br />
<!-- Start Post Thank You Hack -->
<br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="72">Thanks: </td>
<td width="288">$post[post_thanks_user_amount]</td>
</tr>
<tr>
<td>Thanked: </td>
<td>$post[post_thanks_thanked_times]</td>
</tr>
<tr>
<td>Longevity: </td>
<td><img src="$stylevar[imgdir_misc]/activity/long$WWU002_longevitylevel.gif" class="i" title="$WWU002_longevityinfo" alt="$WWU002_longevitylevel/20" /></td>
</tr>
<tr>
<td>Activity: </td>
<td><img src="$stylevar[imgdir_misc]/activity/activity$WWU002_activitylevel.gif" class="i" title="$WWU002_activityinfo" alt="$WWU002_activitylevel/20" /></td>
</tr>
<div class="postdata">
<tr>
<td><img src="$stylevar[imgdir_misc]/activity/texttoday.gif"></td>
<td><img src="$stylevar[imgdir_misc]/activity/today{$WWU002_todaylevel}_$WWU002_maxtodaylevel.gi f" class="i" title="$WWU002_todayinfo" alt="$WWU002_todaylevel/$WWU002_maxtodaylevel" /></td>
</tr>
</div>
<tr>
<td><img src="$stylevar[imgdir_misc]/activity/textposts.gif"></td>
<td><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd1.gif" class="il" alt="$WWU002_postsd1" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd2.gif" class="im" alt="$WWU002_postsd2" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd3.gif" class="im" alt="$WWU002_postsd3" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd4.gif" class="im" alt="$WWU002_postsd4" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd5.gif" class="im" alt="$WWU002_postsd5" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd6.gif" class="im" alt="$WWU002_postsd6" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd7.gif" class="im" alt="$WWU002_postsd7" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd8.gif" class="im" alt="$WWU002_postsd8" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd9.gif" class="ir" alt="$WWU002_postsd9" /></td>
</tr>
<tr>
<td>Location: </td>
<td>$post[field2]</td>
</tr>
<tr>
<td>Age: </td>
<td>$post[age]</td>
</tr>
<tr>
<td>Reputation: </td>
<td>$post[reputationdisplay]</td>
</tr>
<tr>
<td>Contact: </td>
<td>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</td>
</tr>
</table>
</td>

<tr>
<if condition="$show['moderated']">
<td class="alt2" align="$stylevar[right]">
<else />
<td class="alt1" align="$stylevar[right]">
</if>
<!-- controls -->
<if condition="$post['editlink']">
<img style="display: none" id="progress_$postid" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" />
<a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><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]" rel="nofollow"><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="$show['multiquote_post']">
<a href="$post[replylink]" rel="nofollow" onclick="return false"><img src="$stylevar[imgdir_button]/multiquote_<if condition="$show['multiquote_selected']">on<else />off</if>.gif" alt="$vbphrase[multi_quote_this_message]" border="0" id="mq_$post[postid]" /></a>
</if>
<if condition="$show['quickreply'] AND !$show['threadedmode']">
<a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
</if>
<if condition="$show['moderated']">
<img src="$stylevar[imgdir_misc]/moderated.gif" alt="$vbphrase[moderated_post]" border="0" />
</if>
<if condition="$show['deletedpost']">
<img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[deleted_post]" border="0" />
</if>
<if condition="$show['redcard']">
<a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/redcard.gif" alt="$vbphrase[received_infraction]" border="0" /></a>
<else />
<if condition="$show['yellowcard']">
<a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/yellowcard.gif" alt="$vbphrase[received_warning]" border="0" /></a>
</if>
</if>

<!-- / controls -->
</td>
<td class="alt2">
$post[onlinestatus]
<if condition="$show['reputationlink']"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" border="0" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" /></a></if>
<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a></if>
$post[iplogged]
&nbsp;
</td>
</tr>
</table>

<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$post[username]</td>
</tr>
<if condition="$show['profile']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
</if>
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['emaillink']">
<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['homepage']">
<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
</if>
<if condition="$show['search']">
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_more_posts_by_x]</phrase></a></td></tr>
</if>
<if condition="$post['userid'] AND $show['member']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
</if>
</table>
</div>
<!-- / post $post[postid] popup menu -->

<if condition="$show['spacer']">
</div>
$spacer_close
</if>
<!-- / post #$post[postid] -->


I Removed Them All In This Template So You Can Add Them Becuase I Have No Clue Why It's Not Working :(


It Doesn't Change The Template At All

Screenshot Attached

Adam21
05-30-2007, 01:45 AM
Just add the tag <div class="postdata"> before the fields e.g Age: $post[age] and </div> after it.Add another <br /> to make the next field below and remove all those <td> tags in the original codes.

killa101
06-06-2007, 01:27 PM
1)Ah.sorry,my wrong,that's part of my whole add.css codes i just added.its not necessary for the postbit legacy fields.you can omit that out if you wish

2)tha'ts the color you can change it as you wish.try playing around with it to suit your styles

3)what you mean by align with everything else in the postbit?try add the texts without the brackets [align="left"] after the <div tag and see? you have a screenshot?

Hey thanks for your response, I got everything sorted now.

in regards to number 2, "color" didnt seem to do anything as background set the background colour and the border colours were set by the the border attributes.

in regards to number 3, for some reason on mine the tables were indented. I dont know how better to explain it but I got it sorted now by playing with the margin.

Now I want to add a note to this mod. If you want to put your messenger icons in one of these tables, then you will need to add a conditional around the icons div tag that will make the table hidden if the person does not fill out any messengers. I had to do this on mine at least. Here is the conditional.

<if condition="$post[icqicon] OR $post[aimicon] OR $post[msnicon] OR $post[yahooicon] OR $post[skypeicon]">

So your full messenger part should look like this:

<if condition="$post[icqicon] OR $post[aimicon] OR $post[msnicon] OR $post[yahooicon] OR $post[skypeicon]"><div class="postdata">$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div></if>

hexus.net
06-16-2007, 08:57 PM
Works perfectly, cheers :)

inteller2k7
06-20-2007, 07:25 PM
Could someone fix it up for me cant seen to get the reputation and thanks under this this is what i have could someone give me the fixed version

<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
$template_hook[postbit_userinfo_right]

MiahBeSmokin420
07-05-2007, 04:37 PM
why do i get this error when i try to add

VIEW Attached Screen Shot

.postdata {
border-top: solid 1px #E0E0E0;
border-left: solid 1px #E0E0E0;
border-right: solid 1px #D7D7D7;
border-bottom: solid 1px #D7D7D7;
margin: 3px 5px;
padding: 2px;
color: #808080;
background: #FFFFFF;
font-size: 10px;
}

into the

Main CSS options,add inside the Additional CSS box

any help would be great full

also i amd useing

vB version 3.6.7

MiahBeSmokin420
07-05-2007, 09:53 PM
why do i get this error when i try to add

VIEW Attached Screen Shot

.postdata {
border-top: solid 1px #E0E0E0;
border-left: solid 1px #E0E0E0;
border-right: solid 1px #D7D7D7;
border-bottom: solid 1px #D7D7D7;
margin: 3px 5px;
padding: 2px;
color: #808080;
background: #FFFFFF;
font-size: 10px;
}


into the


Main CSS options,add inside the Additional CSS box



any help would be great full

also i amd useing

vB version 3.6.7

common people any ideas?

Adam21
07-06-2007, 09:05 PM
common people any ideas?

This error is not related to this modification.

Adam21
07-06-2007, 09:06 PM
Could someone fix it up for me cant seen to get the reputation and thanks under this this is what i have could someone give me the fixed version

<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
$template_hook[postbit_userinfo_right]

Try this


<if condition="$show['reputation']"><div class="postdata"><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
$template_hook[postbit_userinfo_right]

MiahBeSmokin420
07-07-2007, 05:05 AM
This error is not related to this modification.

ok thanks i acculy figured out what it was

i disabled

users defined reputaion points and it let me add it

so thanks for you help

i know you didnt do much but

just letting me know that it has to be something else helped me enough to disable other sheit

Ohiosweetheart
07-25-2007, 03:57 PM
This has been done by a few different designers. Some are adding it into their skins as well.

I like it on some skins. While on other skins, I prefer to use fieldset around the postbit info.

LjubavnaZona
08-05-2007, 12:38 AM
I am not sure what I was doing wrong but whatever I did I wasnt able to make it look like yours... but I wanted it. :) Sorry!

Mixibiza
12-18-2007, 05:10 AM
Nice... Looks good. Thanks :)

iulianh
12-26-2007, 03:12 PM
Thanks , really nice tutorial . I installed it :)

bxbigt
02-11-2008, 02:58 AM
update for 3.7 ?

xxshatteredsoul
02-16-2008, 02:47 AM
Just thought I would add this for anyone using arcade

find:
$post[crowns]$post[champtext]

replace with:
<if condition="$post[crowns] or $post[champtext]"><div class="postdata">$post[crowns] $post[champtext]</div></if>

I copied it and pasted it below this or you can place it wherever you think looks best
<if condition="$post[icqicon] OR $post[aimicon] OR $post[msnicon] OR $post[yahooicon] OR $post[skypeicon]"><div class="postdata">$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div></if>

:D

TonyComix
03-24-2008, 11:45 PM
I have a problem, apparently when I put it in, the fields that are boxed are repeating themselves. So I have the Join Date, etc. inside and outside of the boxes.

chimaira
01-09-2009, 07:53 PM
Thanks for this