1
studioC
please don't use inline styles or class even/odd and things in your modultemplates
  • 2013/6/22 16:13

  • studioC

  • Friend of XOOPS

  • Posts: 922

  • Since: 2003/12/7


while digging through some templatefiles of modules, it seems that regarding this topic not much has changed during the years I was absent. Correct me, if I am wrong!

It's not that funny to clean templatefiles ... especially not, if you are not a coder.

I just wrote an article in my blog let's talk about xoops classes "even" and "odd".

Quote:
It's not that funny to clean templatefiles ... especially not, if you are not a coder.


today, there we have other ways to achieve this.

using :nth-child(even) in css is only one little "new" thing you should use. While you would like to display data out of a loop there are not many arguments to use inline-styles or attributes like align="left" which makes it hard to override.

Using CSS we can grab those things and display them like we want, we can individually grab nearly any number of a child, the first, the last ... using the pseudo-selector :nth-child. Really no need to care for while creating modules, really.

Can we talk about this (again)?

why don't you use html element aside for your blocks? and section within module output? what about data-attribut?


Why you (module-developer) should use this?

For you, there will be no need to care for. Do what you can do best and which makes most fun for you.



sorry for just being back and actually a little bit sucked (once) again :( These are only some things I thought about while playing with xoops. It's really sad not to see those things i was used to use but not here in my old xoops.

I'm willing to help where I can, while playing with xoops themes.



2
zyspec
Re: please don't use inline styles or class even/odd and things in your modultemplates
  • 2013/6/22 16:26

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


@studioC

This is good information, thank you. I'm sure Angelo Rocha would welcome help if you could make some suggestions for improving/replacing the xoops.css in the next version of the core so we (module developers) could use your CSS3 suggestions and remove the 'clutter' in the module templates.

I do not profess to be proficient in html5/CSS3 and anything you can do to help us move in the right direction (WIKI, tutorials, suggestions, etc) are greatly appreciated. As a module developer I would rather not include 'extra' classes, ids, inline CSS, etc. but currently without doing some of this in the modules they look terrible since the core doesn't give us many options to do it 'right'.

I am currently working on Xoopspoll and Mylinks and would be very happy to let you help me rework the templates so they render correctly.

3
studioC
Re: please don't use inline styles or class even/odd and things in your modultemplates
  • 2013/6/23 7:47

  • studioC

  • Friend of XOOPS

  • Posts: 922

  • Since: 2003/12/7


Zyspec,

Thats goog Timing, i Needed a link-modul for my Site and installed the lates Version ( i Hope it is the latest) of mylinks.

I will Love to Play with it's templates there.

Sorry for misusage of Case sensitive, my Tab is making me Crazy correcting Most of what i typend in

4
studioC
Re: please don't use inline styles or class even/odd and things in your modultemplates
  • 2013/6/23 9:42

  • studioC

  • Friend of XOOPS

  • Posts: 922

  • Since: 2003/12/7


sorry, i know that this is not the support forum, but just a short question:

where do i find how <{$category.image}> is assigned and where can i see the creation of that link, where do you set the height, etc..

perhaps i'm missing something, while rendering mylinks_index.html the path to category image is build like that

img src='<a href="

img src= < href?

5
zyspec
Re: please don't use inline styles or class even/odd and things in your modultemplates
  • 2013/6/23 15:09

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


@studioC,

The current revision is v3.11 RC3. There have been some issues found (that I believe have been corrected in the next release - I'm testing the changes now). For the specific <{$category.image}> fix look athttps://xoops.org/modules/newbb/viewtopic.php?start=20&topic_id=75888&order=ASC&status=&mode=0

Someone has also asked about changing the size of the category image. I'll have to admit this was left over from previous releases and I didn't change it to CSS

You can find the image size defined in line 35 in the './templates/mylinks_index.html' file. On that line you'll see
... style='height: 50px; ...

By the way, I've sent you a PM to discuss Mylinks and templates.

Thanks in advance.

6
irmtfan
Re: please don't use inline styles or class even/odd and things in your modultemplates
  • 2013/6/24 5:26

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


IMO a module developer duty is separating module templates from module codes.
In other words, In a well-written module everybody could change the look in MODULE/templates OR in themes/THEME/MODULE

Therefor i suggested months ago to move all css/js/images to templates folder as you can see in my version of newbb:

http://svn.code.sf.net/p/xoops/svn/XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/

So for example if i was not aware of this new thing:
Quote:

using :nth-child(even) in css is only one little "new" thing you should use.

or better this:
http://css-tricks.com/examples/nth-child-tester/
Sorry it is hard for me to understand.
you as a designer can add it yourself and provide a better template for me as a module developer.

As a module developer I just look at xoops.css for available css (include css3) codes and if i dont find a code to solve my issue i search in the net. So it is the duty of core team to enhance css and js.

But anyway im totally agree to remove all hard-coded css like inline css coding. (css in html files)

Login

Who's Online

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


Members: 0


Guests: 149


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