1
spudrussell
My "how to update a theme" school of hard knocks process
  • 2006/6/18 20:19

  • spudrussell

  • Just popping in

  • Posts: 7

  • Since: 2005/6/27


After what seemed to me as far too much stumbling around, I got a new theme working. From this forum, it seems that others stumble around and hit walls, too. This post summarizes some steps that might make it easier for others. Note that I was starting with a working site that had a working theme. I wanted to add a new theme and eventually ditch the old one, but the process turned out to be quite painful.

Here is the process I worked out via trial and error. Please correct anything. Some steps can be taken in a different order:

1) back up your working site and database(s) for disaster recovery
2) make sure all templates (not themes) are generated (system admin - template - then generate)
3) clone the default template set and switch to it (system admin - preferences - general-edit - select your clone as the "default template set" and submit)
4) download a theme from whereever to your local machine, unzip, read instructions if any, upload to your server themes directory. Your new theme file should have a similar file structure as other installed themes. Make sure permissions are the same as other installed themes. (Wrong permissions can cause the dreaded white screen.) I use Filezilla for FTP and chmod -- With Filezilla select a theme folder on the server - right click - file attributes - 755 I think is correct. (Everybody can read and execute and only you can write.)
5) make the new theme potentially useable (system admin - preferences - general-edit - Make two changes: A) turn "Update module template .html files from themes/your theme/templates directory?" to "Yes" -- This lets you see changes. and B) select your new theme under "Selectable Theme" -- However, make certain that your stable working theme is also selectable. (You want to have access to both. If you don't allow your stable theme to be selectable, you can lock yourself out of your site with the dreaded white screen.) Also DO NOT change you default theme to your new theme until the whole process is done and until you are sure your new theme is solid. Then, submit.
6) configure a viewable theme selector on your anonymous user front page (system admin - blocks - anonymous user top page - themes block visible - with a high weight so it is way down the page and most users will not see it if your site is live - then submit) This gives you a way to back out of trouble and get back into your site. Since your stable theme is still default, you can bring up a browser and go to your site and your stable theme will show. Next, you can select the new theme from the selector box on the anonymous user front page. If your new them shows, that is goodness. If it is a vast blank white space, you should be able to use your browser's back arrow to get to your old theme and then log in as admin.
7) To ensure that your changes show on your site, some advice tells you to dump your server XOOPS "template_c" directory (Do NOT delete index.html). These are your site's auto generated complied templates. Seems not to hurt to dump them, because they are automatically generated in response to users' clicks on your website.
8) Make your theme edits. Protect yourself by editing copies of files and not writing over the only copy of theme files that you know work. (There are many ways to do this.)
9) If your changes still do not show on your site, then flush your browser cache, and hopefully they will.
9) When everything is pretty and stable, then you can make your new theme your default, turn off the "Update module template .html files ..." and get rid of the theme selector on the anonymous user home page.

Also for general information, read the "Themes- Styles and Templates" forum at
https://xoops.org/modules/smartfaq/category.php?categoryid=17 , see some nice tutorials at
http://www.warpigw2.com, and check out http://www.macambridge.com/dummies/

Hope this helps...

2
spudrussell
Re: My "how to update a theme" school of hard knocks process
  • 2006/6/19 16:59

  • spudrussell

  • Just popping in

  • Posts: 7

  • Since: 2005/6/27


One thing I forgot for this list:

Do not change the folder name of your new theme directory. The name matters, including the case of the letters. If you change the directory name without making changes to other files (which I do not know or want to know how to do), XOOPS will lose track of your theme and other problems will ensue.

3
kab22222
Re: My "how to update a theme" school of hard knocks process
  • 2008/9/20 20:37

  • kab22222

  • Just popping in

  • Posts: 1

  • Since: 2008/9/17


thank you

4
wadadliblue
Re: My "how to update a theme" school of hard knocks process
  • 2008/10/15 17:33

  • wadadliblue

  • Just popping in

  • Posts: 1

  • Since: 2008/10/15


Very helpful. Sorry you had to suffer for my sake but thanks much.

5
mariane
Re: My "how to update a theme" school of hard knocks process
  • 2009/1/20 15:07

  • mariane

  • Theme Designer

  • Posts: 649

  • Since: 2008/1/11


spudrussell, first thank you for the information, second let me told you abt my modest experience in the theme world :
- there is 2 kind of themes : one contains 1 style.css like the default theme and other one contains many css like zetagenesis or the current one used in xoops.org.
it will be more easy to use the default one and make the changes you wish. or choose any theme you like it and make it your default theme and then do necessary changes.
- the default one can be renamed without any prob but it isnt contains a redirection page.
for me , i tried a lot with the default theme, and i totaly tranformed it to another one, this one is my default theme, now i make changement on it.

i advice you to do the same steps : make your default theme and changes will be more easy
the road of success is always under construction

6
unspoken
Re: My "how to update a theme" school of hard knocks process
  • 2009/11/18 19:43

  • unspoken

  • Just popping in

  • Posts: 23

  • Since: 2008/8/25


thanks ;)

7
CodeWarrior
Re: My "how to update a theme" school of hard knocks process
  • 2013/8/22 10:17

  • CodeWarrior

  • Just popping in

  • Posts: 5

  • Since: 2013/4/1 1


Thanks. Useful. Will keep this in mind.

Login

Who's Online

149 user(s) are online (81 user(s) are browsing Support Forums)


Members: 0


Guests: 149


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits