Author Topic: New Layout Rotation  (Read 4902 times)

Fate

  • Iokan (+1)
  • *
  • Posts: 8
    • View Profile
New Layout Rotation
« Reply #15 on: August 16, 2005, 08:40:40 pm »
I signed up just to reply on this thread. I think users should be able to choose what layouts they wish to view the site with, something of a skins system. I think that would be a great idea in addition to the rotation.


Edit: After reading back in this thread a bit, I realize that is a bad idea. Scratch that. <_<

Chrono'99

  • Guru of Reason Emeritus
  • God of War (+3000)
  • *
  • Posts: 3605
    • View Profile
New Layout Rotation
« Reply #16 on: August 16, 2005, 08:53:02 pm »
Quote from: Fate
I signed up just to reply on this thread. I think users should be able to choose what layouts they wish to view the site with, something of a skins system. I think that would be a great idea in addition to the rotation.


Edit: After reading back in this thread a bit, I realize that is a bad idea. Scratch that. <_<

Okay you must un-sign now...

...just kidding :wink:

EDIT: Oops, forgot to say: Welcome to teh Chrono Compendium!

Fate

  • Iokan (+1)
  • *
  • Posts: 8
    • View Profile
New Layout Rotation
« Reply #17 on: August 16, 2005, 08:58:17 pm »
Quote from: Chrono'99
Quote from: Fate
I signed up just to reply on this thread. I think users should be able to choose what layouts they wish to view the site with, something of a skins system. I think that would be a great idea in addition to the rotation.


Edit: After reading back in this thread a bit, I realize that is a bad idea. Scratch that. <_<

Okay you must un-sign now...

...just kidding :wink:



Aww, that's so mean. :P

teh Schala

  • Acacia Deva (+500)
  • *
  • Posts: 561
    • View Profile
New Layout Rotation
« Reply #18 on: August 16, 2005, 09:28:00 pm »
Actually I don't think it's a bad idea.  In fact I think Ramsus is working on it...  It'll just take awhile to implement is all. :)  So un-un-scratch what you said! :)

EDIT: Oh yeah, and welcome to the Compendium!

Fate

  • Iokan (+1)
  • *
  • Posts: 8
    • View Profile
New Layout Rotation
« Reply #19 on: August 16, 2005, 10:53:51 pm »
Quote from: teh Schala
Actually I don't think it's a bad idea.  In fact I think Ramsus is working on it...  It'll just take awhile to implement is all. :)  So un-un-scratch what you said! :)

EDIT: Oh yeah, and welcome to the Compendium!


That sounds awesome. :P I've browsed CC quite a few times over the years, but just now decided to sign up for the forums. Thanks for the warm welcome! :)

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10797
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
New Layout Rotation
« Reply #20 on: August 18, 2005, 01:34:10 am »
Here's a simple blue color swap. It looks like a big dose of radiation to me; darker colors and white text would probably have to go for blue.

www.chronocompendium.com/birthday/bluelayout.png

Ramsus

  • Guest
New Layout Rotation
« Reply #21 on: August 18, 2005, 03:44:28 am »
I appreciate the help SSJoseph, but the site has always used templates to separate layout code from the content. That's why we can change layouts so often (as we have several times, much more than the Retrospective article suggests).

Also, if you took a look at the layout, you'd realize we use CSS for everything like fonts and layout colors, even the layout images with the exception of the epoch image. That means changing the colors is as simple as switching which CSS file the layout uses and the epoch image, which requires editing two lines in the templates.

The only issue is that the site uses three main systems, the news and article script I wrote, MediaWiki, and phpBB, all of which have their own template systems. For color schemes, this means I pretty much just need a script that outputs the right CSS code for the desired color scheme based on the time of year and a script to output the correct scheme image for the right side of the banner using the same settings as the other script. Then there'd be no editing. I could do this in a matter of minutes, so nobody's really worried about HOW we'd do things. Merely what colors and how often.

In fact, the only reason there's any discussion at all is because it's so ridiculously easy to change the color scheme, and even the layout itself.

Anyway, the plan now is to make everything use the same template system, and to then make it so the skin option in the forum options can be used by each registered forum user to select what layout they want to use for the entire site. That also means adding phpBB session code to MediaWiki and the custom site scripts.

Doing all of this in a clean manner that wouldn't make upgrading third-party software like MediaWiki and phpBB any harder than uploading the updated files requires at least a few full days of planning and coding. I'm short on time right now, and the Compendium is near the bottom of my obligations list, so that feature will have to wait a while.

Anyway, that's the full explanation. Feel free to offer any more tips if you can think of anything that might be useful, but know that what we're really concerned with is what users want to see with the site, not how I'd go about implementing features.

Ramsus

  • Guest
New Layout Rotation
« Reply #22 on: August 19, 2005, 01:19:02 pm »
Do you even know what CSS is? You can't just have all the different colors in one file, since they'll just override each other and mess everything up. Also, CSS isn't a template system, it's a client-side technology for specifying styles without using HTML attributes or font and center tags. As such, each layout needs its OWN CSS code, and that's if the layout is based on HTML with CSS instead of old-school HTML with nested tables and font tags.

However, not all layouts, even CSS-based, would have the same HTML, so any hack that is based around just switching out the CSS (I already mentioned one before, slightly more complex than yours but then again, it'd actually work), isn't going to cut it now that we're not talking about just switching color schemes, fonts, and a few images.

The goal here is to make them use the same template system, so the HTML of the layout can be completely changed by editing only 1 set of files instead of three, and that means more than some basic little hack. It's also a goal to use forum sessions to determine the user selected skin for the site.

This would be simple of the template systems were similar, but they aren't. phpBB uses a variant of FastTemplates, MediaWiki uses its own PHP template system that uses a PHP script as a template, and the news/story scripts use Smarty templates. Most of the template code is hardcoded into phpBB and the news/story scripts, but a PHP template can be written for MediaWiki that uses one of the other two systems.

These template systems aren't as simple as including a few files in PHP. They cache content, parse the templates for things like looping commands and variable insertions, then display the result. Smarty templates are also cached as PHP scripts to increase performance. The bad part is they all have their own interfaces that differ too much to avoid lengthy code edits.

Fortunately, MediaWiki dropped XML TAL templates mid-year and switched to using PHP scripts, so we can write a template that just uses the same template system as one of the other two scripts. Since the forum code base is larger, we'll just use the same template system as phpBB and then rewrite the news and story scripts.

The session-based skin selection is the more time-consuming part, since it means wading through a lot of phpBB specific session code. If we used all custom scripts written by me, then it'd be no problem, but editing other people's code is always time-consuming at first.

Actually, come to think of it, I've worked with phpBB sessions before, so it'll probably only take a matter of a few hours to complete the new system, with a few more to clean up.

teh Schala

  • Acacia Deva (+500)
  • *
  • Posts: 561
    • View Profile
New Layout Rotation
« Reply #23 on: August 19, 2005, 01:24:05 pm »
WHY do I get the feeling this thread is about to get ugly?


Ramsus

  • Guest
New Layout Rotation
« Reply #24 on: August 19, 2005, 02:07:07 pm »
Let me put it in a manner with less words, maybe then you'll get it. I can see how my posts would be too wordy for some programmers.

For color schemes, 10 minute hack

  • Templates use "/css.php" as the included CSS file.
  • /css.php selects the correct CSS code for the desired color scheme and outputs it.
  • [/list:u]

For one template system

  • Copy phpBB template code to the Wiki.
  • Edit /wiki/skins/Compendium.php to use the phpBB template code.
  • Look into phpBB session code
  • Write /phpbbsession.php that would detect phpBB sessions and pull the skin option for each user.
  • Edit /wiki/skins/Compendium.php use the session code to select the correct skin.
  • Rewrite /index.php and /story.php to use phpBB templates and use the session code to select the correct skin.
  • [/list:u]

    See? It's not complicated. Nobody is lost or confused as to how we'd go about doing things. It's just a bunch of boring code editing and rewriting that would take a few hours to do and a few hours to clean up (thus, several hours of work). It's boring, so I'll make excuses, and it'll take several hours out of my already busy schedule, so I'll make even more.

    That's the problem. The only way to solve that isn't by giving tips, but by editing and writing code for me.

Ramsus

  • Guest
New Layout Rotation
« Reply #25 on: August 19, 2005, 02:21:00 pm »
Quote from: teh Schala
WHY do I get the feeling this thread is about to get ugly?



Because he feels the need to try impressing people by showing them basic PHP programming techniques that aren't even relevant the current situation and ignoring the fact that the guy writing the stuff already knows all of those tricks and understands the current situation better than he does.

Even if he's doing it to be helpful, I consider it rude that he would just jump to conclusions and act like he knows better. Maybe it'd impress the forum goers, but it's just irritates the hell out of me.

Now then, this isn't OCR, so don't post unnecessary comments like that. And for the love of God, never post anymore of those big, obnoxious images in a serious discussion ever again.

Ramsus

  • Guest
New Layout Rotation
« Reply #26 on: August 19, 2005, 04:42:25 pm »
Quote from: SSJoseph
I just wanted to help :(
I didn't want to show off or anything....beleive me if I wanted to show off I coulda done some serious stuff....

But I didnt, so why am I the bad guy :(


Sorry if I came off as an arrogant jerk, because I don't mean to belittle you or doubt your skill. It's just that some fansites do have skilled programmers backing them up in their spare time, so throwing around tips about things that are already better implemented or better planned without even looking at or having some experience working on the code the site runs on is bound to eventually piss someone off.

Next time see if there's actually a problem before trying to help out, and be sure to ask about how the site's code currently handles things before offering suggestions. If you've worked on multiple projects using different code bases and written by different people in different languages, you should know by now that you can't just jump in with assumptions about how the code works and expect to be helpful.

Don't feel bad about it, since I could have been more understanding. After all, this is a fansite, and I'm not around much. It can seem at times like just another site run by fledgling webmasters, but if it were, we'd still be using PHPNuke.