PHP in Templates and Template Conditionals - Printable Version +- MyBB Community Forums (https://community.mybb.com) +-- Forum: Extensions (https://community.mybb.com/forum-201.html) +--- Forum: Plugins (https://community.mybb.com/forum-73.html) +---- Forum: Plugin Support (https://community.mybb.com/forum-72.html) +---- Thread: PHP in Templates and Template Conditionals (/thread-31860.html) |
RE: PHP in Templates and Template Conditionals - 0000 - 2013-05-24 (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
Sorry, my English is very poor thanks RE: PHP in Templates and Template Conditionals - Destroy666 - 2013-05-24 1. - probably caused by 3. You have a redundant ) somewhere. 2. and 3. 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. RE: PHP in Templates and Template Conditionals - 0000 - 2013-05-24 (2013-05-24, 06:42 PM)Destroy666 Wrote: 1. - probably caused by 3. You have a redundant ) somewhere. thanks worked without error But messenger disable for all group I use this form
RE: PHP in Templates and Template Conditionals - Destroy666 - 2013-05-25 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:
Still don't know why you want to use $mybb->settings['enablepms'] so I removed it because it made no sense for me there. RE: PHP in Templates and Template Conditionals - 0000 - 2013-05-25 (2013-05-25, 01:08 AM)Destroy666 Wrote: 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: Thanks Dear DESTROY666 & thanks .m. excellent RE: PHP in Templates and Template Conditionals - Geret - 2013-06-19 Does anybody have a mirror because mybbhacks is down please. RE: PHP in Templates and Template Conditionals - ksr - 2013-06-20 @Yumi, what happened to http://mybbhacks.zingaburga.com RE: PHP in Templates and Template Conditionals - jariz - 2013-06-20 Hey guys, If anybody could please supply a mirror, I will kill for this awesome plugin! RE: PHP in Templates and Template Conditionals - .m. - 2013-06-20 ^ kill whom ? anyway, check your PM RE: PHP in Templates and Template Conditionals - WitherBones - 2013-09-23 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? |