Webmastersite.net
Register Log In

Categories and pages
Problems with page links

Comments on Categories and pages

Ducnan Clarke
Member

Usergroup: Member
Joined: Dec 19, 2003
Location: Stoke, UK

Total Topics: 7
Total Comments: 20
Posted Jun 14, 2005 - 7:01 AM:

I've just upgraded to 2.15 (from I think 2.01) and all is running fine apart from 1 thing. When viewing a category with more than 1 page of images, the links to the other pages is not working. I am using the same template I was using previously. In the old version (urbanlines.net/gallery.old/...?action=displaycat&catid=4) it correctly points to the previous and following pages. However in the new version (urbanlines.net/gallery/inde...?action=displaycat&catid=4) it seems to replace my directory "gallery/" with the word "kunden".

I can't find this word anywhere in the database or in any file in the gallery software. Any idea how it got there, and more importaqntly how I get it to work as normal?

Thanks
Ducnan Clarke
Member

Usergroup: Member
Joined: Dec 19, 2003
Location: Stoke, UK

Total Topics: 7
Total Comments: 20
Posted Jun 14, 2005 - 12:07 PM:

Been having a play with commonfuncs.php. It works fine if I usethe old version of this subroiutine. With the new subroutine I get links like:
- http://urbanlines.net/kundenindex.php

If I comment out the "if ($inadmindir)" check, then I get:
- http://urbanlines.net/gallery/kundenindex.php

If I comment out the "if (strlen($path > 25))" check, then I get:
- http://urbanlines.net//kundenindex.php

If I comment out both checks so it functions like the older version then I get the (correct) form:
- http://urbanlines.net/gallery/index.php

So, it's working again, but I was wondering what could be causeing this, as it may cause others problems.
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Jun 16, 2005 - 8:57 PM:

When the pagination fails, that usually indicates a problem with the file upload path to the attachments directory. I'll see what I can learn from your post though.

Edit: I'll use this alternative function now, should be safer.
function thephpfilename()
{
global $settings, $inadmindir;
$path = $_SERVER['SCRIPT_FILENAME'];
if (!strstr($path, '.php')) $path = $_SERVER['SCRIPT_NAME'];
if (!strstr($path, '.php')) $path = $_SERVER['PHP_SELF'];
$path = str_replace('\\\', '/', $path); // make slash scheme predictable
$terms = explode('/', $path);
$path = end($terms);
return $path;
}
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



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