Forum Activity

Forum feed

doubt about system vars  Top

  • Hi, I?m developing a guestbook for postnuke 0.8 and I don?t know how to get the USER HOMEPAGE URL var from the current user, I?d tray whit pnUserGetVar('URL'); but it seems to be disabled in this version, the question is, how can I get this var???

    Thanks




    edited by: inexinferis, Apr 01, 2008 - 03:23 PM

    --
    -. Karman .-
    http://www.inexinferis.co.nr
    PD: Excuse my English, I am learning... xD
  • In Smarty, I know this works:

    Code

    <!--[pngetbaseurl]-->


    I'm not sure on the core variables?

    --
    [ stevencopley.com ]
  • but:

    jaenosjelantru


    Code

    <!--[pngetbaseurl]-->



    gives the core URL, not the current user home page...



    edited by: inexinferis, Apr 01, 2008 - 03:24 PM

    --
    -. Karman .-
    http://www.inexinferis.co.nr
    PD: Excuse my English, I am learning... xD
  • No clue, sorry. I guess I misunderstood. I'm totally clueless as to how to gather that information without user input. It seems like the browser would not give that information by a simple command, but would require user input.

    http://www.google.com/search?hl=en&safe=off&q=retrieve+browser+home+page+PHP

    ?



    edited by: jaenosjelantru, Apr 01, 2008 - 12:30 PM

    --
    [ stevencopley.com ]
  • This is one thing that really annoys me too: It is really hard to get these user variables. The access contains the legacy of PHPNuke and Postnuke .7 and some new stuff from .8

    But you can use pnUserGetVars($uid) to get ALL user variables in an array. So you can pick out what you need.

    --
    best regards from Kiel, sailing city

    Steffen Voss

    Member of the Zikula Steering Committee
    Read The Zikulan's Blog
  • Wow I hadn't tried this, simply it would be

    Code

    $home_page = pnUserGetVar(_YOURHOMEPAGE)


    Or using the new object library

    Code

    Loader::loadClass('UserUtil');
    $usr_dud = UserUtil::getUserDynamicDataFields(SessionUtil::getVar('uid'));
    foreach (UserUtil::getDynamicDataFields() as $dud) {
        if ($dud['prop_label'] == _YOURHOMEPAGE) {
            $home_page = $usr_dud[$dud['prop_id']]['uda_value'];
        }
    }


    But it assumes that the property label '_YOURHOMEPAGE' hasn't been changed.

    I've been experimenting as I write...
    I thought adjusting the Profile module for a default, non-editable set of 'obvious' variable labels might do the trick or use it's pnAPI to get what I wanted... but it's not pnAPI compliant???

    So I am requesting some feedback on this core module and it's usage from someone involved in the code please.

    --
    Under Construction!
  • Also thinking the UserUtil could use some UserUtil::[get|getAll|set][user]Profile() methods.

    --
    Under Construction!
  • Topiatic

    But it assumes that the property label '_YOURHOMEPAGE' hasn't been changed.


    I came to the same conclusion...


    --
    David Pahl
    Zikula Support Team
  • thanks!!!

    Code

    $home_page = pnUserGetVar(_YOURHOMEPAGE)
    works great!!!

    Regards

    --
    -. Karman .-
    http://www.inexinferis.co.nr
    PD: Excuse my English, I am learning... xD

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