Zikula: A Flexible Open Source Content Management System
home | forum | international support | contact us

Support Forum

Start ::  Community ::  General Chat ::  doubt about system vars

Moderated by: Support Team

Bottom
doubt about system vars

  • Link to this postingPosted: 01.04.2008, 23:04
    Profile Homepage
    inexinferis
    rank:
    Freshman Freshman
    registered:
     April 2008
    Status:
    offline
    last visit:
    04.04.08
    Posts:
    8
    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
  • Link to this postingPosted: 01.04.2008, 23:07
    Profile Homepage
    jaenosjelantru
    rank:
    Helper Helper
    registered:
     March 2005
    Status:
    offline
    last visit:
    16.08.08
    Posts:
    332
    In Smarty, I know this works:

    Code
    <!--[pngetbaseurl]-->


    I'm not sure on the core variables?
    -----
    [ stevencopley.com ]
  • Link to this postingPosted: 01.04.2008, 23:21
    Profile Homepage
    inexinferis
    rank:
    Freshman Freshman
    registered:
     April 2008
    Status:
    offline
    last visit:
    04.04.08
    Posts:
    8
    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
  • Link to this postingPosted: 01.04.2008, 23:25
    Profile Homepage
    jaenosjelantru
    rank:
    Helper Helper
    registered:
     March 2005
    Status:
    offline
    last visit:
    16.08.08
    Posts:
    332
    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/sea...+browser+home+page+php

    ?



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

    -----
    [ stevencopley.com ]
  • Link to this postingPosted: 02.04.2008, 19:38
    Profile Homepage
    kaffeeringe.de
    rank:
    Professional Professional
    registered:
     September 2002
    Status:
    offline
    last visit:
    14.08.08
    Posts:
    855
    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 PostNuke Steering Committee
    Follow The Zikulan at Twitter
  • Link to this postingPosted: 02.04.2008, 22:51
    Profile
    Topiatic
    rank:
    Professional Professional
    registered:
     November 2003
    Status:
    offline
    last visit:
    19.08.08
    Posts:
    1606
    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!
  • Link to this postingPosted: 02.04.2008, 22:56
    Profile
    Topiatic
    rank:
    Professional Professional
    registered:
     November 2003
    Status:
    offline
    last visit:
    19.08.08
    Posts:
    1606
    Also thinking the UserUtil could use some UserUtil::[get|getAll|set][user]Profile() methods.

    -----
    Under Construction!
  • Link to this postingPosted: 02.04.2008, 23:41
    Profile Homepage
    AmmoDump
    rank:
    Professional Professional
    registered:
     December 2003
    Status:
    offline
    last visit:
    20.08.08
    Posts:
    2901
    TopiaticBut it assumes that the property label '_YOURHOMEPAGE' hasn't been changed.


    I came to the same conclusion...


    -----
    David Pahl
    Zikula Support Team

  • Link to this postingPosted: 04.04.2008, 19:30
    Profile Homepage
    inexinferis
    rank:
    Freshman Freshman
    registered:
     April 2008
    Status:
    offline
    last visit:
    04.04.08
    Posts:
    8
    thanks!!!
    Code
    $home_page = pnUserGetVar(_YOURHOMEPAGE)
    works great!!!
    Regards
    -----
    -. Karman .-
    http://www.inexinferis.co.nr
    PD: Excuse my English, I am learning... xD

Start ::  Community ::  General Chat ::  doubt about system vars

Main Menu

Extensions Database

Documentation

Development

Login





 


 Log in Problems?
 New User? Sign Up!

Donate to Zikula