d3forums Group Information
- You cannot open a new topic into this forum
- Guests cannot post into this forum
msg# 1
First off, thank you for making such a well rounded, secure, forum module. Spammers love targeting forums, I have never had a spammer able to succeed in spamming d3forum.
-Question, What is the best way to get the forum to display each group each user belongs to in each post?
(This would be displayed along side of the posters uname and other info)
ex:
Poster:auxiv From:this good world Posts:1803 Status:Online
Group:Webmaster
The above would be the rendered result.
thank you in advance!
Happy Holidays :)
Votes:316
Average:0.16
msg# 1.1
hi auxiv.
It is not so easy.
But you can do it by editing the template (dirname)_inc_eachpost.html like:
<{if $post.poster_uid != 0}><a href="<{$xoops_url}>/userinfo.php?uid=<{$post.poster_uid}>"><{/if}><{$post.poster_uname}><{if $post.poster_uid != 0}></a><{/if}>
<{if $post.poster_uid != 0}>
<{if $post.poster_rank_title}>
<img src="<{$xoops_upload_url}>/<{$post.poster_rank_image}>" alt="<{$post.poster_rank_title}>" title="<{$post.poster_rank_title}>" />
<{/if}>
<{* <{$smarty.const._MD_D3FORUM_POSTERJOINED}>: <{$post.poster_regdate_formatted}> *}>
<{if $post.poster_from}><{$smarty.const._MD_D3FORUM_POSTERFROM}>: <{$post.poster_from}><{/if}>
<{$smarty.const._MD_D3FORUM_POSTERPOSTS}>: <{$post.poster_posts_count}>
<{if $post.poster_is_online}><{$smarty.const._MD_D3FORUM_POSTERISONLINE}><{/if}>
<{php}>
$member_handler =& xoops_gethandler( 'member' ) ;
$groups = $member_handler->getGroupsByUser( $this->_tpl_vars['post']['poster_uid'] , true ) ;
foreach( $groups as $group ) {
echo $group->getVar('name') ;
}
<{/php}>
<{else}>
Votes:11
Average:10.00
msg# 1.1.1
this I believe will help build incentive when a variety of groups are assigned to different users.
again, GIJOE, Thank you!
Votes:8
Average:10.00