Webmastersite.net
Register Log In

mod_rewrite on hidden categories
not working

Comments on mod_rewrite on hidden categories

mrowton
Forum Regular

Usergroup: Customer
Joined: Feb 19, 2004
Location: Michigan

Total Topics: 57
Total Comments: 185
mrowton
Posted Sep 18, 2005 - 9:31 PM:

Works when I unhide, stops working again when I re-hide.
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 20, 2005 - 7:42 AM:

With what HTML are you linking to hidden categories, and where?
mrowton
Forum Regular

Usergroup: Customer
Joined: Feb 19, 2004
Location: Michigan

Total Topics: 57
Total Comments: 185
mrowton
Posted Sep 20, 2005 - 9:00 PM:

I'm doing category name rewriting so its pretty strait forward.

<a href="Pending">Pending</a>

Show hidden categories in the admin panel displays the non-rewritten link

index.php?action=displaycat&catid=xx

Going to this URL works fine. After I get there the <a href="https://www.webmastersite.net/forums/">{LANG_NAVORIGIN}</a> {NAVIGATION} does not work, as well as the pagination.

I can un-hide the category in the admin panel, refresh the page, and the navigation and pagination work.

Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 28, 2005 - 9:33 AM:

In index.php replace
 if ($startfrom > -1 && $subs[0] != '')
{
$q = $db->select('id', 'categoriestable', "validated=1 AND hide=0 AND deleted=0 AND name='". $thiscatname ."' AND parentnames='". $parentlist ."'", '', '');
$catid = $db->rowitem($q);
}
else
{
$q = $db->select('id', 'categoriestable', "validated=1 AND hide=0 AND deleted=0 AND name='$name' AND parent=0", '', '');
with
 if ($startfrom > -1 && $subs[0] != '')
{
$q = $db->select('id', 'categoriestable', "validated=1 AND deleted=0 AND name='". $thiscatname ."' AND parentnames='". $parentlist ."'", '', '');
$catid = $db->rowitem($q);
}
else
{
$q = $db->select('id', 'categoriestable', "validated=1 AND deleted=0 AND name='$name' AND parent=0", '', '');
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



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