Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Hacks and Modifications

Post Reply
 
Thread Tools
  #1  
Old 03-18-2006, 08:46 PM
RobbieMc Offline
pp veteran
 
Join Date: Feb 2006
Location: Canada
Posts: 78
Help PHP Gurus: How to pass a new variable to the URL?

I am just about finished a hack that will make my PP bilingual and user-switchable (except for dbase entries). I need one more piece:

I want to code a single TAG for all template pages that recognizes the language chosen and then delivers a link to switch to the other. Currently, <CHANGE_LANGUAGE>, which goes on all template pages, recognizes the language and passes "&lang=fr" to the existing URL, switching both the language files and the templates (and I have a separate template file for each language). The problem is that as I currently have the link formatted it resets the URL to "index.php?lang=fr" regardless of where I am, which obviously then goes back to the current image.

How do I pass from a link an additional variable to the existing URL without deleting any of the variables already there? The result has to work regardless of the content of the URL. That is, if I am currently on "index.php?x=browse&category=3", I need the link to add the "&lang=fr", but leave the rest intact, so the result is "index.php?x=browse&category=3&lang=fr". I thought &PHP_SELF would do it, but it is already defined in PP as index.php.

Thanks for any help.
Rob
Reply With Quote
  #2  
Old 03-23-2006, 04:46 AM
RobbieMc Offline
pp veteran
 
Join Date: Feb 2006
Location: Canada
Posts: 78
I think I figured out the answer to my own question. See step 4 in this hack: http://forum.pixelpost.org/showthread.php?t=3668
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 05:11 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs