Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorAnnie
    • CommentTimeFeb 27th 2010
     
    I've had my Plogger album running for a few months now and I've just decided to switch on the Cruft-free URLs function. The plogger gallery itself seems to work but my site design is now broken. I think all the links to my normal web pages, css file and images within the template have been disrupted. The only page which displays OK is the main gallery index page.

    What do I need to do to fix this? My Plogger installation says I'm using 'Version 3.2.LastChangedRevision Beta' but I thought I originally loaded something with numbers like 549 or something. I'm using a modified default theme.
    • CommentAuthorAnnie
    • CommentTimeMar 2nd 2010
     
    Can anyone offer any help with this issue please? I want to use SEO friendly URL's.
    •  
      CommentAuthorsidtheduck
    • CommentTimeMar 2nd 2010
     
    Annie,

    We need to see a link to see what is messed up and why. If you don't want it public, you can "whisper" to any of the moderators (sidtheduck, kimparsell, ryanduff, mike) or email it to sidtheduck AT gmail DOT com.
    •  
      CommentAuthorsidtheduck
    • CommentTimeMar 3rd 2010 edited
     
    Hi Annie,

    I'm thinking it probably is an issue with your relative paths.
    Instead of this:
    <link rel="stylesheet" href="../style1.css" type="text/css" />
    Try using root paths like this:
    <link rel="stylesheet" href="/style1.css" type="text/css" />

    If you lead with a '/', it follows the path from the root URL. I believe this works on local files as well (in case you do save it to DVD at some point). The only thing about saving to DVD is to make sure your theme files are changed to root paths as well, plus you will have to save all of the output files as HTML files (you will not be able to use dynamic PHP files on a DVD system without a server like XAMPP or WAMP or EasyPHP).
    • CommentAuthorAnnie
    • CommentTimeMar 3rd 2010
     
    Thank you. That worked.

    May I trouble you to ask a few more questions please?

    1) Is there a way of saving the output files as static html pages or do I need to take a snapshot of the site?

    2) Is there a quick way of implementing a 301 redirect facility for all of my gallery pages now that I have changed all the URLs to the cruft-free version or will I have to implement this page by page?

    3) Lastly, I tried to use the solution below to alter the underscore to a hyphen in the URL path but I still have underscores. My filenames are just numbers (to help me order my photos) but the albums have descriptive names which I'd like to be search engine friendly.

    In file plog-functions.php find this lines:

    // sanitize filename by replacing international characters with underscores
    function sanitize_filename($str)
    {
    // allow only alfanumeric characters, hyphen, [, ], dot and apostrophe in file names
    // the rest will be replaced
    return preg_replace("/[^\w|\.|'|\-|\[|\]]/","_",$str);
    }

    and replace this "_" with "-" .


    I did this and changed it to

    // sanitize filename by replacing international characters with underscores
    function sanitize_filename($str)
    {
    // allow only alfanumeric characters, hyphen, [, ], dot and apostrophe in file names
    // the rest will be replaced
    return preg_replace("/[^\w|\.|'|\-|\[|\]]/","-",$str);
    }


    ie. I changed the underscore in the return preg_replace("/[^\w|\.|'|\-|\[|\]]/","_",$str); to a hyphen.

    Did I do it right or is this just a solution for photo filenames and not for the album part of the URL?
    • CommentAuthorAnnie
    • CommentTimeMar 3rd 2010
     
    Did someone reply to me? I got an email to say there was a reply but I can't see a post here?