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
- pborchelt answered »HowtoPNForms module unable to find template« 03:52h
- Teb answered »MenuTree Mystery« 05. Jul
- dks answered »include a file« 05. Jul
- dks answered ».764 -> 1.1.1, Can't add new blocks« 05. Jul
- craigh posted »PostCalendar 5.5.0RC1 needs testers and translators« 05. Jul
- bartl answered »Upgrading 1.0.2 --> 1.1.1« 05. Jul
- Charlie-otb answered »SafeHTML output filter and youtube« 05. Jul
Login
doubt about system vars
-
- Rank: Freshman
- Registered: 01.04.08
- last visit: 14.02.09
- Posts: 11
-
- Rank: Professional
- Registered: 15.03.05
- last visit: 11.06.09
- Posts: 755
In Smarty, I know this works:
Code
<!--[pngetbaseurl]-->
I'm not sure on the core variables?
--
[ stevencopley.com ] -
- Rank: Freshman
- Registered: 01.04.08
- last visit: 14.02.09
- Posts: 11
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 -
- Rank: Professional
- Registered: 15.03.05
- last visit: 11.06.09
- Posts: 755
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 ] -
- Rank: Professional
- Registered: 04.09.02
- last visit: 27.06.09
- Posts: 938
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 -
- Rank: Professional
- Registered: 23.11.03
- last visit: 27.06.09
- Posts: 1678
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! -
- Rank: Professional
- Registered: 23.11.03
- last visit: 27.06.09
- Posts: 1678
Also thinking the UserUtil could use some UserUtil::[get|getAll|set][user]Profile() methods.
--
Under Construction! -
- Rank: Team Member
- Registered: 08.12.03
- last visit: 29.06.09
- Posts: 3062
Topiatic
But it assumes that the property label '_YOURHOMEPAGE' hasn't been changed.
I came to the same conclusion...
--
David Pahl
Zikula Support Team -
- Rank: Freshman
- Registered: 01.04.08
- last visit: 14.02.09
- Posts: 11
thanks!!!works great!!!Code
$home_page = pnUserGetVar(_YOURHOMEPAGE)
Regards
--
-. Karman .-
http://www.inexinferis.co.nr
PD: Excuse my English, I am learning... xD
- Moderated by :
- Support
