WebmasterSite.net: PHP scripts to enable your creativity
WSN Links PHP Directory Software
PHP Scripts Webmaster Links Support Forums

Register | Forgot Password

Categories and pages
Problems with page links

Version:
printPrint


Categories and pages
Ducnan Clarke
Member
Avatar

Usergroup: Member
Joined: Dec 19, 2003
Location: Stoke, UK
Total Topics: 7
Total Posts: 20
Posted 06/14/05 - 04:01 AM:
quote post
#1
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 (http://urbanlines.net/gallery.old/index.php?actio...) it correctly points to the previous and following pages. However in the new version (http://urbanlines.net/gallery/index.php?action=di...) 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

See my galleries at
- http://urbanlines.net
- http://bugrunners.co.uk
Ducnan Clarke
Member
Avatar

Usergroup: Member
Joined: Dec 19, 2003
Location: Stoke, UK
Total Topics: 7
Total Posts: 20
Posted 06/14/05 - 09:07 AM:
quote post
#2
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.

See my galleries at
- http://urbanlines.net
- http://bugrunners.co.uk
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 55
Total Posts: 5926
Posted 06/16/05 - 05:57 PM:
quote post
#3
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;
}


Edited by Paul on 06/18/05 - 02:18 AM

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

   
 
© 2008 Paul Knierim. All rights reserved.