Jump to content

Template System Grievances


EugeneDae

Recommended Posts

1) Please make it easier and more developer friendly to edit themes outside Admin CP. Like most professional web-developers, I do not ever edit code in a browser and would not recommend anyone doing that.

WebDAV was too slow for me, so I went the "masterMap.php" route.

2) Please fix your guide to editing HTML and CSS outside the Admin CP.

  • Fix broken images (stored at MobileMe which has been shut down by Apple).
  • The guide implies that the folder names should be prefixed with "master_". Experimentally I found out that this is not necessary.
  • "If you want to preview your changes live, perform these additional steps". Obviously noone in their sound mind would want to go to the Admin CP and click "Import..." every time they make a change in the CSS or template. That part of the article should be merged with the rest of the guide.
  • Add information on steps to take when you're finished, i.e. how to export the skin to use in production.

3) In masterMap.php you juggle with terms "ID" and "skin key". For example, "Change the ID to your own skin if desired", while the guide tells me to use the "skin key" and not the ID. I'm not sure how to obtain the ID of a skin. This might seem a trifle for you, but for a newcomer this is confusing.

4) After following the guide, I tried to revert inDevDefault to 0 in masterMap.php and got the following error:

Fatal error: Call to a member function userHoverCard() on a non-object in /(my public html)/forum/admin/sources/base/ipsMember.php on line 158

(Note that I had define('IN_DEV', 1) in conf_global.php).

Even if I'm not supposed to do that, I think the system should return a more verbose error.

5) Theme files are supposed to go into three directories:

  • forum/public/style_css/mytheme
  • forum/public/style_images/mytheme
  • forum/cache/skin_cache/mytheme

Why not place them under a single parent? (Or at least, CSS + HTML). It'd be easier to work with and I'd be easier to put them under version control. Git can not track several parent directories in one repository (symlinks won't work either), so I had to start my repository in the forum root (forum/) and then exclude everything but my theme files via .gitignore. Very, very ugly.

6) Replacement variables do not work in exported CSS.

In the database I have the following:

background: #212121 url({style_images_url }/topic_button.png ) repeat-x top;

which in the exported CSS turns into:

background: #212121 url(http://localhost/~Dae/long-path-here/forum/public/style_images/mytheme/topic_button.png ) repeat-x top;

First of all, it looks ugly.

Secondly, it makes it really hard to share code using version control. Other users will want to replace "http://localhost/~Dae/" with "http://localhost/~Matt/" or "http://localhost/~Alex/", causing a mess in the repository.

7) It is my understanding that developers of a complex template system such as yours should always incite theme developers to make their changes in styles (CSS) rather than structure (HTML), because changes in structure may cause problems in the future as new features arrive.

In the default theme (IP.Board) it is hard to target some of the UI elements by the means of CSS. For example, there is no class/ID for the "Sign Out" link at the top (although there is id="sign_in" for the "Sign In" link). I can't target pinned topics in CSS either, so if I wanted them to stand out against other topics in my theme, I'd have to change HTML.

8) Code reusability.

For example, ".input_submit" looks the same as a "ul.topic_buttons" but the code repeats twice. Same applies to ".ipsButton_extra" and ".ipsButton_secondary".

Why not just make them use one class, like ".button"? That's how Twitter Bootstrap does it (they call it ".btn").

If you used LESS, you could make it by the means of it and not HTML:

ul.topic_buttons {
.button();
}


9) Please start using LESS or SASS or anything else that would make the CSS code concise and better readable.

Link to comment
Share on other sites

I somewhat agree on the first point you make here, but one of the things I think is nice about having it in a template system is that unedited template bits are inherited from the parent / master skin. I guess there are techniques IPB could use so it still would work like that though.

Another nice thing is the differences report so you can work out what you've changed yourself in the styles and what you need to update (when upgrading for example)

5) Theme files are supposed to go into three directories:

  • forum/public/style_css/mytheme
  • forum/public/style_images/mytheme
  • forum/cache/skin_cache/mytheme

Why not place them under a single parent? (Or at least, CSS + HTML). It'd be easier to work with and I'd be easier to put them under version control. Git can not track several parent directories in one repository (symlinks won't work either), so I had to start my repository in the forum root (forum/) and then exclude everything but my theme files via .gitignore. Very, very ugly.








I agree! I hope you don't mind me leaving a link to an earlier topic I posted: Make IPB more developer- version-control and -testenvironment friendly

I think you could agree with some of the other ideas there aswell, so maybe we could provide that feedback over there.
Link to comment
Share on other sites

unedited template bits are inherited from the parent / master skin.

Isn't that one of the reasons why they put everything in functions?

Thanks for the link, very interesting!

It was indeed very surprising for me to find out that I can't just dump /cache/ folder to rebuild it later, because it contains irreplaceable PHP code.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...