Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Set a new default theme  (Read 9465 times)

0 Members and 1 Guest are viewing this topic.

Andy_Delbaere

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
    • SvekaSchoten.Be
Set a new default theme
« on: September 21, 2007, 08:33:19 pm »

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
« Last Edit: September 22, 2007, 01:42:32 pm by GauGau »
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Set a new default theme
« Reply #1 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?
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Set a new default theme
« Reply #2 on: September 22, 2007, 07:39:09 am »

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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Set a new default theme
« Reply #3 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).
Logged

Andy_Delbaere

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
    • SvekaSchoten.Be
Re: Set a new default theme
« Reply #4 on: September 22, 2007, 12:34:28 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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Set a new default theme
« Reply #5 on: September 22, 2007, 12:37:31 pm »

Did you try my suggestions?
Logged

Andy_Delbaere

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
    • SvekaSchoten.Be
Re: Set a new default theme
« Reply #6 on: September 22, 2007, 12:43:01 pm »

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
Logged

Andy_Delbaere

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
    • SvekaSchoten.Be
Re: Set a new default theme
« Reply #7 on: September 22, 2007, 12:46:03 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Set a new default theme
« Reply #8 on: September 22, 2007, 12:56:09 pm »

PM me an admin account please.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Set a new default theme
« Reply #9 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.
Logged

Andy_Delbaere

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
    • SvekaSchoten.Be
Re: Set a new default theme
« Reply #10 on: September 22, 2007, 01:22:32 pm »

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Set a new default theme
« Reply #11 on: September 22, 2007, 01:23:48 pm »

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

Andy_Delbaere

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
    • SvekaSchoten.Be
Re: Set a new default theme
« Reply #12 on: September 22, 2007, 01:29:19 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
Logged

Andy_Delbaere

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
    • SvekaSchoten.Be
Re: Set a new default theme
« Reply #13 on: September 22, 2007, 01:35:16 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Set a new default theme
« Reply #14 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.
Logged

Andy_Delbaere

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
    • SvekaSchoten.Be
Re: Set a new default theme
« Reply #15 on: September 22, 2007, 01:53:38 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
Logged

MarkP

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Set a new default theme
« Reply #16 on: October 12, 2007, 03:16:41 pm »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 20 queries.