Not signed in (Sign In)

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

    • CommentAuthorSnuurtje
    • CommentTimeOct 1st 2008 edited
     
    Hello,

    I have a website that uses 4 different languages. The language is sent through the URL of the page like this: http://www.website.com/en/ . My plogger album I have inserted with the codes:
    <?php require("photogallery/gallery.php"); ?>
    <?php the_gallery_head(); ?>
    <?php the_gallery(); ?>


    But this page itself is named photos.php with .htaccess i sent trough the language like this:

    RewriteRule ^(.*)/photos/(.*)/(.*)/$ photos.php?lang=$1&level=$2&id=$3 [L]
    RewriteRule ^(.*)/photos/(.*)/$ photos.php?lang=$1&level=$2 [L]
    RewriteRule ^(.*)/photos/$ photos.php?lang=$1 [L]


    As you can see i have tried to sent along the language, but it wont work when i click on a collection. it wont show what is inside.

    So really what i am asking is how can i implement plogger into a page while also maintaining my own $_GET variables in that page.


    Hope someone can help me out!

    Greetings,

    Martijn
    •  
      CommentAuthorsidtheduck
    • CommentTimeOct 1st 2008
     
    Do you have a link, Martijn?
    • CommentAuthorSnuurtje
    • CommentTimeOct 1st 2008
     
    I do, but i wont think that'll help as much as my explanation above. At www.alsacorp.eu you can find my attempt to integrate plogger in the photos section. Website is still being developed btw. I really need to add an extra variable in the URL in order to display language appropiatly.
    •  
      CommentAuthorsidtheduck
    • CommentTimeOct 2nd 2008
     
    Thanks for the link, Martijn.

    So, from your post above, I'm assuming you are hoping for a link like this www.yoursite.com/en/photos/collection/2/ to show the plogger collection #2, am I right? However, the URL that Plogger generates is like this: www.yoursite.com/en/photos/?level=collection&id=2 or if you have cruft-free URLs on and are forcing Plogger to think that it's not embedded, like this: www.yoursite.com/en/photos/collection-name/. So really, none of your rewrite rules above are doing the trick at the moment because you are passing the wrong information. If you let me know which way you want your URLs to be generated (cruft-free or not), then I can try to help you out with your rewrite rules to get it going correctly.
    • CommentAuthorSnuurtje
    • CommentTimeOct 2nd 2008 edited
     
    No, the plogger album links dont nessecairly need to be cruft free. But i need to maintain my original link: http://www.yoursite.com/en/photos/ witch is a translation for http://www.yoursite.com/photos.php?lang=en But i need the plogger url to be added to that, and working. Now it does add the plogger url but the photo album doesnt work as you can see. I tried http://www.yoursite.com/photos.php?lang=en&evel=collection&id=2 witch does work, but when i rewrite to that it doesnt work anymore.

    RewriteRule ^(.*)/photos/?level=(.*)&id=(.*)$ photos.php?lang=$1&level=$2&id=$3 [L]

    first half gives how it displays now, and second half i try to rewrite to a working http://www.yoursite.com/photos.php?lang=en&level=collection&id=2

    But still doesnt work.
    •  
      CommentAuthorsidtheduck
    • CommentTimeOct 2nd 2008
     
    Try this Snuurtje,
    RewriteRule ^(.*)/photos/\?level=(.*)&id=(.*)$ photos.php?lang=$1&level=$2&id=$3 [L]

    I just escaped your first question mark (?) since that is part of a regular expression. See if that does anything for you.
    • CommentAuthorSnuurtje
    • CommentTimeOct 3rd 2008
     
    thanks for your help, my .htaccess is now:

    RewriteRule ^(.*)/photos/\?level=(.*)&id=(.*)$ photos.php?lang=$1&level=$2&id=$3 [L]
    RewriteRule ^(.*)/photos/\?level=(.*)$ photos.php?lang=$1&level=$2 [L]
    RewriteRule ^(.*)/photos/$ photos.php?lang=$1 [L]

    But my page still doesnt work, if you check out this link:
    http://www.alsacorp.eu/fr/photos/?level=collection&id=2

    I have added a check for the variables but it only finds lang... I really dont know why it doesnt find the other 2 variables
    • CommentAuthorSnuurtje
    • CommentTimeOct 3rd 2008
     
    Wait a minute, i just found the generate cruft free urls option in plogger ;-| this could solve all my problems because the question mark is then gone. But i enable it. It does work here: http://alsacorp.eu/photogallery/index.php but it doesnt work here: http://alsacorp.eu/en/photogallery/

    How could that be?
    •  
      CommentAuthorsidtheduck
    • CommentTimeOct 3rd 2008
     
    Snuurtje,

    The cruft free urls aren't working because Plogger thinks it is embedded within another script (since there is the extra language "directory" Plogger thinks it is being called from a different directory). This causes the cruft free URL mod_rewrites to be disabled because it is nearly impossible for the Plogger script to determine the mod_rewrite rules automatically when set from the Plogger Admin section. If you would like this functionality, I can attempt to help you hack the code to work with your language mod_rewrites.

    However, I do have a fix for you. You should have cruft-free URLs off and this would be your only mod_rewrite rule:
    RewriteRule ^(.*)/photos/$ photos.php?%{QUERY_STRING}&lang=$1 [L]

    That should work for you.