Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Language parameter (for external link to gallery)  (Read 9618 times)

0 Members and 1 Guest are viewing this topic.

^SuPeR^

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Language parameter (for external link to gallery)
« on: December 21, 2006, 12:02:03 am »

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:

Code: [Select]
<?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

Logged

Nibbler

  • Guest
Re: Language parameter (for external link to gallery)
« Reply #1 on: December 21, 2006, 12:09:57 am »

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

^SuPeR^

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Language parameter (for external link to gallery)
« Reply #2 on: December 21, 2006, 12:29:06 am »

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? ::)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Language parameter (for external link to gallery)
« Reply #3 on: December 21, 2006, 07:22:37 am »

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.
Logged

^SuPeR^

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Language parameter (for external link to gallery)
« Reply #4 on: December 21, 2006, 10:37:49 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
Code: [Select]
include("index.php");
and seems to work fine.

Could I get some problems with this include?

Thanks :)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Language parameter (for external link to gallery)
« Reply #5 on: December 21, 2006, 11:18:18 am »

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.
Logged

^SuPeR^

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Language parameter (for external link to gallery)
« Reply #6 on: December 21, 2006, 12:10:37 pm »

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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Language parameter (for external link to gallery)
« Reply #7 on: December 21, 2006, 12:15:13 pm »

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).
Logged

^SuPeR^

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Language parameter (for external link to gallery)
« Reply #8 on: December 22, 2006, 01:17:23 pm »

Thanks GauGau for support...I'll try this ;)
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.