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
- jmvaughn responded to »error when i try to upgrade to the last version of dizkus module (3.1)« 12:05 PM
- localrags responded to »Remove contents of nuke_sc_anticracker from Database« 11:30 AM
- jmvaughn created topic »TagIt 3.0 for Zikula« 09:34 AM
- jmvaughn responded to »Shoutit for zikula 1.3?« 09:31 AM
- mdee responded to »Different page content under one template (tpl file) based on URL« 07:17 AM
- espaan responded to »Categories disappear when editing ...« 08. Feb
- eledril responded to »How decrease zikula cpu usage« 08. Feb
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
doubt about system vars
-
- Rank: Registered User
- Registered: Mar 31, 2008
- Last visit: Feb 14, 2009
- Posts: 11
-
- Rank: Moderator
- Registered: Mar 15, 2005
- Last visit: May 30, 2010
- Posts: 1077
In Smarty, I know this works:
Code
<!--[pngetbaseurl]-->
I'm not sure on the core variables?
--
[ stevencopley.com ] -
- Rank: Registered User
- Registered: Mar 31, 2008
- Last visit: Feb 14, 2009
- 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: Moderator
- Registered: Mar 15, 2005
- Last visit: May 30, 2010
- Posts: 1077
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: Software Foundation
- Registered: Sep 03, 2002
- Last visit: May 09, 2010
- Posts: 909
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 "If you want people to RTFM, make a better FM!" -
- Rank: Expert
- Registered: Nov 23, 2003
- Last visit: Dec 13, 2009
- Posts: 1487
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: Expert
- Registered: Nov 23, 2003
- Last visit: Dec 13, 2009
- Posts: 1487
Also thinking the UserUtil could use some UserUtil::[get|getAll|set][user]Profile() methods.
--
Under Construction! -
- Rank: Team Member
- Registered: Dec 07, 2003
- Last visit: May 09, 2010
- Posts: 2703
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: Registered User
- Registered: Mar 31, 2008
- Last visit: Feb 14, 2009
- 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
