How to create a Xaraya Theme

I made over computerpoint.tv in less than a couple of hours, and that included installing Xaraya 0.902, importing the previous PostNuke 0.723 data using import8.php AND creating the theme!

Themes with BL are extremely easy. I am sure I haven’t even scratched the surface or capabilities of the BlockLayout templating engine, but I got it done, here’s how:

1. Copy over Xaraya_Classic into whatever name you like your new theme to be, let’s say MacyGray:

# cp -R Xaraya_Classic MacyGray

2. you might want to “reserve an id” for your theme, do this on Xaraya.com, note the id you’ve chosen, then edit the xartheme.php file and enter it there. While in there, also change all other information that needs to change like the theme name, directory etc. In vi I do:

:g/Xaraya_Classic/s//MacyGray/g

that will replace all occurances of Xaraya_Classic and replace them with MacyGray

do the same for all other files, do a grep at the root of the theme directory to see where Xaraya_Classic occurs then go ahead and change that as I’ve done above in vi or whatever editor you use:

# cd themes/MacyGray
# grep -R Xaraya_Classic *

This will spew all occurances of Xaraya_Classic in all the files in the directory and the subdirectories, then go to each file and do a replace as above.

3. Now you have the basic framework for MacyGray, time to get creative!!

Use your html editor and load up default.xt, you might need to rename it temporarily to default.html for some html editors to recognize and load the file.

Load up the style.css file so that you ensure that you’re working on the complete theme and avoid surprises! There is a LOT of information and control in the css file and you can change just about anything in the theme by changing values in the stylesheet file. It is also here that you would change the page background color, fonts to use, font attributes, etc. Again your html editor should give you a way to change things in the stylesheet in a graphical environment, or of you’re a masochist, you could do that in vi!! 😀

Go ahead and put the graphics etc and other elements, basically create your theme here then save the file.

4. Check that your html editor didn’t screw up the graphic paths, make sure that your graphics are “themes/MacyGray/images/topimage.png” or whatever, rather than “file:///” etc.

5. Everything saved, make sure that the permissions on the files and directories are good.

6. Go to the “Themes” admin, regenerate, initialize and activate your theme.

7. Now go to Themes > Module Config and select your new theme as the default…

et voila! Now you have a new theme for Xaraya!!

For variables and tags to use (if you need more that is, you could check the BlockLayout RFC on Xaraya.com)


thanx to whoever pointed out that it should be xartheme.php rather than xarversion.php. this is fixed now

Comments

  1. mahmood

    Re: perl implementation of the above at:

    thanx very much!! now we should have quite a few themes being generated!

  2. anonymous

    xarversion.php

    Should “xarversion.php” in this theme howto not be xartheme.php????

  3. mahmood

    Re: xarversion.php

    you’re absolutely correct! thank you for pointing that error out. it is fixed now.

  4. mahmood

    Xaraya Theme Building

    John Cox has written a MUCH better tutorial for Xaraya theme building that I have above, please go and have a look at it there as I think it is much more benefitial to you than the notes I have above.

    Visit DinerMinor.com to have a look at the very sexy theme John made and browse his articles. The tutorial is available here.

  5. anonymous

    Still working on it.

    The tutorial is only half finished. I still have the blocks, module, xarversion to explain:)

    jc

  6. [deleted]0.41920900 1099323329.386

    Whats wrong with Xaraya??

    Doas anybody know what is happening with the Xaraya Community? The link above does not work, e.g. the german site is completely down and a lot of content is missing on the official site??

    Thanks for any information.
    Kosmo

  7. mahmood

    Re: Whats wrong with Xaraya??

    The server died a rather horrible death. They have just resurected it with archived information. I suspect however that the development has gone unabated and expect v1.0 out soon.

    Check the mailing lists for more information.

  8. anonymous

    Hi Mahmood!

    Thanks for publishing this tutorial. I have the last xaraya and it looks awesome! Can you please tell me what I have to do when you say ”
    # cp -R Xaraya_Classic MacyGray”
    or
    ” # cd themes/MacyGray

    # grep -R Xaraya_Classic *”

    where do I have to type that? Is that a Linux command?

    Thanks,
    Nadir

  9. anonymous

    How to create a Xaraya Theme

    Ah, ok, thanks! I have Windows, so I’ll try to figure out what each command means!

Comments are closed.