Poll

Should Wedge remove theme support, if it provides an equivalent feature set through skins?

Yes! Focus on what you know best, and let us break it or make it.
17 (73.9%)
No! I'm too familiar with the theme system, I don't want to re-learn it all.
0 (0%)
I don't really care. I never played with themes, or skins for that matter.
1 (4.3%)
I don't know enough about it all to have anything interesting to say.
5 (21.7%)
Total Members Voted: 22

Nao

  • Dadman with a boy
  • Posts: 16,082
One theme to rule them all?
« on November 10th, 2013, 11:09 PM »
So, these days, the skin system has become really, really powerful. Powerful enough to be able to replace themes altogether, but it's up to you to decide.

- Theme settings: the equivalent is in skin.xml, in a thoroughly documented XML format; you can provide your own settings in custom.xml.
- Templates: while right now you can't simply replace an existing template, you can:
   (1) write replacement functions for any template in your own Custom.template.php
   (2) write replacement functions for any template in skin.xml (or custom.xml, etc),
   (3) add code before or after an existing template function (through methods 1 or 2)
   (4) very easily add any custom JavaScript or CSS to any template.
   --> Overall, I think I could also provide the ability to override entire templates, but I'd like to avoid it, as it may easily break compatibility in the future. But really, it's just a matter of checking the skin folder, and loading the template there, instead of the 'default' template folder.
- Plugins, and skins, can already override, or add to any template functions, manipulate the layout skeleton so that one element will be shown before another instead of after it, etc.
- The only thing that isn't possible for now is completely overriding image sets, or language files, or scripts. I may write code in the future to account for these.

I don't really see anything that can't be done in skins. Granted, it might be easier to do some things in SMF and the theme system, but it's also true that some other things are much easier in Wedge, so... All in all, I think the skin system is better, more modern, and better suited to designers.
Removing themes from Wedge would allow me to...
- Simplify the folder structure. All folders in /Themes/default/ would be moved to the forum root.
- Remove a lot of legacy code from Wedge that I don't even know if it still works at this point. (I think it does.)
Drawbacks:
- It will postpone the first beta release by at least another two weeks.
- Likely to create bugs in the first phase of implementation.
- Heck, personally, I certainly hope I can still 'blame' files and view the 'commit history' for any files that have been moved, without any disruption. I think it'll be all right, but really, it's one of the things I'm worried about. I like blame, it's one of the best tools for debugging in (D)CVS software. Certainly saves me a lot of time.

So, please vote if you have any opinion on this!

Sara

  • Walking Contradiction
  • Posts: 41
Re: One theme to rule them all?
« Reply #1, on November 10th, 2013, 11:18 PM »
Got a question: Let's say I want to edit the header and move items around.  With skins, will the header be placed in a template function for me to override like a plugin?

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: One theme to rule them all?
« Reply #2, on November 10th, 2013, 11:32 PM »
Quote from Sara on November 10th, 2013, 11:18 PM
Got a question:
No problem!
Quote from Sara on November 10th, 2013, 11:18 PM
Let's say I want to edit the header and move items around.  With skins, will the header be placed in a template function for me to override like a plugin?
This is what the header area looks like, right now, in the index template:

Code: [Select]
// Start the header layer.
function template_header_before()
{
echo '
<div id="header"><div class="frame">';
}

function template_top_bar_before()
{
echo '
<div id="top_section"><div class="frame">';
}

function template_top_bar_after()
{
echo '
</div></div>';
}

// End the header layer.
function template_header_after()
{
global $context, $settings, $options;

echo '
<div id="upper_section"', empty($options['collapse_header']) ? '' : ' class="hide"', '><div class="frame"><we:banner title="',
$context['header_logo_url_html_safe'], '" url="', !empty($settings['home_url']) && !empty($settings['home_link']) ?
$settings['home_url'] : '<URL>', '">', $context['site_slogan'], '</we:banner>
</div></div>
</div></div>';
}

It will eventually be tweaked, probably to add more layers inside upper_section so you can override more specific functions. Basically, to change the header, you can do either of these:
- override (through custom.xml or Custom.template.php, or a plugin) template_header_after, or add a function before or after it. (You can override/before/after any function, even something that already overrides/befores/afters an existing function.)
- override the "banner" macro. This is what's in <we:banner>. It's basically the same as overriding a template function (aka block), but it may be a bit less overkill. Other macros available are title headers. You can completely rewrite their HTML, it'll be repercuted to all cat/title/title2 instances.

Is that all good with you..?

Sara

  • Walking Contradiction
  • Posts: 41
Re: One theme to rule them all?
« Reply #3, on November 10th, 2013, 11:40 PM »
Yep!  That was the only thing that was on my mind in terms of the new skins system, how to edit efficiently.  You got my vote for skins!

Re: One theme to rule them all?
« Reply #4, on November 11th, 2013, 01:51 AM »
Seems the logical way to go for Wedge since you put so much power into the skins feature.

For me its the other way around though - I like being able to scratch *almost* everything from default, and just write new and exciting things. Most others don't , heh. :P With the functions provided it will be a tweakers dream in Wedge I think: replace this function, carefully build that section up...and still run as solid as default theme does. But thats also wherein the challenge lies, how to make that easy enough for anyone to try, and where I suspect that Wedge skins will *maybe* be the playground for those that can code foremost - and second for those can design.

I know how important examples are though, so if you provide good ones showing the real power with skins - then people will copy and expand upon that. If not..well, then it will be like SMF, just default theme color versions. (I looked once again at SMF site for themes yesterday, and found a couple flat color projects, with more or less the default layout used. Sigh(..))

That said..SMF never became the "wordpress" of forum software graphically, so maybe it doesn't matter at all. I am not sure where you see Wedge in that respect.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: One theme to rule them all?
« Reply #5, on November 11th, 2013, 07:43 AM »
Oh, Bloc, you know I have the uttermost respect for your experiments.
I would totally include any of them as core in Wedge. (default or even root would depend on neutrality for former and code shortness for latter.)

For instance I remember i really was in love with your Vienna BBS experiments. Protendo a bit less (at least on mobile) but I can assure you of one thing: anything you experimented so far is doable in Wedge.
If i can have you onboard for skins... telle what I need to do to reassure you it's doable and exciting ;)

Re: One theme to rule them all?
« Reply #6, on November 11th, 2013, 08:22 AM »Last edited on November 11th, 2013, 08:28 AM by Bloc
Thanks, likewise. :) The fact that you stuck with your vision and haven't not given up, is commendable.

True, I did more experiments in ViennaBBS as it were..but I thinks thats mainly because I've been more focused on having Protendo going in the right direction under the hood - so less time for graphical things. The current theme is on the minimalist side - its my current "phase" :D - but I see that it needs more themes, more diverse ones. And that I can do easily, but the old fashion way of replacing themes rather than skins/variations only. But, I am doing somewhat similar to Wedge in that some elements are built-in, my guess is that themers most likely want to replace the templates, but not so much the js or support css. (I have gone a bit back on my goal to be js-independant, its more Mootools based now, so any JQuery based theme will need to a bit of changing :P Hey, if Joomla can use the Moo, so can I lol)

In any case - theres a lot of freedom for themers in Protendo, the css is been transformed to much more use of classes - which is the IMHO only way to make sure one change reverberate back into default templates. Its also using a basic "frame" for building layouts in the form of simple grid CSS styles (which again, simplifies making css files from scratch, just include that and most templates still look nice, although bland.) Its also means better use in mobiles, as a responsive design, but I've not done enough there yet..on my todo-list though.

Making Wedge skins? I know I mentioned it before, and that it didn't pan out to anything then, but I think I need to really use Wedge for a while, see its way of working, under and over the hood, before dreaming up new designs. But I also know, I will prob. want to shift so much around that it might not be possible...but, can't say no until you tried - as the saying goes. ;)

Is the alpha 2 from 2012 the latest release? I am not asking you to heighten my involvement or anything, because honestly, I will prob. be poor on feedback(due to working also on my own things) but it would be great to try stuff with the latest code - or what you deem close enough to make skins for.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: One theme to rule them all?
« Reply #7, on November 12th, 2013, 12:29 AM »
Hey, it's starting to look like I'm gonna have to get to work soon on removing theme support... Seven votes against zero in favor of doing that! :)
Quote from Bloc on November 11th, 2013, 08:22 AM
Thanks, likewise. :) The fact that you stuck with your vision and haven't not given up, is commendable.
:)
Quote from Bloc on November 11th, 2013, 08:22 AM
True, I did more experiments in ViennaBBS as it were..but I thinks thats mainly because I've been more focused on having Protendo going in the right direction under the hood - so less time for graphical things.
Apologies for implying otherwise, but I just saw your desktop version, and it's looking great.
So far, I'd only tested on my Android phone, and it didn't look as good. (Plus, it's very buggy in home pages.)
The only thing I'd seriously rework is Display pages, mainly avatars and page indexes (these circles, they have a 'meh' effect on me.)
The rest looks great.
Oh, also, when I saw your fixed header, I thought, "he must have run into the same problem that I did...", and you sure did. For instance, if you click a link to a specific post in a topic (not a topic itself), the resulting page half-hides the post, because it needs to be straightened by JavaScript into moving the page further up so you can see the desired anchor. I'd started to do that myself, and then I realized refreshed the page complicated matters: do I need to execute such JS in that situation? Depends on whether the browser forces the anchor position on refresh, and not all browsers agree on that, so... It gets complicated.
Quote from Bloc on November 11th, 2013, 08:22 AM
The current theme is on the minimalist side - its my current "phase" :D -
It's your most common phase, and the one I'm most jealous of. ;) (cf. Minimalism, Simplicity, ViennaBBS, and now Protendo.)
Really: I can't remove anything from Wedge without feeling I've removed too much, and I don't want a root skin that has too much CSS. What I want is a minimalist root skin, and then a 'full-featured skin' with styling everywhere, and give skins the ability to choose either of those as their parent.
Quote from Bloc on November 11th, 2013, 08:22 AM
but I see that it needs more themes, more diverse ones. And that I can do easily, but the old fashion way of replacing themes rather than skins/variations only.
Well you could always play with the HTML if you think you can make it more flexible for skinners. ;)
Quote from Bloc on November 11th, 2013, 08:22 AM
In any case - theres a lot of freedom for themers in Protendo, the css is been transformed to much more use of classes - which is the IMHO only way to make sure one change reverberate back into default templates.
Too many classes tend to make the CSS files bloated, though.
I kind of miss the days when SMF 1 had a single CSS file that weighed around 10KB, but hey... That's just me ;) I know that this particular SMF was also very, very reliant on tables and inline styles.
Quote from Bloc on November 11th, 2013, 08:22 AM
Making Wedge skins? I know I mentioned it before, and that it didn't pan out to anything then, but I think I need to really use Wedge for a while, see its way of working, under and over the hood, before dreaming up new designs. But I also know, I will prob. want to shift so much around that it might not be possible...but, can't say no until you tried - as the saying goes. ;)
AFAIK, you've always had a read access to the SVN at arantor.repositoryhosting.com, didn't you use it back in the day? ;)
Apart from that, that repo is now a month old, all development is now happening at the Bitbucket repo; still a private repo, so if you want access to it, feel free to ask. (I still have a slot open for my private repos, but it pretty much requires me to send you an invite by e-mail and have you create an account especially for that, following the link in the invite. That way, I get my last allocated 'promotional' slot.)
Quote from Bloc on November 11th, 2013, 08:22 AM
Is the alpha 2 from 2012 the latest release?
Yes. But I could very well release a new alpha right now, as it's relatively stable. I'm just waiting for the theme system to be removed, because it implies restructuring all folders, and I don't want to tell people to do it manually on their side ;)
Quote from Bloc on November 11th, 2013, 08:22 AM
I am not asking you to heighten my involvement or anything, because honestly, I will prob. be poor on feedback(due to working also on my own things) but it would be great to try stuff with the latest code - or what you deem close enough to make skins for.
I've never required of anyone with repo access to give regular feedback; knowing you're in is enough for me. I have a limited number of slots, though, so if someone doesn't seem to share anything (whether feedback or code or anything really), I may have to ask them if I can remove them from the list. OTOH, I could also add as many users as I want, as right now no one but me has commit access to the repo, and I think Bitbucket has an (hopefully) unlimited number of private users, as long as the repo is read-only.

Re: One theme to rule them all?
« Reply #8, on November 12th, 2013, 01:18 AM »
Hm, I wasn't aware of the masking of anchors..does it do it now, still? You may need a hard refresh. And no, I am not using JS for that, only CSS.

Sure, I have an account on bitbucket already, but no problem getting another.

Heh, just watched latest "Homeland" (s3e7), time for bed me think, if I am to function at work tomorrow. :D

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: One theme to rule them all?
« Reply #9, on November 12th, 2013, 01:30 AM »
Quote from Bloc on November 12th, 2013, 01:18 AM
Hm, I wasn't aware of the masking of anchors..does it do it now, still? You may need a hard refresh. And no, I am not using JS for that, only CSS.
Oh, indeed it works... That's odd. I think I used an anchor that was too 'recent', and that I confused it with another post, and... Anyway, forget what I said. How did you do that one, then? I'm surprised. I had a quick look at your CSS and couldn't find any hacks like doing a negative margin, things like that... (I couldn't do that in Wedge, because of complications with relatively positioned elements. Hell.)
Quote
Sure, I have an account on bitbucket already, but no problem getting another.
What address should I send it to, then? The one in your private profile here?
Quote
Heh, just watched latest "Homeland" (s3e7), time for bed me think, if I am to function at work tomorrow. :D
That was a fine episode, too! I'm starting for feel for Quinn... Good character, really.

Re: One theme to rule them all?
« Reply #10, on November 12th, 2013, 07:37 AM »
Oh, I changed it last night. :) Yes, with negative margins..I first added a "relative" class to the anchor in the template, then added "position: absolute" and top: -145px" which is roughly the height of the header. Not optimal since you have to change that if the header is higher, but still. Also, the "#new" id got the same treatment, as well as the "#top" one. Seems to work for now.

Homeland is great. :) Only a few series I look forward with excitement nowadays: Homeland, Person of Interest and the Blacklist.

(click to show/hide)
Quinn is the mystery now, wondering if he might have something to do with the delivering of the bomb at Langley..but at least his ghost of earlier kills are haunting him it seems. Remains to see, the infidelity scene at the end was also painful. But Saul is strong, he'll survive once he finds out..or she just tells him.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: One theme to rule them all?
« Reply #11, on November 12th, 2013, 04:00 PM »
Okay, so after 8 votes, still none for keeping themes in, so I'll start work on it.
I'm just hoping that it doesn't screw up everything when it comes to moving folders around, of course...
Quote from Bloc on November 12th, 2013, 07:37 AM
Oh, I changed it last night. :)
All right, I'm not crazy then! ;)
I checked it on mobile, and the fixed header is making it hard to appreciate the exprience. It has too many entries, so it spans over four lines, and makes the header twice as big as its background, meaning it overflows. You should disable the fixed positioning for it in narrow viewports. ;)
Quote from Bloc on November 12th, 2013, 07:37 AM
Yes, with negative margins..I first added a "relative" class to the anchor in the template, then added "position: absolute" and top: -145px" which is roughly the height of the header. Not optimal since you have to change that if the header is higher, but still.
That's one of the problems I had with my Wedge implementation, yes. Plus, the fact that due to soft-merging, it's more complicated for me to add the link outside the message block, and adding it inside would screw up the layout, as most of these divs are positioned in a way or another... Well, gotta say, Wedge topics look great, but they sure have a few hacks that make it harder, I guess, to restyle completely... (You can still move the avatar to the right side or whatever, like Wine does, but of course it's not a hard one.)
Quote from Bloc on November 12th, 2013, 07:37 AM
Homeland is great. :) Only a few series I look forward with excitement nowadays: Homeland, Person of Interest and the Blacklist.
I stopped The Blacklist after a couple of episodes (I love James Spader, but he seems to be re-playing his Boston Legal character, only with a dark side... I'll probably catch up when there's a half-season or full season available, but as a weekly show, it doesn't excite me). Person of Interest, I always found the concept to be silly, but Once upon a time had a sillier premise, and it turned out to be great (well... Until the latter episodes in season 2, of course. It's only starting to get interesting again these days, and even then, it's so full of plot holes, I wonder where the plot went... Certainly not to Neverland.) What I mean is, I watched 5 episodes and I was like, "meh." But I heard that Amy Acker is a regular in later episodes, so it might be enough of an incentive to watch. (I totally dig her. Sue me. She's a modern Audrey Hepburn.)

Personally, my unmissable weekly shows: The Legend of Korra (a true wonder, season 2 is awesome), Homeland, The Walking Dead, OUAT, Quite interesting XL, Elementary, South Park, The Big Bang Theory and Misfits. And Community is coming back soon, so add that to the list. And Doctor Who, and Sherlock. And on summers, Wilfred.
The rest, that I watch when I'm bored: Agents of SHIELD, How I met your mother (season 9 is the worst ever... Too bad), Mom, OUAT in Wonderland (it's even sillier than its parent show, can you believe that?), and older shows I'm catching up with: Mike & Molly, Defiance (such a great pilot, such a disappointingly slow show afterwards), The Almighty Johnsons (I think I read something from Aaron saying it rocked, so I started it, and indeed it rocks, but I'm holding up for subtitles of season 3), and I only dropped one show with no redeeming chances: The Crazy Ones. Robin Williams, I love him but I prefer him when he doesn't play crazy. I'm also considering dropping Toast of London. I like the actor, but he's not THAT funny.
Recently, I watched Dirk Gently. That was fantastic. Too bad it got cancelled. Same for Spy, a fun, mindless sitcom. At least it got sort of an ending.

Anything else going on these days, that I might have missed..?
Quote from Bloc on November 12th, 2013, 07:37 AM
(click to show/hide)
Quinn is the mystery now, wondering if he might have something to do with the delivering of the bomb at Langley..but at least his ghost of earlier kills are haunting him it seems. Remains to see, the infidelity scene at the end was also painful. But Saul is strong, he'll survive once he finds out..or she just tells him.
That's an interesting theory about Quinn. I doubt it's true, though. But it would explain things.
As for the other scene, I think it's not surprising at all. His wife obviously came back to help him in a rough situation, as a friend, not because she wanted to give him another chance. Saul is obsessed with work. He pretty much knew there was a price to pay for her support. That's the price in question. But he's a child when it comes to relationships, so we can't know how he'll deal with it. Or if he will.
Re: One theme to rule them all?
« Reply #12, on November 12th, 2013, 05:30 PM »
So, as previously announced, here's the (hopefully final) file structure for the new system:

Code: [Select]
/Smileys/* /assets/smileys/
/Themes/default/aeva/* /assets/aeva/
/Themes/default/fonts/* /assets/fonts/
/Themes/default/images/* /assets/ (including aeva, so --> merge folders)
/Themes/default/languages/* /languages/
/Themes/default/scripts/* /scripts/
/Themes/default/skins/* /skins/
/Themes/default/* /templates/

I decided to use the name 'assets' rather than 'images', because to me, fonts are not image files. Also, the aeva folder has a few Flash files, so, not images. Plus, it saves one byte, and anything to save bandwidth at HTML time is my friend.
I considered renaming it to 'img' instead, but (1) see above, (2) abbreviations may be a bit too geeky. Although FluxBB has 'img' and 'lang' folders, but... Well, I don't know, I'm not FluxBB. For now :P

Coming next: fixing tons of bugs, I'm pretty sure... >_< (There are approx. 3000 references to the word 'theme' in Wedge. Yes, I'll attempt to remove them all! And manually, for the most part! Yay!)
Re: One theme to rule them all?
« Reply #13, on November 12th, 2013, 07:56 PM »
So...

- All files transferred. I also moved /avatars to /assets, for good mesure.
- Moved temp repo to my local website, so that I could test. Crashes in a funny way.
- Fixed variables, etc. It's running.
- Theme is still completely broken. It's going through wetem::hide() for some reason, I'll look into it.
- What have I got into, really..?!?! This is AGONY. The amount of code just to account for theme handling is incredibly huge. I think my estimate of 2 weeks is going to be correct, but it won't be 2 fun weeks.
- I may do this conversion in two phases. The first phase would keep all theme terminology, and some of the variables, and the second phase would attempt to convert everything.

Re: One theme to rule them all?
« Reply #14, on November 12th, 2013, 08:02 PM »
lol, fun times it seems, for you removing that. :)

About series, I like some of them you mention, but most of them is too light for me , Agents of Shield was promising, but now I just see it of curiosity. Person of interest is kind of silly, true..but I love the characters in them, well, most of the time. Spader acting I am mostly unaware of, apart from the old Stargate movie, but then I rarely watch cop series anyway, so Boston legal I haven't seen.

Sherlock is great, look forward to new season, others I follow now are CSI and Supernatural, still exciting! but I started and ended alot of series..lately i saw Broadchurch though, that was a keeper. Another more quirky english series is Utopia, quite excellent :) and of course Walking Dead, whom you know ..but did you know about another, similar but less bloody, called "Les revenants"? :D It was slow at first(well, first episode was quite fascinating), but it soon got me hooked all the way in. And yes, its indeed true what they say about french girls :) Look forward to second season of that too.

My bitbucket account is bloc67 - I think you mentioned it a bit back.

As for the fixed header..uhm, I haven't even checked on mobiles yet. I might get rid of it again, its a fad really, maybe not worth doing "hacks" for it. I'll make my mind up soon hah. :)