Webmastersite.net
Register Log In

new 0
variable request

Comments on new 0

peumus
Forum Regular

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile

Total Topics: 172
Total Comments: 462
peumus
Posted Aug 31, 2005 - 12:49 AM:

Paul,

Link variables are very powerful because they work on the wrapper.
Specially useful are the link variables that return the category value as they work also deeply at link details.

Considering this I would like to suggest {LINKCATPARENTID} variable.

Returning the category were the links are, at the moment we do have:

LINKCATID:
LINKCATNAME:
These are returning the actual category but if we are in a sub-category they return sub-category value.

We can use LINKNAV: to extract the parent category but would be more direct to have {LINKCATPARENTID}

Thank you in advance.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 31, 2005 - 1:36 AM:

I'm getting concerned about the RAM issues of including extra functions like this in the classes. That memory ends up involved in every page load. Nonetheless, I believe
 function catparentid()
{
$parentid = 0;
if ($this->parentids != '')
{
$p = explode(', ', $this->parentids);
$parendid = $p[0];
}
return $parentid;
}

is what you're looking for. Put it above function canremove() in classes/onelink.php. Will be in future versions.
peumus
Forum Regular

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile

Total Topics: 172
Total Comments: 462
peumus
Posted Aug 31, 2005 - 9:08 PM:

Thank you,
I have inserted this function and it's returning me only a value of cero regardless of the parentcategory the links are in.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 02, 2005 - 12:16 AM:

Fixed
 function catparentid()
{
$parentid = 0;
if ($this->parentids != '')
{
$p = explode(', ', trim($this->parentids, ', '));
$parentid = $p[0];
}
return $parentid;
}
peumus
Forum Regular

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile

Total Topics: 172
Total Comments: 462
peumus
Posted Sep 02, 2005 - 11:30 PM:

Thank you.

The new variable is working fine.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.