Recent Topics

1 Nov 25, 2009 19:31    

My b2evolution Version: 2.4.5

Hi all=)

I tried v.2.4.5 and curious if there is a possibility to have an own header for each category and have next/previous links to browse in sertain category only, while jump from one category to another through menu links? Just in the way of usual webpages.

Thanks=)

2 Nov 27, 2009 15:58

couldnt understand what you want to do with the prev next links but having an own header or own anything per category is possible.

3 Nov 27, 2009 21:39

Never mind that link question - figured that out=).
But could you link me please to where to look/what to do to make category headers thing happen ?

4 Nov 28, 2009 16:43

which skin are you using ?

you will find a post wrapper line like this -in your index.php or posts.main.php-:

<div id="<?php $Item->anchor_id() ?>" class="status<?php $Item->status_raw() ?>" lang="<?php $Item->lang() ?>">

right before the start of the post loop
which gives you additional class for post ID, post status etc. that you can modify seperately.
to do this for each category, you gotta insert

catID<?php echo $Item->main_cat_ID ?>

somewhere between

<div id="......" class="[insert somewhere here]".........>

than you will get a "catID1" "catID2" etc. classes that you can modify via your style.css like .catID1 {background-color:black; /*comment: this will change the background of all the posts in category 1 to black*/}

5 Nov 28, 2009 18:07

I'm using ASEVO.

I found that line, i'm going to try this tonight.

Thank you very much=)

6 Nov 29, 2009 09:37

I still can't figure out how to put header on... :(

Here what I did. Inserted piece of code
in _item_block.inc.php

<div id="<?php $Item->anchor_id() ?>" class="catID<?php echo $Item->main_cat_ID ?><?php $Item->div_classes( $params ) ?>" lang="<?php $Item->lang() ?>">

added catID classes in css

.catID1 {
	margin: 0 auto;
	width: 770px;
	height: 100px;
	padding: 20px 20px 20px 20px;
	background: #FFF url('img/scen.png') no-repeat center
}
.catID2 {
	margin: 0 auto;.. etc

And what would be the code to insert into main.index.php for header to be displayed?
For the blog header I have that line:

<div class="header"></div>


with an according class in css similar to what I've put for catID.

7 Nov 29, 2009 18:37

reverse all your changes or grab a fresh copy and do as follows...

asevo only has 3 files --style.css, index.main.php, body-footer.php-- by default

1- open up your index.main.php
2- find the line :

<div class="evo_post" lang="<?php $Item->lang() ?>">


3- change it to :

<div class="catID<?php echo $Item->main_cat_ID ?> evo_post" lang="<?php $Item->lang() ?>">

Thats all.

Now you have pseudo classes for each post , first is "catIDx"(12345etc..) the next class is the stable "evo_post" class.

Now you can open your style.css and make the changes you like freely.

For example;
Use

.evo_post {width:450px; /*to make all posts 450px wide*/} 

Use

.catID1 {width: 300px; /* to make the posts only which are in category 1 300 px wide.*/}

8 Nov 29, 2009 19:32

tilqicom, thank you very much!=)

9 Nov 30, 2009 20:48

not at all... have fun with your evo..

btw i think i got your first question too...
It is basically possible with replacing the default prev/next links with a conditional line, like If { main_cat_id == 1 etc.. i gotta have a look at it to make sure
till than, have fun


Form is loading...