PDA

View Full Version : Social Group and Album Enhancements - Social Group Discussions Like Postbit Legacy


MrEyes
03 Feb 2009, 12:40
Social Group Discussions Like Postbit Legacy

The following template modification makes Social Group discussion look similar to Postbit Legacy.

To install open your "socialgroups_message" template and overwrite the entire template with the markup below:


<if condition="$message['goto']">
<a name="newmessage"></a>
</if>

<div id="gmessage_qe$message[gmid]" style="margin-bottom:5px">
<table id="gmessage$message[gmid]" 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]; border-$stylevar[right]: 0px">$message[date] $message[time]</td>
<td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-$stylevar[left]: 0px" align="$stylevar[right]">
<if condition="$show['inlinemod']"><div class="inlinemod_control"><input type="checkbox" class="inlinemod_checkbox" name="gmessagelist[$message[gmid]]" id="gmessagelist_$message[gmid]" value="$message[checkbox_value]" title="$vbphrase[select_this_item_for_inline_moderation]" /></div></if>
</td>
</tr>
<tr valign="top">
<td class="alt2" width="175" align="center" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px">
<div id="sgpostmenu_$message[gmid]">
<if condition="$message['postuserid']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$message[postuserid]">$message[musername]</a>
<script type="text/javascript"> vbmenu_register("sgpostmenu_$message[gmid]", true); </script>
<else />
$message[musername]
</if>
</div>
<br/>
<img src="$message[avatarurl]" class="alt2 avatar"<if condition="$message['avatarwidth']"> width="$message[avatarwidth]"</if><if condition="$message['avatarheight']"> height="$message[avatarheight]"</if> border="0" alt="$message" /><if condition="$message['postuserid']"></a></if>
</div>
</td>
<td class="alt1" id="td_post_$message[gmid]" style="border-$stylevar[right]: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]">
<div class="social_group_message_body">
<if condition="$show['moderation']"><div class="shade smallfont">$vbphrase[this_message_is_moderated]</div></if>
<div class="group_message_body" id="gmessage_text_$message[gmid]">$message[message]</div>
</td>
</tr>
<tr>
<td class="alt2" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">
<if condition="$show['reportlink']">
<a href="group.php?$session[sessionurl]do=report&amp;gmid=$message[gmid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a>
</if>
<if condition="$message['itemipaddress']">
<a href="group.php?do=viewip&amp;gmid=$message[gmid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/ip.gif" alt="$vbphrase[ip]" border="0" /></a>
</if>
</td>
<td class="alt1" align="$stylevar[right]" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-$stylevar[left]: 0px; border-top: 0px">
<if condition="$message['edit']">
<if condition="!$message[is_discussion]">
<img style="display: none" id="progress_$message[gmid]" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" />
</if>
<a href="group.php?$session[sessionurl]do=message&amp;gmid=$message[gmid]<if condition="$perpage">&amp;pp=$perpage</if><if condition="$pagenumber">&amp;page=$pagenumber</if>" id="gmessage_qe_edit_$message[gmid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
</td>
</tr>
</table>
<if condition="$show['edit'] AND $show['popups'] AND !$message[is_discussion]">
<script type="text/javascript">
<!--
vBulletin.register_control("vB_QuickEdit", "$message[gmid]", 'GroupMessage');
//-->
</script>
</if>
</div>

<!-- post $message[gmid] popup menu -->
<div class="vbmenu_popup" id="sgpostmenu_$message[gmid]_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">$message[musername]</td></tr>
<if condition="$message['postuserid']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$message[postuserid]">View Public Profile</a></td></tr>
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$message[postuserid]" rel="nofollow"><phrase 1="$message[musername]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['member']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$message[postuserid]"><phrase 1="$message[musername]">$vbphrase[add_x_to_contacts]</phrase></a></td></tr>
</if>
</table>
</div>
<!-- / post $message[gmid] popup menu -->
Something you need to know

This template change will [U]not display the full postbit that includes post count, location etc, it will only show avatar and username. The reason for this is simple, the data simply isn't available without a plugin modification.

Other Information
If you have installed my Quote Functionality in Social Discussions (http://www.vbulletin.org/forum/showthread.php?t=204052) modification you can add a quote button by following the steps below:

In the template markup above find:

<if condition="$message['edit']">
Immediately before this paste in the following

<a href="group.php?$session[sessionurl]do=message&amp;discussionid=$message[discussionid]&amp;gmq=$message[gmid]"><img src="$stylevar[imgdir_button]/quote.gif" alt="$vbphrase[quote]" border="0" /></a>

Unfortunately I do not have the time to sort out a template for the new postbit, so feel free to create one if you want. If you do, drop me a PM and I will link to it from this mod.

This is one of the mods in my "Why isn't this stuff in the default social group system" series, for the others see these threads:

Social Group Statistics in Whats Going On (http://www.vbulletin.org/forum/showthread.php?t=204085)
Quote Functionality in Social Discussions (http://www.vbulletin.org/forum/showthread.php?t=204052)

MrEyes
03 Feb 2009, 12:41
Reserved

RvG2
03 Feb 2009, 18:27
whoa... I never thought this is possible. :)

Theater
04 Feb 2009, 09:48
Very easy, very nice. I love it - thank you!

baghdad4ever
04 Feb 2009, 10:31
installed

Mark.B
04 Feb 2009, 23:09
Only thing I can find wrong is that selecting a post for inline moderation does not highlight it.

Blackhat
06 Feb 2009, 21:09
how can we make it display the fullsize avatar and not the thumbnail ?

MrEyes
06 Feb 2009, 23:19
how can we make it display the fullsize avatar and not the thumbnail ?

Find this bit:

<img src="$message[avatarurl]" class="alt2 avatar"<if condition="$message['avatarwidth']"> width="$message[avatarwidth]"</if><if condition="$message['avatarheight']"> height="$message[avatarheight]"</if> border="0" alt="$message[username]" />

and replace with

<img src="$message[avatarurl]" class="alt2 avatar" border="0" alt="$message[username]" />

I haven't tested this, but it should work

Theater
07 Feb 2009, 09:12
Find this bit:

<img src="$message[avatarurl]" class="alt2 avatar"<if condition="$message['avatarwidth']"> width="$message[avatarwidth]"</if><if condition="$message['avatarheight']"> height="$message[avatarheight]"</if> border="0" alt="$message[username]" />and replace with

<img src="$message[avatarurl]" class="alt2 avatar" border="0" alt="$message[username]" />I haven't tested this, but it should work

Yep, it works fine. :up:

Keesa
07 Feb 2009, 09:39
You are amazing. I hope they incorporate all of these into a future release.

Keesa
07 Feb 2009, 11:04
I made a couple different changes, moved the IP and report to next to the quote/edit buttons. Just posting it here in case anyone else wants to do it.

:p

https://www.vbulletin.org/forum/external/2009/03/1.gif

Did it by commenting out the following code
<!--<if condition="$show['reportlink']">
<a href="group.php?$session[sessionurl]do=report&amp;gmid=$message[gmid]" rel="nofollow"><img src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a>
</if>-->
<!--<if condition="$message['itemipaddress']">
<a href="group.php?do=viewip&amp;gmid=$message[gmid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/ip.gif" alt="$vbphrase[ip]" border="0" /></a>
</if>-->

and adding it as below

<td class="alt1" align="$stylevar[right]" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-$stylevar[left]: 0px; border-top: 0px">
<if condition="$message['itemipaddress']">
<a href="group.php?do=viewip&amp;gmid=$message[gmid]" rel="nofollow"><img src="$stylevar[imgdir_button]/ip.gif" alt="$vbphrase[ip]" border="0" /></a>
</if>

<if condition="$show['reportlink']">
<a href="group.php?$session[sessionurl]do=report&amp;gmid=$message[gmid]" rel="nofollow"><img src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a>
</if>
<a href="group.php?$session[sessionurl]do=message&amp;discussionid=$message[discussionid]&amp;gmq=$message[gmid]"><img src="$stylevar[imgdir_button]/quote.gif" alt="$vbphrase[quote]" border="0" /></a>
<if condition="$message['edit']">
<if condition="!$message[is_discussion]">
<img style="display: none" id="progress_$message[gmid]" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" />
</if>
<a href="group.php?$session[sessionurl]do=message&amp;gmid=$message[gmid]<if condition="$perpage">&amp;pp=$perpage</if><if condition="$pagenumber">&amp;page=$pagenumber</if>" id="gmessage_qe_edit_$message[gmid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
</td>

Mukashi
10 Feb 2009, 23:29
I was hoping someone would make a change like this. =) Now if only there was a way to allow signatures to be posted as well, together with that other information.... You say another addon would be needed for that? Any plans? ;)

Merriweather
07 Mar 2009, 08:06
This is great!!! Tank you, MrEyes and Schnee for sharing the additional edits. :)

I like this, and am hoping someone does the signature add-on as well! :)

jambo_1969
07 Mar 2009, 13:54
..edit

Bowromir
19 Mar 2009, 12:44
Great add-on! It would be awesome if their would be an option to show the regular postbit info and the signatures aswell.. Any chance this will happen soon?

Alfa1
27 Mar 2009, 00:34
Many thanks!

TNCclubman
27 Mar 2009, 02:46
installed thanks!

timinrome
27 Mar 2009, 21:44
Sorry, but what is Postbit Legacy exactly? Where can I find more info?

Thanks

KURTZ
31 Mar 2009, 13:42
I made a couple different changes, moved the IP and report to next to the quote/edit buttons. Just posting it here in case anyone else wants to do it.

:p

https://www.vbulletin.org/forum/external/2009/03/1.gif

Did it by commenting out the following code
<!--<if condition="$show['reportlink']">
<a href="group.php?$session[sessionurl]do=report&amp;gmid=$message[gmid]" rel="nofollow"><img src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a>
</if>-->
<!--<if condition="$message['itemipaddress']">
<a href="group.php?do=viewip&amp;gmid=$message[gmid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/ip.gif" alt="$vbphrase[ip]" border="0" /></a>
</if>-->

and adding it as below

<td class="alt1" align="$stylevar[right]" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-$stylevar[left]: 0px; border-top: 0px">
<if condition="$message['itemipaddress']">
<a href="group.php?do=viewip&amp;gmid=$message[gmid]" rel="nofollow"><img src="$stylevar[imgdir_button]/ip.gif" alt="$vbphrase[ip]" border="0" /></a>
</if>

<if condition="$show['reportlink']">
<a href="group.php?$session[sessionurl]do=report&amp;gmid=$message[gmid]" rel="nofollow"><img src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a>
</if>
<a href="group.php?$session[sessionurl]do=message&amp;discussionid=$message[discussionid]&amp;gmq=$message[gmid]"><img src="$stylevar[imgdir_button]/quote.gif" alt="$vbphrase[quote]" border="0" /></a>
<if condition="$message['edit']">
<if condition="!$message[is_discussion]">
<img style="display: none" id="progress_$message[gmid]" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" />
</if>
<a href="group.php?$session[sessionurl]do=message&amp;gmid=$message[gmid]<if condition="$perpage">&amp;pp=$perpage</if><if condition="$pagenumber">&amp;page=$pagenumber</if>" id="gmessage_qe_edit_$message[gmid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
</td>

this doesn't works correctly onto the 3.8.2 version ... :)

Alfa1
31 Mar 2009, 13:47
After installing this, I can no longer see what social group a post/thread is in, when viewing
moderation.php?do=viewgms&type=moderated or
moderation.php?do=viewdiscussions&type=moderated

Jaiibee
10 Apr 2009, 01:57
I don't know why I found that screenshot humorous ><

s8glive
23 Apr 2009, 17:23
great mod love it hope they put it in ver 4.0

zefyx
25 Apr 2009, 11:21
Thanks, here's the 100% XHTML valid code:

<if condition="$message['goto']">
<a name="newmessage"></a>
</if>

<div id="gmessage_qe$message[gmid]" style="margin-bottom:5px">
<table id="gmessage$message[gmid]" 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]; border-$stylevar[right]: 0px">$message[date] $message[time]</td>
<td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-$stylevar[left]: 0px" align="$stylevar[right]">
<if condition="$show['inlinemod']"><div class="inlinemod_control"><input type="checkbox" class="inlinemod_checkbox" name="gmessagelist[$message[gmid]]" id="gmessagelist_$message[gmid]" value="$message[checkbox_value]" title="$vbphrase[select_this_item_for_inline_moderation]" /></div></if>
</td>
</tr>
<tr valign="top">
<td class="alt2" width="175" align="center" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px">
<div id="sgpostmenu_$message[gmid]">
<if condition="$message['postuserid']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$message[postuserid]">$message[musername]</a>
<script type="text/javascript"> vbmenu_register("sgpostmenu_$message[gmid]", true); </script>
<else />
$message[musername]
</if>
</div>
<br/>
<img src="$message[avatarurl]" class="alt2 avatar"<if condition="$message['avatarwidth']"> width="$message[avatarwidth]"</if><if condition="$message['avatarheight']"> height="$message[avatarheight]"</if> border="0" alt="$message[username]" /><if condition="$message['postuserid']"></if>

<td class="alt1" id="td_post_$message[gmid]" style="border-$stylevar[right]: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]">
<div class="social_group_message_body"/>
<if condition="$show['moderation']"><div class="shade smallfont">$vbphrase[this_message_is_moderated]</div></if>
<div class="group_message_body" id="gmessage_text_$message[gmid]">$message[message]</div>
</td>
</tr>
<tr>
<td class="alt2" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">
<if condition="$show['reportlink']">
<a href="group.php?$session[sessionurl]do=report&amp;gmid=$message[gmid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a>
</if>
<if condition="$message['itemipaddress']">
<a href="group.php?do=viewip&amp;gmid=$message[gmid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/ip.gif" alt="$vbphrase[ip]" border="0" /></a>
</if>
</td>
<td class="alt1" align="$stylevar[right]" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-$stylevar[left]: 0px; border-top: 0px">
<if condition="$message['edit']">
<if condition="!$message[is_discussion]">
<img style="display: none" id="progress_$message[gmid]" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" />
</if>
<a href="group.php?$session[sessionurl]do=message&amp;gmid=$message[gmid]<if condition="$perpage">&amp;pp=$perpage</if><if condition="$pagenumber">&amp;page=$pagenumber</if>" id="gmessage_qe_edit_$message[gmid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
</td>
</tr>
</table>
<if condition="$show['edit'] AND $show['popups'] AND !$message[is_discussion]">
<script type="text/javascript">
<!--
vBulletin.register_control("vB_QuickEdit", "$message[gmid]", 'GroupMessage');
//-->
</script>
</if>
</div>

<!-- post $message[gmid] popup menu -->
<div class="vbmenu_popup" id="sgpostmenu_$message[gmid]_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">$message[musername]</td></tr>
<if condition="$message['postuserid']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$message[postuserid]">View Public Profile</a></td></tr>
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$message[postuserid]" rel="nofollow"><phrase 1="$message[musername]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['member']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$message[postuserid]"><phrase 1="$message[musername]">$vbphrase[add_x_to_contacts]</phrase></a></td></tr>
</if>
</table>
</div>
<!-- / post $message[gmid] popup menu -->

EidolonAH
09 Sep 2009, 06:56
Brilliant extra, thank you for the share.

I'd like the avatar to be actual size, this doesn't work in 3.8.4:

Find this bit:

<img src="$message[avatarurl]" class="alt2 avatar"<if condition="$message['avatarwidth']"> width="$message[avatarwidth]"</if><if condition="$message['avatarheight']"> height="$message[avatarheight]"</if> border="0" alt="$message[username]" />

and replace with

<img src="$message[avatarurl]" class="alt2 avatar" border="0" alt="$message[username]" />

I haven't tested this, but it should work

Do you know how we do that in 3.8.4?

Mobo
18 Sep 2009, 14:28
Installed your whole series, thanks!

I would also like to know this....

Brilliant extra, thank you for the share.

I'd like the avatar to be actual size, this doesn't work in 3.8.4:



Do you know how we do that in 3.8.4?

Warlord
27 Nov 2009, 00:03
Brilliant extra, thank you for the share.

I'd like the avatar to be actual size, this doesn't work in 3.8.4:



Do you know how we do that in 3.8.4?

I'm on 3.8.4 and it worked for me.

Thelonius Beck
28 Dec 2009, 01:00
I don't know why I found that screenshot humorous ><

I do. :D

benstillman
19 Jan 2011, 21:23
Anything like this for vB4?