TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,230
  • Total Topics: 21,353
  • Online today: 867
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 121
  • Total: 122
  • @rjen

UserBar Admin problem

Started by rsbane, May 16, 2009, 03:00:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rsbane

can someone help me to remove this from userbox of admin

G6Cad

That cant be done except through removing hardcoded code from the files.
Only admin can see that part, not the other members.

rsbane

Damn, its realy irritating me :S
can someone edit that thing :( ?

Zetan

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.

G6Cad

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.

This website is proudly hosted on Crocweb Cloud Website Hosting.