Language parameter (for external link to gallery) Language parameter (for external link to gallery)
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Language parameter (for external link to gallery)

Started by ^SuPeR^, December 21, 2006, 12:02:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

^SuPeR^

Hi...I have a problem...
I would link the gallery from external php page...with language set.
I don't know well php but I understand that I have to set the variable for language before include index.php of coppermine.
But I don't know the name of that variable.
I think about a similar file
MyIndex.php:

<?php
$lang 
'italian';
include(
"index.php");
?>



and I would get the same of the open link with this parameter
index.php?lang=italian

It's possible to know the varible to set for this?

Thanks in advice...excuse for my english


Nibbler

It would be $_GET['lang'] but you can't include Coppermine like that in the first place.

^SuPeR^

Thanks nibbler for answer...there is a way to include Coppermine?
I would like to create an external menu (in various language) with some choose, one of this is the link to Coppermine.
So...if the language is italian i would like that under that menu Coppermine in italian appears.
It's possible? ::)

Joachim Müller

You can't use the PHP commands "include()" or "require()" at all to embedd Coppermine into another page. Change the link in the first place to link/to/gallery/?lang=italian. However, I don't understand why you would want to do that in the first place: Coppermine's language auto-detect does what it is suppossed to do, no need to interfere with it.

^SuPeR^

Quote from: GauGau on December 21, 2006, 07:22:37 AM
Coppermine's language auto-detect does what it is suppossed to do, no need to interfere with it.

Excuse me GauGau...I didn't know this feature...it's work well.  ;)

But...why I can't embed Coppermine into another page? I try
include("index.php");

and seems to work fine.

Could I get some problems with this include?

Thanks :)

Joachim Müller

Definitely yes. If you do anything else before the include (i.e. start the output), Coppermine will not work. If you don't output anything, what's the use of including in the first place.
As I suggested: Coppermine can't be used that way. Instead of posting code snippets, post what you actually want to accomplish. As far as I can see, you only want to wrap Coppermine into the overall layout of your site. This can be accomplished, but not using PHP's include command.
Post what you actually want to do. Links might help as well.

^SuPeR^

Thanks GauGau...
this is what I would like to do:
http://freephotoproject.altervista.org/FPP/Eng_Index.htm
Now it works with 2 frames...if you click on gallery...Coppermine opens in bottom frame.
Now I'm changing all in php...and I would show the same effect...
http://freephotoproject.altervista.org/FPP/Index_Fra.php

I hope I explained this in the right way.

Joachim Müller

Just like I thought: create a custom theme that matches the look of your overall site. Pretty basic imo, just copy & paste the corresponding code into themes/yourtheme/template.html (after the <body> tag).

^SuPeR^