Set a new default theme Set a new default theme
 

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

Set a new default theme

Started by Andy_Delbaere, September 21, 2007, 08:33:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy_Delbaere

Hello,
I want to make a different theme the default theme for my gallery.
I see this in the config (settings) -> theme settings -> Theme
It's always on classic
the only way to change this is to delete every theme exept mine.
But other users sometimes use the classic one even if i don't give them a choice
so they can't see the gallery anymore :s
So i had to put classic theme back in and i had to put the theme list on so they could change it and maybe if all users use mine then i can delete the classic theme again.
Is this normal or what should i change?
Thanks
my gallery is http://gallery.svekaschoten.be

grtz,

Andy

Tranz

I don't understand the issue. Are you saying that you change the theme in Config and it changes back to Classic?

Stramm

If users have once chosen a theme in the theme selector, then this selection is saved in a cookie. If they come back after you've switched your default the cookie settings will override your new config settings and therefore coppermine attempts to load the classic theme (set in the cookie).

So either keep the themes or change the cookie name in config. That somehow 'resets' user settings. They also will have to log in again.

Joachim Müller

Another option to render all user-selected stuff irrelevant is changing coppermine's cookie name in coppermine's config. This will do that same as if you deleted all cookies from your users. They all will have to log in once more.

But imo the original question deals with something else: Andy seems to have issues setting his custom theme as default theme. The reason is that he played with his own cookies, making another theme the default for him only. Real simple solution is to access coppermine's config with the new custom theme as URL parameter. Let's say your custom theme's name is "bill", then just access http://gallery.svekaschoten.be/admin.php?theme=bill
Another thing that might cause problems is capitalization or illegal chars in a theme name (i.e. the folder name of your custom theme). Make sure that it is all lower case and only contains alphanumerals. Only allowed special chars are the dash and the underscore.

@Andy: post the name of your theme. Ah, strike that. I just went to your themes folder and realized that you haven't set the proper index option in .htaccess, so one can access your folder structure just fine (which is not a good thing usually, but it helps when supporting). So your custom theme is named "svekaschoten". Do as I suggested and access your config page with this theme name: http://gallery.svekaschoten.be/admin.php?theme=svekaschoten
You should be able to pick that as default. If not, rename your cookie, then try again. Make sure to use a valid cookie name as well (in fact, the same naming scheme I suggested above for theme folders applies to cookies as well).

Andy_Delbaere

Quote from: TranzNDance on September 21, 2007, 09:16:52 PM
I don't understand the issue. Are you saying that you change the theme in Config and it changes back to Classic?

Yes i mean that
In the theme settings you can pick your theme from a dropdownbox i selected mine (svekaschoten) and i saved it
when i go look back it's back on classic
is this normal that it just takes the first one again maybe it saved svekaschoten in background but puts the wrong one first again.

Joachim Müller


Andy_Delbaere

Quote from: GauGau on September 22, 2007, 11:39:01 AM
Another option to render all user-selected stuff irrelevant is changing coppermine's cookie name in coppermine's config. This will do that same as if you deleted all cookies from your users. They all will have to log in once more.

But imo the original question deals with something else: Andy seems to have issues setting his custom theme as default theme. The reason is that he played with his own cookies, making another theme the default for him only. Real simple solution is to access coppermine's config with the new custom theme as URL parameter. Let's say your custom theme's name is "bill", then just access http://gallery.svekaschoten.be/admin.php?theme=bill
Another thing that might cause problems is capitalization or illegal chars in a theme name (i.e. the folder name of your custom theme). Make sure that it is all lower case and only contains alphanumerals. Only allowed special chars are the dash and the underscore.

@Andy: post the name of your theme. Ah, strike that. I just went to your themes folder and realized that you haven't set the proper index option in .htaccess, so one can access your folder structure just fine (which is not a good thing usually, but it helps when supporting). So your custom theme is named "svekaschoten". Do as I suggested and access your config page with this theme name: http://gallery.svekaschoten.be/admin.php?theme=svekaschoten
You should be able to pick that as default. If not, rename your cookie, then try again. Make sure to use a valid cookie name as well (in fact, the same naming scheme I suggested above for theme folders applies to cookies as well).

I'll try to change the name of the cookie
i hope i don't get problems with my forum integration i should be alright if i don't pick the same cookie name right?
how can i restrict the access for my folder structure? or where can i find info about that?
Thanks for your help i'll come back later to let you know if i fixed it

Andy_Delbaere

I changed the cookie name and i get the old theme again :s
where can i change the name http://gallery.svekaschoten.be/admin.php?theme=svekaschoten  ??

Joachim Müller


Joachim Müller

This is indeed strange. I tried with the admin account you PMed me. Does not work as expected. Did you modify coppermine's core code (except coming up with your theme customizations)? What happens if you delete or rename the folder of the classic theme using your FTP app? Another thing you should try is using a tool like phpMyAdmin to directly access your database. Browse Coppermine's config table, locate the setting for "theme" and directly key in the name of your custom theme as value for that key.

Andy_Delbaere


Joachim Müller

Is there an echo in here? I already told you in my previous posting that I used the admin account you PMed me... ::)

Andy_Delbaere

Quote from: GauGau on September 22, 2007, 01:21:08 PM
This is indeed strange. I tried with the admin account you PMed me. Does not work as expected. Did you modify coppermine's core code (except coming up with your theme customizations)? What happens if you delete or rename the folder of the classic theme using your FTP app? Another thing you should try is using a tool like phpMyAdmin to directly access your database. Browse Coppermine's config table, locate the setting for "theme" and directly key in the name of your custom theme as value for that key.

No i didn't change any core code and the theme i only adjusted one i downloaded if i delete the classic to zclassic my theme svekaschoten will come up first
but some users won't see the gallery anymore since the default theme is missing
I already looked in the database to change a key but i didn't found the one i was looking for :s
i'll look at it again and i'll let you know

and sorry about the echo
looks like a bad refresh from my side

Andy_Delbaere

found it in the database
it was still on classic
i changed it to svekaschoten in the database
i'll ask some users to check if it's fixed now :)
but i think it will
i checked the settings and it's on svekaschoten there too
so it works only writing to the database seems to have some troubles :s don't know if that's just me?

Joachim Müller

Now that it "sticks", what happens if you go to your config screen? Does it show up your custom theme's name as default theme? What happens if you change a config setting (something else than the theme) and save the changes? Does the custom theme still stick?
To make sure all of your users will see the new custom theme as default theme, just rename your coppermine cookie once more.

Andy_Delbaere

Quote from: GauGau on September 22, 2007, 01:44:42 PM
Now that it "sticks", what happens if you go to your config screen? Does it show up your custom theme's name as default theme? What happens if you change a config setting (something else than the theme) and save the changes? Does the custom theme still stick?
To make sure all of your users will see the new custom theme as default theme, just rename your coppermine cookie once more.

my custom theme name is the name i put in the database so it's now svekaschoten as i want it to be.
when i change a setting (like the cookie name) i log out and log in again and my custom theme svekaschoten is still there
so it should be alright now :D

MarkP

I also was having these problems after upgrading to 1.4.13. I followed the steps for phpMyadmin and reset cookies and everything is fine now. Just wanted to let you gurus know incase there is a fix for this in the next release.