forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: Motorhead on February 17, 2005, 06:01:04 pm

Title: multiple site linking
Post by: Motorhead on February 17, 2005, 06:01:04 pm
Sorry if this is wrong section, but wasn't sure what this would come under :D ...


OK I've got two sites that I want to both access my Coppermine Gallerys, but I want them to appear slighlty different

One is my SMF forum which I've already intergrated Coppermine with and also gone with the SMF theme, really pleased with that...

The other is another website I run, but I don't want it to see the SMF forum banner or buttons ...

I'm not sure what the code is but put simply some code that does this......

Quote
If website calling this coppermine page is site 1 then jump to section 2 (ignoring display banner code)

Display Gallery Banner and Buttons

Section 2

Display thumbnails and images




hope this makes sense

thanks







Title: Re: multiple site linking
Post by: Joachim Müller on February 17, 2005, 06:08:27 pm
you have to create two coppermine themes: the one that comes with your smf site should be your default theme (set in coppermine config), and the other one that overrides the default one - just do so by changing the link that points from your second site to your gallery: instead of
Code: [Select]
<a href="http://yoursite.tld/your_coppermine_folder/">your gallery link</a>, it should be
Code: [Select]
<a href="http://yoursite.tld/your_coppermine_folder/?theme=your_second_theme_name">your gallery link</a> - this sets the cookie of the visitors from the second site to override the default theme.
HTH

Joachim
Title: Re: multiple site linking
Post by: Motorhead on February 17, 2005, 06:13:51 pm
wow that sounds simple even a code dope like me could handle that :D

now what happens if I join the red and black wires ;)

thanks off to make a theme now :D

Title: Re: multiple site linking
Post by: Motorhead on February 17, 2005, 06:31:06 pm
sorry back again

I'm just trying it as a direct link in my browser but failing

this is what I'm putting in my browser using an exisiting theme

http://www.orrp.com/copper/?theme="classic"

the theme that is set is the "smf" one, so I'm trying to get the standard classic to show without changing the config

I'm guessing I'm missing something




Ignore me , I'd quoted the "theme" :) sorted crawls off in shame

thanks


Title: Re: multiple site linking
Post by: Motorhead on February 17, 2005, 06:56:07 pm
In the words of Slim Shady "guess whose back"

By adding the theme option to a URL to link to the main index page of Coppermine no problem

eg http://www.orrp.com/copper/?theme=classic

But when I try to use theme in the URL of a Catergory I'm not having any success

ie   what I want is to be able to link to different catergorys or pages within my Album and use a theme other than the one set in config !!!

Title: Re: multiple site linking
Post by: Joachim Müller on February 18, 2005, 06:13:19 am
when adding more than one var to an url you separate the vars with ampersands, like this: http://yoursite.tld/folder_name/file_name.xyz?var1=foo&var2=bar&var3=whatever, so in your case you would have to create a link like this: http://www.orrp.com/copper/index.php?cat=3&theme=classic

Joachim
Title: Re: multiple site linking
Post by: Motorhead on February 18, 2005, 02:27:42 pm
once again I bow before your wisdom :D


Now one final question, if I use a URL containing the theme tag that works great....but when I enter the gallery via my SMF forum using the User links in the SMF member profiles it still seems to use the theme I used in a direct link URL

1.   If I haven't used a theme tag in a URL link and I enter the gallery by a normal link I get the theme set in the gallery settings

2. If I've entered the Gallery using a link containing a specified theme, then leave the Gallery and then re-enter using a URL which doesn't specify a theme it still uses the theme I set in the previous URL

It's hard to explain but hopefully it makes sense

thanks again



Title: Re: multiple site linking
Post by: Joachim Müller on February 18, 2005, 04:57:11 pm
1. If I haven't used a theme tag in a URL link and I enter the gallery by a normal link I get the theme set in the gallery settings
expected behaviour: isn't this what is suppossed to happen?

2. If I've entered the Gallery using a link containing a specified theme, then leave the Gallery and then re-enter using a URL which doesn't specify a theme it still uses the theme I set in the previous URL
The theme a user has selected is stored in a cookie. I thought it was your intention that users coming from the second page are never meant to see the theme the smf users can see - that's what the mod does. You (as admin) have to trick your way around all this, I recommend you use a different browser to see what this all looks like for "regular" users. To reset the theme a user has chosen for himself (that is stored in the cookie), just specify a theme name that doesn't exist, e.g. http://www.orrp.com/copper/?theme=reset or http://www.orrp.com/copper/?theme=foobar

Joachim
Title: Re: multiple site linking
Post by: Motorhead on February 18, 2005, 05:27:55 pm
OK guessed it might be cookie related, and yes Number 1 is usual behaviour I understand that, I was just finding it hard to explain what happens :D

I'll download another browser and see how it looks to normal users ....

Once again thanks for the help
Title: Re: multiple site linking
Post by: Motorhead on February 18, 2005, 08:37:58 pm
I think I'm going to have to find another way, this just isn't working

I want it to display differentently no matter which way I access the gallery...with using theme in the url its still remembering the theme when I try to view it through the smf forum and thats on a new browser and not even logging in so no admin powers...

oh well it was worth a try :(