PDA

View Full Version : Private Messages Enhancements - Show PM postbit rewrite


Nutz
05-29-2007, 10:00 PM
Show PM postbit rewrite

Description
The following template edits will change the default show pm postbit template to that similar to one found here at vB.org (see screenshot).

http://img236.imageshack.us/img236/3608/10464711uf0.gif

Details
2 Template Modification's
Notes
Credit goes to Princeton (https://vborg.vbsupport.ru/member.php?u=925) for coming up with the nicer design for PM's postbit and thanks to him for letting me release my version here. :)
Live demo: https://vborg.vbsupport.ru/private.php?do=newpm ;)

replace all code in template pm_showpm

<if condition="$show['receiptprompt']">
<script type="text/javascript">
<!--
<if condition="$show['receiptpopup']">
if (window.attachEvent)
{
window.attachEvent('onload', askReceipt);
}
else if(window.addEventListener)
{
window.addEventListener('load', askReceipt, false);
}
function askReceipt()
{
doReceipt(confirm("$receipt_question_js"));
}
</if>
function doReceipt(yesno)
{
// do image method too to get around popup blockers
var img_obj = new Image();
img_obj.src = "private.php?$session[sessionurl]do=dopmreceipt&type=img&pmid=$pm[pmid]&confirm=" + (yesno ? 1 : 0);
if (yesno)
{
fetch_object('receipt').style.display = 'none';
}
}
// -->
</script>
</if>

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<tr>
<td class="tcat" colspan="2">$vbphrase[private_message]<span class="normal">: $pm[title]</span></td>
</tr>
<if condition="$show['recipients']">
<tr>
<td class="alt1"><if condition="$ccrecipients"><strong>$vbphrase[recipients]</strong>: $ccrecipients<br /></if><if condition="$bccrecipients"><strong>$vbphrase[recipients] <span class="smallfont">($vbphrase[bcc])</span></strong>: $bccrecipients</if></td>
</tr>
</if>
</table>

$postbit

<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="managepm" />
<input type="hidden" name="pm[$pm[pmid]]" value="true" />
<input type="hidden" name="folderid" value="$pm[folderid]" />
</form>

<br />

<if condition="$show['receiptprompt']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" id="receipt">
<tr>
<td class="thead"><strong>$vbphrase[confirm_outstanding_receipt]</strong></td>
</tr>
<tr>
<td class="panelsurround" align="center">
<div class="panel">
<div style="width:$stylevar[formwidth_usercp]" align="$stylevar[left]">

<table class="fieldset" cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td><phrase 1="$pm[username]">$vbphrase[x_requested_read_receipt]</phrase></td>
<td><input type="button" class="button" style="font-weight:normal" value="$vbphrase[okay]" onclick="doReceipt(1);this.disabled=true;" /></td>
</tr>
</table>

</div>
</div>
</td>
</tr>
</table>

<br />
</if>
1

in postbit OR postbit_legacy

ADD at the top

<if condition="$post['forwardlink']">

<form action="private.php?do=managepm" method="post">
<table class="tborder" id="post$post[postid]" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr class="thead">
<td class="thead" colspan="2" align="right">
<span class="smallfont" style="float: left; vertical-align: middle;">
<img class="inlineimg" src="images/statusicon/post_old.gif" alt="" border="0">
$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if></span>
<select name="dowhat" onchange="this.form.submit();">
<option value="delete">Delete</option>
<option value="xml">Download as XML</option>
<option value="csv">Download as CSV</option>
<option value="txt">Download as TEXT</option>
</select><input class="button" value="Go" accesskey="s" type="submit"></td>
</tr>
<tr>
<td class="alt2" width="50"><span class="smallfont">Subject:</span></td>
<td class="alt1">

<strong>$post[title]</strong>
</td>
</tr>
<tr>
<td class="alt2"><span class="smallfont">From:</span></td><td class="alt1">
<div><span id="postmenu_">

<a href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
$post[onlinestatus]

<script type="text/javascript"> vbmenu_register("postmenu_", true); </script>
</span>
<if condition="$post['usertitle']"><span class="smallfont">($post[usertitle])</span></if>
</div>

</td>
</tr>
<tr>
<td class="alt1" colspan="2">
<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->

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

<div style="margin-top: 10px" align="$stylevar[right]">
<!-- controls -->
<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>
<!-- / controls -->
</div>

<!-- message, attachments, sig -->

</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&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&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&u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_all_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&userlist=buddy&u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
</if>
</table>
</div>
<else />
1

Still in postbit...
FIND

<!-- / post $post[postid] popup menu -->
REPLACE with:

<!-- / post $post[postid] popup menu -->
</if>


Thats it,
Enjoy!

whiteeagle0
05-30-2007, 05:27 PM
screenshot?

EDIT NVM Appeared

*installed*

PoetJA-1975
06-01-2007, 05:35 AM
Nice - thanx for the share ;)

Jacquii.

RedGTiVR6
06-01-2007, 02:07 PM
btw - in your code for postbit or postbit_legacy, you have left in the link information for your particular template.

<img class="inlineimg" src="images/cstyle/purple/statusicon/post_old.gif" alt="" border="0">


should be changed to for normal use.

<img class="inlineimg" src="images/statusicon/post_old.gif" alt="" border="0">

installed! thanks for the mod!

also, is there a way to make a change to the PM list to make it show like it shows here on vbulletin.org?

Nutz
06-14-2007, 10:16 AM
btw - in your code for postbit or postbit_legacy, you have left in the link information for your particular template.

<img class="inlineimg" src="images/cstyle/purple/statusicon/post_old.gif" alt="" border="0">


should be changed to for normal use.

<img class="inlineimg" src="images/statusicon/post_old.gif" alt="" border="0">

installed! thanks for the mod!

also, is there a way to make a change to the PM list to make it show like it shows here on vbulletin.org?
Sorry missed this. o.O

fixed the icon prob. and sorry but I don't understand what you mean by the 'PM list'.

Thanks,
Mat

RedGTiVR6
06-14-2007, 11:32 AM
I was referring to this: https://vborg.vbsupport.ru/showthread.php?t=132622

:)

I like the PM set-up 100% better now.

Skavenger
06-14-2007, 02:11 PM
btw - in your code for postbit or postbit_legacy, you have left in the link information for your particular template.

<img class="inlineimg" src="images/cstyle/purple/statusicon/post_old.gif" alt="" border="0">


should be changed to for normal use.

<img class="inlineimg" src="images/statusicon/post_old.gif" alt="" border="0">

installed! thanks for the mod!

also, is there a way to make a change to the PM list to make it show like it shows here on vbulletin.org?
you should use
$stylevar[imgdir_statusicon]/
instead of
images/statusicon/
for thos who have more than one style
I was referring to this: https://vborg.vbsupport.ru/showthread.php?t=132622

:)

I like the PM set-up 100% better now.
this is better, i think
https://vborg.vbsupport.ru/showthread.php?t=149710

RedGTiVR6
02-27-2008, 06:19 PM
any word if this will work for 3.7?

LordDB
03-02-2008, 09:41 PM
@Nutz, any reason why my PM's now show twice...one in the new style, and the other old style? Have followed what you instructed!

Br.:)

SBlueman
03-02-2008, 10:17 PM
I am having problems with this modification. It seems to be showing the PM twice. Here are some screenshots (all from one page):

https://vborg.vbsupport.ru/ (http://img150.imageshack.us/my.php?image=pmproblemlo8.jpg)
https://vborg.vbsupport.ru/ (http://img150.imageshack.us/my.php?image=pmproblem2yd0.jpg)
https://vborg.vbsupport.ru/ (http://img150.imageshack.us/my.php?image=pmproblem3yy2.jpg)

Attached is my postbit in a .txt file. Any help is greatly appreciated.

SBlueman
03-08-2008, 07:08 AM
Anyone?

SBlueman
03-11-2008, 04:59 AM
Is this modification supported?

mahmuttunc
03-11-2008, 10:12 AM
looks good might try it out.

MissKalunji
03-13-2008, 03:00 AM
I am having problems with this modification. It seems to be showing the PM twice. Here are some screenshots (all from one page):

http://img150.imageshack.us/img150/8499/pmproblemlo8.th.jpg (http://img150.imageshack.us/my.php?image=pmproblemlo8.jpg)
http://img150.imageshack.us/img150/3883/pmproblem2yd0.th.jpg (http://img150.imageshack.us/my.php?image=pmproblem2yd0.jpg)
http://img150.imageshack.us/img150/4250/pmproblem3yy2.th.jpg (http://img150.imageshack.us/my.php?image=pmproblem3yy2.jpg)

Attached is my postbit in a .txt file. Any help is greatly appreciated.


<if condition="(!$GLOBALS['FIRSTPOSTID'] and !$GLOBALS['vbulletin']->GPC['ajax'])">

$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" align="left">Please Help Support GridironFans.com And Visit Our Sponsors.</td>
</tr>
<tr>
<td class="alt1" align="center">
<!-- Begin: AdBrite -->
<script type="text/javascript">
var AdBrite_Title_Color = '8b0000';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = '8b0000';
</script>
<span style="white-space:nowrap;"><script src="http://ads.adbrite.com/mb/text_group.php?sid=487147&zs=3732385f3930" type="text/javascript"></script><!--
--><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=487147&afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard-w.gif" style="background-color:#8b0000;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span>
<!-- End: AdBrite -->
</if>
</td>
</tr>
</table>

</div>
$spacer_close

</if>

This is ur problem. The Code probably isn't written properly when i remove it it doesn't show twice

here's how i put mine


<if condition="THIS_SCRIPT == 'showthread' AND !$GLOBALS['FIRSTPOSTID']">
<!-- GOOGLE AD -->
<br/>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]" colspan="2">
Advertisement
</td>
</tr>
<tr>
<td class="alt1" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">
<center>
<IFRAME src="xxxx" name="adsense" width="728" height="90" frameborder="no" border="0" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="no"></IFRAME>
</center>
</td>
</tr>
</table>

<!-- / GOOGLE AD --></if>

SBlueman
03-13-2008, 05:12 AM
Thank you for your reply but what am I removing? I am confused after reading your post.

MissKalunji
03-13-2008, 12:38 PM
Thank you for your reply but what am I removing? I am confused after reading your post.

The advertisement code is your problem.

i've showed you in the previous post what MINE looked like (the second set of code)

This is the code to remove test it and you'll see your private message back to normal.

<if condition="(!$GLOBALS['FIRSTPOSTID'] and !$GLOBALS['vbulletin']->GPC['ajax'])">

$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" align="left">Please Help Support GridironFans.com And Visit Our Sponsors.</td>
</tr>
<tr>
<td class="alt1" align="center">
<!-- Begin: AdBrite -->
<script type="text/javascript">
var AdBrite_Title_Color = '8b0000';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = '8b0000';
</script>
<span style="white-space:nowrap;"><script src="http://ads.adbrite.com/mb/text_group.php?sid=487147&zs=3732385f3930" type="text/javascript"></script><!--
--><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=487147&afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard-w.gif" style="background-color:#8b0000;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span>
<!-- End: AdBrite -->
</if>
</td>
</tr>
</table>

</div>
$spacer_close

</if>

SBlueman
03-13-2008, 01:01 PM
I removed that snippet of code and am still getting the same problem with the message showing twice. The only thing that changed was the ad is not showing now...

MissKalunji
03-13-2008, 01:34 PM
uh weird :-/ when i tested it in my forum with ur postbit it was working fine :-/ without the add

SBlueman
03-14-2008, 08:14 AM
Must be something else....anyone else want to take a crack at it?

MissKalunji
03-14-2008, 01:46 PM
if you want send me the skin xml and i'll test it on my forum and try for you?

SBlueman
03-15-2008, 03:21 AM
I have attached the file, thank you. :):up:

SBlueman
05-24-2008, 06:50 PM
Any luck? I haven't heard from you in a while...

MissKalunji
05-24-2008, 07:45 PM
who me?

SBlueman
05-26-2008, 02:45 AM
Yes, you asked me to send you the xml so you'd take a look at it....I posted it as an attachment and have not heard back.

Medina
05-26-2008, 05:27 PM
The topic starter telling you to replace things, but you have add it under or above it.

So that`s the reason why you are seeing it twice.


What you have to do, is revert your template (postbit or postbit legacy) the one you have used and give it a another try.

But. before you revert your template which one you have used. Make a copy and past it in a new document and save it.


And a another thing, never place your xml template in a topic. Because everyone can use your work. ;)

Reinhart
05-27-2008, 07:07 PM
Cant seem to get this to work with GT Private Message Quick Reply...
QR just sends me to "Please Complete both Subject and... etc"
Any ideas?

MissKalunji
05-28-2008, 04:02 PM
Yes, you asked me to send you the xml so you'd take a look at it....I posted it as an attachment and have not heard back.

Really? wow sorry i never noticed you still need help?

SBlueman
01-25-2009, 10:25 PM
Anyone have a solution for this? This is the error I am getting:

http://img259.imageshack.us/img259/809/error1qq8.th.jpg (http://img259.imageshack.us/my.php?image=error1qq8.jpg)
http://img264.imageshack.us/img264/4068/error2on8.th.jpg (http://img264.imageshack.us/my.php?image=error2on8.jpg)

MissKalunji
01-27-2009, 05:41 PM
pictures too small can't see

SBlueman
01-28-2009, 11:39 PM
Here we go, check the attachments. I am getting this odd double PM effect, one with no signature and one with a signature.

SBlueman
02-01-2009, 08:36 PM
Anyone?