This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Admin theme (kind of...)

Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just discovered I could do this, which helps.



It's nearly self-contained, with it's own image folder, etc.

So, copy the default styles.css into a subfolder in there e.g.


Then change,


removing the old styles.css file code in favour of (I added the -admin prefix to the file to remind me what it's for),

<link rel="stylesheet" type="text/css" href="${contextPath}/templates/${templateName}/admin/styles/style-admin.css" />

Good. Now the admin is near self-contained (images use url() addressing), and will be in default style. And you can hack away at the upper level templates and stylesheet as you wish (without crippling admin). This is not a complete defence, there are a few other links, and don't, ever delete JForum supplied images, or the admin pages will go for a walk.

Still, glad I figured this when I did (a couple of hours ago).
author & internet detective
Posts: 39396
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cool! I gave you a cow for sharing this.
robert crowther
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, thanks. And me a Limey - thats alright

I pushed this a little and found table styling does mess the admin display. I figure table styling is very likely, so here's revised instructions,

1 (as above) Use a clean default styles.css sheet, put it in a subfolder of admin, and point the main header at it.
2 Also, point (both in /admin) menu.htm and admin_welcome.htm at the /admin/style.css.

And that should do it. I suppose you could refactor completely, for complete sandboxing (of an admin theme), but the above should cover most theme styling activity.
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!