PDA

View Full Version : Social Group and Album Enhancements - Add Last Poster to Social Groups list


Lynne
05 Feb 2009, 18:04
For some reason the lastposter is not shown on the Social Groups list. To add it, open the socialgroups_grouplist_bit template and find these lines:

$group[lastpostdate]
<if condition="!$show['detailedtime']">
<br /><span class="time">$group[lastposttime]</span>
</if>ADD right underneath:

<br />by <a href="member.php?$session[sessionurl]u=$group[lastposterid]">$group[lastposter]</a>That's it!


edit: There is a cool idea from Mark.B (http://www.vbulletin.org/forum/member.php?u=48656) in post 7 (http://www.vbulletin.org/forum/showpost.php?p=1769152&postcount=7):
Add this to the end of Lynne's code to get a "Go To Last Post" link too...
<a title="$vbphrase[go_to_last_post]" href="group.php?$session[sessionurl]do=discuss&gmid=$group[lastgmid]#gmessage$group[lastgmid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" border="0" /></a>Note there is a space at the very start.

UKBusinessLive
05 Feb 2009, 18:17
Thanks Lynne, a Great 1 minute mod :D

Blackhat
06 Feb 2009, 20:06
Did you do something else too because my group listings does not look like your screenshot at all even without the "last poster" bit.

Theater
07 Feb 2009, 08:04
Maybe they should have put you in charge of the Social Group display, Lynne. Thank you and installed.

Lynne
07 Feb 2009, 17:45
Did you do something else too because my group listings does not look like your screenshot at all even without the "last poster" bit.
I'm pretty sure I didn't do anything. That is the full group list at group.php?do=grouplist

DieselMinded
08 Mar 2009, 04:31
/me installs Very Nice

Mark.B
15 Mar 2009, 23:57
Add this to the end of Lynne's code to get a "Go To Last Post" link too...
<a title="$vbphrase[go_to_last_post]" href="group.php?$session[sessionurl]do=discuss&gmid=$group[lastgmid]#gmessage$group[lastgmid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" border="0" /></a>
Note there is a space at the very start.

wtb
16 Mar 2009, 01:17
Cool idea Mark, thanks!

Lynne
16 Mar 2009, 04:17
Add this to the end of Lynne's code to get a "Go To Last Post" link too...
<a title="$vbphrase[go_to_last_post]" href="group.php?$session[sessionurl]do=discuss&gmid=$group[lastgmid]#gmessage$group[lastgmid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" border="0" /></a>Note there is a space at the very start.
Great idea, Mark! I hope you don't mind, but I added your post to the first post in this thread so people don't accidentally overlook your idea.

Mark.B
16 Mar 2009, 18:59
Great idea, Mark! I hope you don't mind, but I added your post to the first post in this thread so people don't accidentally overlook your idea.
Sure, that's fine.

Jasem
16 Mar 2009, 20:13
Good work, thanks!...

s8glive
23 Apr 2009, 16:35
anyone know how to add a link to the last post?

Mark.B
23 Apr 2009, 23:11
Three posts up....

s8glive
23 Apr 2009, 23:15
no like show a worable link.

Lynne
24 Apr 2009, 00:06
no like show a worable link.
You need to explain yourself better. The link does 'work'. So if you want it to work some other way, you need to explain how that is.

LOKIN510051
26 Apr 2009, 08:08
Muchas Gracias Aunque No Se Ven Las Imagenes De Los Frupos Me Imaginoq Ue Es Falla Del Mismo Vbulletin Haber Si Hayt Solucion

Phantasmagoric
27 Apr 2009, 11:12
Nice little extra, thanks Lynne

Canadians360
08 Sep 2009, 01:43
Simple, neat, works like a charm, should have been a default for the social group list displays.

Love your work for social groups, they really take social groups from a nice feature to a great one.

EidolonAH
09 Sep 2009, 05:42
Brilliant, I am using the social groups in-place of buying the blog mod on Nurture, this little extra is perfect, thank you for the share.

Canadians360
09 Sep 2009, 19:03
[/HTML]no like show a worable link.

I think he may have been looking for a setup like this perhaps...

Find as before this following code...
$group[lastpostdate]
<if condition="!$show['detailedtime']">
<br /><span class="time">$group[lastposttime]</span>
</if>


But this time add the following code ABOVE...
<a href="group.php?$session[sessionurl]do=discuss&amp;gmid=$group[lastgmid]#gmessage$group[lastgmid]" style="white-space:nowrap" title="$vbphrase[go_to_last_post]"><strong>$group[trimdiscussion]</strong></a><br />

This adds a linked name of the last discussion's title to the discussion in the group list.

@Lynne: hope you dont mind I posted this.

Screenshot attached bellow.

Lynne
09 Sep 2009, 19:23
I don't mind at all. I didn't understand his question, so I couldn't help him.

Xencored
24 Sep 2009, 21:56
Thanks Lynne Great mod :up:

Tom Kagan
07 Oct 2009, 20:43
Installed.

I suppose others might also want to go all the way with this formatting idea and make it exactly match the other areas with similar info. Instead of the above, try the following:

Replace the entire block. Remove everything between and including:

<if condition="$show['lastpostinfo']">

and it corresponding ending:

</if>



Then, replace it with the following:

<if condition="$show['lastpostinfo']">
<div style="text-align: $stylevar[left]">
$group[lastpostdate]
<if condition="!$show['detailedtime']">
<span class="time">$group[lastposttime]</span>
</if>
</div>
<if condition="$group['lastposterid']">
<div style="text-align: $stylevar[right]">
<phrase 1="member.php?$session[sessionurl]u=$group[lastposterid]" 2="$group[lastposter]">$vbphrase[by_x]</phrase>
<a href="group.php?$session[sessionurl]do=discuss&amp;gmid=$group[lastgmid]#gmessage$group[lastgmid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
</div>
</if>
<else />
<div style="text-align: $stylevar[left]">
<div style="text-align: $stylevar[left]">
$vbphrase[group_created]
</div>
$group[lastpostdate]
<if condition="!$show['detailedtime']">
<span class="time">$group[lastposttime]</span>
</if>
</div>
</if>



This will give the information the same text alignment as similar blocks in other templates and also matches the presentation for the create date of the group if there are no messages to display. Additionally, it uses the standard phrases instead of hard coding "by" in the template.