File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JForum and the fly likes Admin theme (kind of...) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Admin theme (kind of...)" Watch "Admin theme (kind of...)" New topic

Admin theme (kind of...)

robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
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).
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33130

Cool! I gave you a cow for sharing this.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
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.
I agree. Here's the link:
subject: Admin theme (kind of...)
It's not a secret anymore!