Recent Topics

1 Jul 01, 2006 21:08    

I would like to switch to b2evolution but I wonder if it could integrate in my website which is php-driven and with a 3-column layout in CSS. See my site: http://www.fireworkszone.com.

1- Can I place for example, the calendar and RSS Feeds in the left column?

2- On my website, all the pages are displayed in the center column through an include:

<?php include('root.php'); ?> 

inside the index.php. Can I do the same with b2evolution?

3- I don't understand the difference between templates and skins. For example, I take blog B for customization. To which template correspond Blog B ? I didn't find any folder untitled Blog. Do you think the a_noskin.php is the right choice ?

Thanks for your advice because I am a bit lost :-/

[/url]

2 Jul 01, 2006 21:38

You can do all that with b2evolution, and it's not by including it in anything else. It just does it. Check out http://skins.b2evolution.net/a.php?skin=ality for an example of a 'stock' 3-column layout. Also visit [url=http://www.tenderfeelings.be/blog/index.php]Topanga's web[/url] for a real live b2evolution blog using 3 columns. BTW b2evolution is completely php driven and totally digs on css for how your stuff looks. Skins is how that works.

Templates are something someone else will have to answer to. I just don't have a good understanding of what 'template' means in b2evolution, but I can talk about skins if you like. Basically a skin allows you to pick specific bits and pieces for your blog, arrange them as you see fit, and style them according to whatever style rules you decide. Check out the skins repository (linked in the header above) and know that each skin is pulling from the exact same database.

ah. a_noskin.php is a file for a template. I personally just delete that one because I don't use it. Skins are much easier, and - for me - stub files with skins is even betterer. Stub files (like a_stub.php) allow you a bit more flexibility over what your skin does. My only purpose is to make my url be (for example) flightblog.php instead of index.php?blog=5, but you can do more. Like you can have one blog go "oldest to newest" instead of "newest to oldest". Or show future posts in only one blog. Or limit the cats you display through that particular stub (which is always related to only one blog by the way).

The EASIEST way to play with b2evolution is to start by thinking "skins is where I want to make it be my blog", then adding stub files if you're into it. Oh no wait. The easiest way is to check it out and ask a few questions THEN play with skins and stubs, but since you already asked a few... ;)

3 Jul 01, 2006 23:52

Hi EdB,

I am really confused by your answers.

1-You said that b2evolution can also be a 3-column layout, but where is the code for the layout?

2- Customization
At the moment, I have "Blog B" displayed when you write http://www.fireworkszone.com/news/ and I selected skin: basic in the administration interface.

What are files (template + CSS) I have to modify to customize Blog B ?

3- _main.php

I am also confused to find _main.php files in differents folders:

- one in b2evocore

- one in skins > basic

What are they for ? which of the two do I have to customize ?

I am sorry I'm a bit slow to understand

;)

4 Jul 02, 2006 00:35

With every skin, you can customize your blog.
for exemple, you can show the same data - posts - in different layouts.
You can show them in a 1 column layout, a 2 column layout, a 3-column...
the layout has nothing to day with your database.

My site - in dutch - is a 3 column layout, witch I designed myself.

If you want to customize the layout of a blog, you fist choose a skin for that blog and then you change the css and _main.php file in that skinfolder.

5 Jul 02, 2006 00:57

Check out your file structure in your "news" folder. You've got a handful of folders and files in there that are what b2evolution uses. One of them is "skins". In that folder you've got another handful of folders and files. Each of those folders is a skin. In each of those folders you've got a bunch of files. THAT is where you'll do almost all of your editing. For example you like the 'custom' skin but don't want the calendar. You open skins/custom/_main.php and cruise through the code till you find the bit that looks like it's got something to do with the calendar. The php function names and stuff are intuitive and there's lots of comments, so it'll be easy. You either delete or comment out the calendar part, save it and upload it, and poof - no more calendar in your custom skin.

	</ul>
	<?php // -------------------------- CALENDAR INCLUDED HERE -----------------------------
		require( dirname(__FILE__).'/_calendar.php' );
		// -------------------------------- END OF CALENDAR ---------------------------------- ?>
	<ul>


becomes

	</ul>
	<?php // -------------------------- CALENDAR INCLUDED HERE -----------------------------
		// require( dirname(__FILE__).'/_calendar.php' );
		// -------------------------------- END OF CALENDAR ---------------------------------- ?>
	<ul>

Now you decide you don't like the words "Search" and "Categories" and so forth should be red instead of that off-blue color. When you had your skins/skinname/_main.php opened you probably noticed this bit:

<div class="bSideItem">
	<h3 class="sideItemTitle"><?php echo T_('Search') ?></h3>


If not just viewing your source code would have shown you that those terms are H3s with "sideItemTitle" style applied, so crack open skins/custom/custom.css and look for either H3 or sideItemTitle. I found H3 defined this way:

h3 {
	color: #78a;
	font-size: 120%;
}


Let's pretend you only want sidebar titles to be red, so you do this:

h3 {
	color: #78a;
	font-size: 120%;
}
h3.sideItemTitle {
	color: #FF0000;
}


I'm pretty sure that would do it, and is probably way more than you needed. Basically you want to work in your skins/your_skin folder to customize stuff. Between _main.php and whatever.css is how you'll make your 3-column layout happen. Download the ality skin to see how it does it, or just use your existing 3-column code since it obviously already works.

Oh by the way just because *you* selected the 'basic' skin doesn't mean I saw it that way or have to use your default 'custom' skin. Since you've allowed skin switching I can view it any way I choose to. http://www.fireworkszone.com/news/index.php?blog=1&skin=natural_pink for example.

In your back office (admin link) select 'blogs' tab then whichever blog you want to control, then notice the check box for "allow skin switching" and uncheck it. The list of skins will no longer be visible to the visitor and they will see the skin you tell them to see. A bit further down on the same blogs/select blog/general page you'll see a drop-down box for "default skin". There you pick the skin that the visitor will see when they first visit your web. If you uncheck the "allow switching" box that is the only skin they'll be allowed to use.

--------------------

I see now where you're tinkering a bit with the 'custom' skin. Cool! Good skin to start with as it is almost always totally up to date with all the bells and whistles. Plus if something ever goes wrong you can just grab a fresh copy from the download package and undo a booboo.

Have fun with it!


Form is loading...