TinyPortal
Development => Support => Topic started by: rsbane on May 16, 2009, 03:00:15 PM
can someone help me to remove this from userbox of admin
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg188.imageshack.us%2Fimg188%2F6656%2F57883995.jpg&hash=7730949cc0d62479155b0c251b1e5a72e5a4a443)
That cant be done except through removing hardcoded code from the files.
Only admin can see that part, not the other members.
Damn, its realy irritating me :S
can someone edit that thing :( ?
You need to edit:
- /Themes / default / TPBlocks.template.php
Find: // admin parts etc. , And comment out this section..
Down to, above: // add adminhooks
/*
// admin parts etc.
if(!isset($context['TPortal']['can_submit_article']))
$context['TPortal']['can_submit_article']=0;
// do not show if none is availalable
if($context['TPortal']['can_submit_article']==1 || allowedTo(array('tp_dlupload','tp_dlmanager','tp_settings','tp_articles','tp_blocks','tp_linkmanager','tp_teampage','tp_gallery')))
{
echo '<li style="border-bottom: solid 1px #888; padding-bottom: 3px; margin-bottom: 3px;"></li>';
// can we submit an article?
if(!allowedTo('tp_articles'))
{
if(allowedTo('tp_submithtml'))
echo '
<li><a href="', $scripturl, '?action=tpmod;sa=submitarticle">' . $txt['tp-submitarticle']. '</a><li/>';
if(allowedTo('tp_submitbbc'))
echo '
<li><a href="', $scripturl, '?action=tpmod;sa=submitarticle;bbc">' . $txt['tp-submitarticlebbc']. '</a><li/>';
}
// upload a file?
if(allowedTo('tp_dlupload') || allowedTo('tp_dlmanager'))
echo '
<li><a href="', $scripturl, '?action=tpmod;dl=upload">' . $txt['permissionname_tp_dlupload']. '</a></li>';
// tpadmin checks
if (allowedTo('tp_settings'))
echo '
<li><a href="' . $scripturl . '?action=tpadmin;sa=settings">' . $txt['permissionname_tp_settings'] . '</a></li>';
if (allowedTo('tp_blocks'))
echo '
<li><a href="' . $scripturl . '?action=tpadmin;sa=blocks">' . $txt['permissionname_tp_blocks'] . '</a></li>';
if (allowedTo('tp_articles'))
{
echo '
<li><a href="' . $scripturl . '?action=tpadmin;sa=articles">' . $txt['permissionname_tp_articles'] . '</a></li>';
// any submissions?
if($context['TPortal']['submitcheck']['articles']>0)
echo '
<li><a href="' . $scripturl . '?action=tpadmin;sa=submission"><b>' . $context['TPortal']['submitcheck']['articles'] . ' ' .$txt['tp-articlessubmitted'] . '</b></a></li>';
}
if (allowedTo('tp_dlmanager'))
{
echo '
<li><a href="' . $scripturl . '?action=tpmod;dl=admin">' . $txt['permissionname_tp_dlmanager'] . '</a></li>';
// any submissions?
if($context['TPortal']['submitcheck']['uploads']>0)
echo '
<li><a href="' . $scripturl . '?action=tpmod;dl=adminsubmission"><b>' . $context['TPortal']['submitcheck']['uploads'] . ' ' .$txt['tp-dluploaded'] . '</b></a></li>';
}
}
*/
// add adminhooks
NOTES:
/*
This is a paragraph comment
Wrapped around your code
*/
// This is a line comment. Comments are ignored by browsers
It's best to use comments, you may change your mind later.
A sidenot to marking the code out ( or removing it for that matter ) is that IF you have set in your permissions that OTHER membergroups can add articles, manage downloads upload files etc, they wont be able to do any of that as the links are removed from that block.