HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Copying default theme

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#73446 (In Topic #15368)
Avatar

Fan in action

I'm trying to make a copy of the default theme, but when I check the "copy theme" box, the following error occurs:

error

An error occurred when loading this screen onto the web browser. You are being notified of this as you are staff. If you believe this is a bug in the website software, please contact ocProducts with full details. More details are available in your browser's error console. The error was:

845: themee is null
http://www.xxxxxxxx.it/adminzone/index.php?page=admin_themes&type=edit_theme&theme=default

If I close the window and save the theme, the result is another error page with the message:

One of these with the name ‘default’ already exists.

even if I have changed the theme name.
Any idea?

Thanks
Giulio


   
Back to the top
 
Posted
Rating:
#73449
Avatar

Yes, that's a bug. However copying the default theme makes no sense, just create a new theme and it will inherit from 'default' automatically for anything you have not overridden.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#73455
Avatar

Fan in action

I would leave to members the chance to choose the theme, but I don't want the default to be choosen. So I was thinking: I make a copy of the default and change it to match the site design.
Or is there another way to hide the default theme for users?


   
Back to the top
 
Posted
Rating:
#73456
Avatar

I think you can disable it's permissions on that same edit form.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#73459
Avatar

Fan in action

The default theme has not a "permissions" section!


   
Back to the top
 
Posted
Rating:
#73464
Avatar

Actually I can see that the default theme has no permissions and thus only admin can explicitly select it. I just tested this is the case :).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#73467
Avatar

Community saint

But anyone, including guest, can just put keep_theme=default in the URL and they will get it.

I was also going to bring this up ages ago but forgot about it. There are numerous thing that get broken on my site with a default theme.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#73468
Avatar

If they put that manually on there, so what if they see it broken ;)? They must know it's an ocPortal site, so it's not a surprise to them, and they must know they are tampering, so it's not a surprise to them :P.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#73469
Avatar

Fan in action

temp1024 said

But anyone, including guest, can just put keep_theme=default in the URL and they will get it.

I was also going to bring this up ages ago but forgot about it. There are numerous thing that get broken on my site with a default theme.

It's not enough…
I've some themes, the site main theme is "green" (the one with the codename = site name).
Well, if I let the users choose, and they edit their own profile, in theme setting there is "use site default" and this choiche corresponds to"green" theme. If they switch to anothere theme (es. yellow) the site theme becomes "yellow". If they switch back to "use site default", the theme becomes "default", and not "green".
It's not simple for me explain it in english, but I hope you'll undestand what I mean…


   
Back to the top
 
Posted
Rating:
#73472
Avatar

Ah, yes.

The solution is if you give a theme a name based on your sitename it will be the "Site default". If your site was called "This is an example site" then the theme would need to be named "This_is_an_example_site".


Last edit: by Chris Graham


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#73473
Avatar

Fan in action

So I did not explain… :(
That's what I've done:
1- create a theme with the site name (HomeBrewers_Sardi) and a theme named "Yellow"
2- assign to forum zone the "Respect user setting" theme
3- go to forum zone - the theme is HomeBrewers_Sardi (correct!)
4- edit profile - the theme field reports "Use site default".
5- change theme to "Yellow" and save
6- the forum zone theme is now "Yellow" (correct!)
7- edit profile - change back the theme to "Use site default" (should be HomeBrewers_Sardi) and save
8- the forum zone theme is now "Default" (not correct!) instead of HomeBrewers_Sardi…

Is there something I'm missing?


   
Back to the top
 
Posted
Rating:
#73485
Avatar

Community saint

Chris Graham said

If they put that manually on there, so what if they see it broken ;)?

If its broken, then they should not be able to see it, should they :dry:

Chris Graham said

They must know it's an ocPortal site, so it's not a surprise to them, and they must know they are tampering, so it's not a surprise to them :P.

But the more people that know about ocPortal, the more will know where to look.

Its just a loose end that should not be there.



Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#73507
Avatar

temp1024 said

Chris Graham said

If they put that manually on there, so what if they see it broken ;)?

If its broken, then they should not be able to see it, should they :dry:

Chris Graham said

They must know it's an ocPortal site, so it's not a surprise to them, and they must know they are tampering, so it's not a surprise to them :P.

But the more people that know about ocPortal, the more will know where to look.

Its just a loose end that should not be there.



It's not as simple to fix as you might think. The default theme may have to be used during error situations, especially during the bootstrap sequence, where permissions won't be available (e.g. because a login isn't active yet). It's also complex when you consider the default theme as a fallback, e.g. if every other theme does not have permissions. One theme needs to always be usable. I'm sure it could be solved by designing very precise rules about what sequence of checking should happen and when permissions may be ignored, but it's complex code that runs during bootstrapping as well as error-bailout, so adds more potential failure points, and adds to the general default code weight (memory limit, opcode parse time), of the system – too hairy to want to consider.

I don't really agree with the general point. I mean even if you have a Ferrari but people can still look underneath it or take the hub caps off. It is a decision they are making to change their experience, it's not the experience provided to them.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#73508
Avatar

Fantasma said

So I did not explain… :(
That's what I've done:
1- create a theme with the site name (HomeBrewers_Sardi) and a theme named "Yellow"
2- assign to forum zone the "Respect user setting" theme
3- go to forum zone - the theme is HomeBrewers_Sardi (correct!)
4- edit profile - the theme field reports "Use site default".
5- change theme to "Yellow" and save
6- the forum zone theme is now "Yellow" (correct!)
7- edit profile - change back the theme to "Use site default" (should be HomeBrewers_Sardi) and save
8- the forum zone theme is now "Default" (not correct!) instead of HomeBrewers_Sardi…

Is there something I'm missing?

Confirmed. Fix attached.
Attachment
sources/forum/ocf.php
» Download: ocf.php (58 Kb, 137 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#73510
Avatar

Community saint

Ahh, OK. At least there is a good reason.

Chris Graham said

I don't really agree with the general point. I mean even if you have a Ferrari but people can still look underneath it or take the hub caps off.

True, but chances are that it wouldn't leave the factory if those areas were damaged or disfigured.

Lets agree to disagree on that point :lol: .

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#73511
Avatar

Hehe, ok ;).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#73514
Avatar

Fan in action

Chris Graham said

Confirmed. Fix attached.

works perfectly  :thumbs:
Thanks a lot!


   
Back to the top
 
Posted
Rating:
#73702
Avatar

Honoured member

Is the file provided already included in the available installer downloads?

Or do I need to grab this file separately here.

Thanks!
Back to the top
 
Posted
Rating:
#73706
Avatar

If my fix is older than the last patch release by more than 2 hours it would have been included.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: