Hi.
We don't have PM enabled on this board I admin.
Wheer do I go to remove the two lines from the block please?
thanks :nervous-happy:
iain sherriff,
File: ../Sources/PortalBlocks.php
find:
if (allowedTo('pm_read'))
{
echo '
<li>', sp_embed_image('dot'), ' <strong>', $txt['sp-usertmessage'], ':</strong> <a href="', $scripturl, '?action=pm">', $context['user']['messages'], '</a></li>
<li>', sp_embed_image('dot'), ' <strong>', $txt['sp-usernmessage'], ':</strong> ', $context['user']['unread_messages'], '</li>';
}
replace with:
/* if (allowedTo('pm_read'))
{
echo '
<li>', sp_embed_image('dot'), ' <strong>', $txt['sp-usertmessage'], ':</strong> <a href="', $scripturl, '?action=pm">', $context['user']['messages'], '</a></li>
<li>', sp_embed_image('dot'), ' <strong>', $txt['sp-usernmessage'], ':</strong> ', $context['user']['unread_messages'], '</li>';
} */
Regards.
ian sherriff
Open your Sources/PortalBlocks.php and remove:
if (allowedTo('pm_read'))
{
echo '
<li>', sp_embed_image('dot'), ' <strong>', $txt['sp-usertmessage'], ':</strong> <a href="', $scripturl, '?action=pm">', $context['user']['messages'], '</a></li>
<li>', sp_embed_image('dot'), ' <strong>', $txt['sp-usernmessage'], ':</strong> ', $context['user']['unread_messages'], '</li>';
}
This should do what you want :) Please backup your files before editing them, I haven't tested this edit, even if I am pretty sure it will work.
Regards
EDIT: ninja'd :( had this page opened for hours and replied when I found some time :/
Most greatful for both answers
thank you :nervous-happy:
Chen............I see what you did there. The number of times I have wanted to do that as a test instead of removing the code :-[
Very usefull for the future ;D
Yes, he commented out the lines :) You can do it like this:
/* code to be left out goes here */
FYI it works in .css files as well.
That is going to save me so much time.......I knew about "commenting out" (is that right) but never got a handle on what it was
It can be done also like this:
// commented out code
Non commented out code (new line)
But the first method is much better because it doesn't depend on lines and it also works in .css files, this method does NOT work in .css files instead.
ah. right, thanks
You're welcome :)
Could also set allowedTo('pm') to false the line above it, though commenting/removing works just as good.