(2013-05-24, 07:41 AM).m. Wrote: [ -> ]^ add <if $mybb->usergroup['gid'] != 2 then> at the top of usercp_nav_messenger template and add </if> at the end of the template.
worked
Very Thanks
A few problems and questions
1-important(error)
when i use code
in member cp show this error on the top
Parse error: syntax error, unexpected ')' in /home/........./public_html/Forum/inc/functions_user.php(458) : eval()'d code on line 20
2-How use this code for Multiple groups
(group1 & gorup4 & gorup3 ==access)
and (group2 == Inaccessible)
3-can use code this form
<if $mybb->usergroup['gid'] !== 2 then>
$mybb->settings['enablepms'] == 0)
{
error($lang->pms_disabled);
}
</if>
Sorry, my English is very poor
thanks
1. - probably caused by 3. You have a redundant ) somewhere.
2. and 3.
<if in_array($mybb->user['usergroup'], array(1,2,3)) then>
<if $mybb->settings['enablepms'] == 0 then>
{$lang->pms_disabled}
</if>
</if>
1,2,3 - comma separated group ids which aren't allowed to view PMs.
Not sure why you want to use $mybb->settings['enablepms'] for that, so the result of the code I posted may be unexpected for you.
(2013-05-24, 06:42 PM)Destroy666 Wrote: [ -> ]1. - probably caused by 3. You have a redundant ) somewhere.
2. and 3.
<if in_array($mybb->user['usergroup'], array(1,2,3)) then>
<if $mybb->settings['enablepms'] == 0 then>
{$lang->pms_disabled}
</if>
</if>
1,2,3 - comma separated group ids which aren't allowed to view PMs.
Not sure why you want to use $mybb->settings['enablepms'] for that, so the result of the code I posted may be unexpected for you.
thanks
worked without error
But messenger disable for all group
I use this form
<if in_array($mybb->user['usergroup'], array(2,1,5,13)) then>
<if $mybb->settings['enablepms'] == 0 then>
{$lang->pms_disabled}
PM links code
</if>
</if>
Well, sorry, but I'm not entirely sure what you want to achieve. To block groups let's say 2 and 34 from viewing the nav PM links use this in usercp_nav_messenger:
<tr>
<if !in_array($mybb->user['usergroup'], array(2,34)) then>
(... replace this with rest of code which had been before except trs and tbody, so tds etc...)
<else>
<td class="trow1 smalltext">
{$lang->pms_disabled}
</td>
</if>
</tr>
</tbody>
Still don't know why you want to use $mybb->settings['enablepms'] so I removed it because it made no sense for me there.
Does anybody have a mirror because mybbhacks is down please.
Hey guys, If anybody could please supply a mirror, I will kill for this awesome plugin!
^ kill whom ? anyway, check your PM
Would I be able to call in forum info into another template using this? For instance, if I want to call a board's last post somewhere into the footer or header, would I use something like "{$lastpost['fid2']}" to call in that specific board's last post info there?