1
ianez
Theming and templating in Xoops: my two cents
  • 2010/11/10 11:50

  • ianez

  • Not too shy to talk

  • Posts: 188

  • Since: 2006/1/26


Hi there Xoops users and developers,
in the last weeks I have spent some time in testing on the next to come Xoops version (2.5) and I was really delighted by the large improvements/add on in the admin side.
Talking about theming and templating as much as I was delighted by admin side I was equally frustrated by the user side, which is the same (more or less) which I ran into six years ago when I started playing with Xoops..
Something has been done surely.. but I feel to say clearly guys that Xoops is still a large step back from other cms and probably from real world theming...
From Xoops 2.5 I was expecting a change in this situation or at least a change in the general approach, for example a new more stylish css default theme (able to attract new user) or more clean templates..
This did not happen and by some point of view things seems to get even worse...
The problems I point out are mainly:
1) default theme/ system templates are still table based and sometimes kind of buggy or don't output a good/accessible layout
2) css is approached and structured in a unnecessary complex way

First point it's something we see from many years in Xoops.. you start with the default theme with a border with no padding around text (awful), you have unneeded tables in profile visualization and still you can't have an ordered/readable list of user activity in profile.. and much much else... everyone knows that if you want to do a good/stylish site with xoops you need to put some efforts in giving system templates a smarter look..

Second problem it’s just a matter of choosing what css should be used for..
The xoops.css style sheet in 2.5rc2 it’s 16kb large file (almost a jscript framework!) attached to every page and setting up a myriad of classes that should be used as standard in theming and templating..
so following that line if I want to style I div in my theme/module I should write something like:
<div class=”width80 pad2 small uppercase green solidsilver line100”>

Because almost every css attribute now has a class representing it for example:
.solidsilver border 1px solid #c0c0c0;}

… but guys this is not what css should be used for, it’s reverting back to inline style, because styling a div that way it’s the same of writing html attributes in the markup..
You have same approach in templates.. system_userinfo.html for example has a class (or more than one) for almost every html tag in the page.. it seems that has been forgotten that with css you can style directly html tag and that id/classes should be semantic (describe and style what the element contain) not merely contextual.
This way of organizing css make harder the work for a theme developer which for simply styling the user profile now have to deal with a large number of applied classes and should also know not only normal css language but also the ‘language’ imposed by the xoops.css file.
Well my opinion (and I guess I’m not the only one..) is that this complex and ‘non-standard’ way of approaching css and templating it’s not taking Xoops on a good road and it’s not helping the general growth which we all see in the project.. because we all know that people choose a cms also for the visual impression it receive from it at first test.. and people choose to develope for a cms when it sees solid and clean structure in code (and this apply to html/css also)

Now I want to be positive and propose possible solutions..
For point one I’ve ported a solid tableless, full css theme in Xoops environment transforming it in the default Xoops theme we all know, all te info are herehttps://xoops.org/modules/news/article.php?storyid=5679
For point two I’ve started ‘redrawing’ system templates in a more clean and also accessible way..
So on my test site you can see how things could be done looking at the source of the table showing infos about user, rewritten applying three simple class..http://xoopsing.isgreat.org/userinfo.php?uid=1
I’m planning to rewrite all the system templates following this line (and where possible avoiding tables..)

I don’t think mine it’s the best markup/style in the web, these are only one of the possible solution for a simpler, standard and accessible approach to theming/templating that a great project like Xoops should have.
Hope that this too much long post will open a constructive discussion and may be some of you guys would like to join me in building a solid theming project for Xoops able to set solid foundations and rules for theme and module developers.. later on I’ll write about this

Thank for your attention
Ian

2
ghia
Re: Theming and templating in Xoops: my two cents
  • 2010/11/10 14:06

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Resized Image I totally agree with your points of view!!! Resized Image
Thank you for bringing this somewhat lesser developed part of XOOPS up to par.

3
Mamba
Re: Theming and templating in Xoops: my two cents
  • 2010/11/10 17:20

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Quote:
Now I want to be positive and propose possible solutions..

I love the fact that you see something that you think could be improved, and instead of just complaining, you're actually providing a possible solution!

We need more of that!

Wishing your guys a very productive discussion...

Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

4
aitor
Re: Theming and templating in Xoops: my two cents
  • 2010/11/10 17:26

  • aitor

  • Not too shy to talk

  • Posts: 148

  • Since: 2002/1/2 2


ianez waiting for future advancement to this idea of new css working way.

I personally like your css because it is outside of desing, if you know where to change is easy to make the change and also easy to make big changes.

Hope that you can let us know where to make changes in the theme to hide left block or right block etc.

I am thinking in the posibility to make a little module to allow set the size of the blocks, change the logo, change basic colors.

Showing your css file i see it easy to develop and could make easy to made new users start play with xoops.

Also could be good the good other efects seen in other themes, to show where could be they implemented, like slideshow or xoops header with search here - logout - wellcome back etc.

I think that your theme could be a really good start.

Hope that this could be understand, my english is not as good as i want.

5
ianez
Re: Theming and templating in Xoops: my two cents
  • 2010/11/10 19:12

  • ianez

  • Not too shy to talk

  • Posts: 188

  • Since: 2006/1/26


@ghia, @mamba
than you for your support,
hope more people will join the discussion!
and in a few I'll post here a more detailed program

@aitor
I guess your post it's more about the theme I posted recently.. so I've answered you in another discussion wich you can find herehttps://xoops.org/modules/newbb/viewtopic.php?topic_id=72618&post_id=333466#forumpost333466

Ian

6
kris_fr
Re: Theming and templating in Xoops: my two cents
  • 2010/11/10 22:06

  • kris_fr

  • Theme Designer

  • Posts: 1009

  • Since: 2005/12/31


Regarding the usefulness of generic css class, a new version of the xoops-styles module will show you the possibilities - note that these classes have been used to simplify the css code for the new system module.
Most cms have such generic class, and it is quite normal and useful to have them in xoops

7
ianez
Re: Theming and templating in Xoops: my two cents
  • 2010/11/11 17:30

  • ianez

  • Not too shy to talk

  • Posts: 188

  • Since: 2006/1/26


general purpose classes are certainly useful.. and I've always used them..
contextual css which specyfies an attribute for a given object it's really useful (like the general cursive class applied to a div with 'tablist' class...<div class="tablist cursive">)

in a theme may be you can have from five to ten general purpose classes.. but I've never see such a huge amount of classes specyfing the border width, the colors , twenty types of different width ecc ecc..
my opinion it's that we just have css language.. what exactly is the benefit of creating almost another language making the learning curve wider for new users/developers??
because I'm sure 100% of any theme designer know how to create a class for having a dotted border.. but no one knows
.dottedwhite border 1px dotted #fff;}
and I can't understand why someone should learn it..

last but not least css it's not a markup language.. it has to be used for presentation semantics.. so if you apply an id/class or more than one to every single line of the html.. well css loses its function and there's almost no difference from writing inline style or html attributes

Login

Who's Online

218 user(s) are online (125 user(s) are browsing Support Forums)


Members: 0


Guests: 218


more...

Donat-O-Meter

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

Latest GitHub Commits