Fork me on GitHub

Custom links at Account Panel  Bottom

  • Could not find better place to ask, so here goes.

    I want to use my own Icon at user.php view. Idea is to make more links, right now to pnSMF. I made icon with photoshop, and uploaded it to images/icons/large folder and edited pnaccountapi.php to add one more link:

    Code

    $items[] = array('url' => 'index.php?module=pnSMF',
                    'set' => 'icons/large',
                    'tilte' => _KESKUSTELUPALSTA,
                    'icon' => 'pnSMF.gif');


    However it won't print link icon or link-text. If i use 'exit.gif' instead on pnSMF.gif it will create link without text, but the image is the same as it is at logout so users won't know the difference.

    How on earth could i make my own links to user.php-view?

    Thanks in advance
    Miihkali



    edited by: miihkali, Mar 09, 2009 - 09:48 AM

    --
    sleepy
  • Hi Miihkali!
    Seems that you're missing one line, try this out:

    Code

    $items[] = array('url' => pnModURL('pnSMF'),
                    'module'  => 'core',
                    'set' => 'icons/large',
                    'tilte' => _KESKUSTELUPALSTA,
                    'icon' => 'pnSMF.gif');


    Anyways, it would be better if you don't use the central image repository for that purpose. You can do it like InterCom for instance, storing the pnSMF.gif in the pnimages module subfolder and using:

    Code

    $items[] = array('url' => pnModURL('pnSMF'),
                    'tilte' => _KESKUSTELUPALSTA,
                    'icon' => 'pnSMF.gif');


    Greetings

    --
    - Mateo T. -
    Mis principios... son mis fines
  • Thanks. I am good on forgetting little things, like important lines :)

    However it is allways best to keep the code as simple as possible, so thanks for the tip to shorter version.

    --
    sleepy
  • concerning that, is it possible to define a pnaccountapi not in the module in order to avoid lost icons during updates ?

This list is based on users active over the last 60 minutes.