TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,231
  • Total Topics: 21,353
  • Online today: 606
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 234
  • Total: 235
  • @rjen

How to contrain width, like tinyportal.net

Started by shelzmike, July 29, 2008, 05:11:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

shelzmike

Okay,  this is probably a newbie question here, but how do I go about setting my SMF site with TinyPortal installed to be a fixed width instead of stretching. The best example I can give is this site right here - tinyportal.co.uk. I really like how this one is laid out. On that note, is there a theme that is somewhat close to this layout? Our colors and icons and whatnot will be different, but I like the layout - or is this something I can do using TinyPortal itself?

Thanks in advance for the help!

Mike

IchBin

Layout and design is completely dependent upon the theme you choose.

shelzmike

Ah, so this would be more of a question for the SMF forums then? Actually, I get what you are saying, but realize there has got to be a way to manually edit these settings indicidually. You guys have a great looking site here by the way and I am inspired! (IN addition to the great product) Thanks!

Mike

Ken.

Quote from: shelzmike on July 29, 2008, 05:20:25 AM
Ah, so this would be more of a question for the SMF forums then?
Mike

As IchBinâ,,¢ pointed out that setting would be theme dependent, but you can get themes from several places including SMF, here on TinyPortal... plus several members who have theme sites. (You can find many of them listed in the TP theme boards.)

For some themes you can find controls for setting the width by going to:
Admin>Current Theme>...

For those without built-in controls you must contact the theme author.
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

bloc

For this theme here I used a CSS style to control its width. The outer div called "mainframe" covers everything and has set a max-width: 1000px, making sure it won't expand past that. It also is centered by setting margin: 0 auto 0 auto;

shelzmike

Okay, I have found another way, which may not be the best way. I simply changed the body tag in style.css from margin: 0 to margin: 0 15% and it works okay, but I am liking your idea better to be honest. LOVE this layout by the way.

To be honest, I have more experience simply creating and editing basic HTML, without PHP. I use dreamweaver to edit, but still edit in code, even though I like DW since I can get immediate feedback on what the changes look like. (that does not work with the php files, am I correct on that?)

So, I am making loads of progress, but still so much more to go. What is the main file that I edit the HTML in? Would it be index.template.php or have I successfully just made myself look like an idiot?! :)

Thanks for your help.

Mike

IchBin

index.template.php is for the header and footer. The rest are pretty self explanatory.

boardindex = index of the forum
messageindex = index of topics
display.template = index of posts
etc. etc.

shelzmike

Okay, I read a bunch of info (that I have already read a couple times before!) But think that I am understanding more and more. I should be able to figure it out - sometimes I just feel like I am banging my head against the wall though! :)

Mike

bloc

In SMF you got "layers", basically that means SMF is sandwiching templates.. :) index.template is always loaded, and the others loaded upon where you are. Inside index.template there are two functions that chop the page in 2, glue in the template code from number 2 template(display.template on posts screen, bordindex.template on frontpage etc.) and then render it all out. This scenario is a bit hard to work with in Dreamweaver I am sorry to say..but getting the html/css correct first is a big help of course.

What you really need would be to be able to insert tags like {news} where news should show, {login} where userbox etc. should be and so on, in DW. But for that an offline "converter" to normal SMF themes has to exist, and that isn't around yet. I have a draft of something, but its very much un-finished still, so the only way for the moment is doing it the harder way. :P.

shelzmike

Ah, so maybe I am understanding a bit more than I think, it is just DW that is making it harder than it should be. Although, I am really using a variety of things from Notepad++, DW, Firebug, to the editor within the forum (I like this one for the instant feedback of changes - too bad there is not an undo here! :)

I really appreciate all the help. Good thing I am not trying to go all out for my first attempt. Just a few changes here and there. The only thing I really have left is to figure out where the html is for changing the borders/padding/etc. for the different tables. I know how to do it - it is just slow going trying to find out what html is controlling what areas!

Mike

This website is proudly hosted on Crocweb Cloud Website Hosting.