1 jakasnazwa Jan 04, 2008 14:05
3 jakasnazwa Jan 04, 2008 15:49
welcome :)
We need to know what skin are you using. Tell the name and I'll help you :)
I am using a custom skin - I followed [URL=http://manual.b2evolution.net/Create_a_new_skin]this instruction[/URL] , and I inserted blog into my website layout.
It looks like [URL=http://blog.ewolucja.org]that[/URL].
I have problems with all font settings :(
You can do it with <!--more-->
thanks a lot!
It looks much better now. :)
4 sam2kb Jan 04, 2008 16:21
Open /skins/ewol/_main.php and add some classes, you can then define it in style.css
Date:
<div class="PostDate"><?php $MainList->date_if_changed(); ?></div>
Title:
<div class="PostName"><?php $Item->title(); ?></div>
Author:
$Item->author( '<strong>', '</strong>' );
And to remove message form comment this string
$Item->msgform_link( $Blog->get('msgformurl') );
Try this ;)
5 jakasnazwa Jan 04, 2008 16:57
ok, I did the simplest part - deleted envelope, and also "word count". :)
Yet, I am not sure what to do with the rest. Could you, please, define "add classes"? :) I mean, where exactly should I add it? in which
I tried some wild guesses, but everything it ruins the script (I gathered a nice collection of various error messages).
I know how to define classes' properties in .css, I just do not know php well enough to add class into right place of the document.
6 sam2kb Jan 04, 2008 17:12
Did you put class="PostDate" and class="PostName" in _main.php?
You can be sure it won't break layout if these classes ain't defined yet in .css files
Then just put something like this in style.css
.PostName {
color: #78a;
font-size: 14px;
font-weight: bold;
font-family: Verdana, Arial, Helvetica, sans-serif;
text-align:center;
}
.PostDate {
color: #78a;
font-size: 14px;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
7 jakasnazwa Jan 04, 2008 20:41
thank you :D
It's almost working.
I changed everything what I wanted, and almost everything looks good, except the date: only the first post date changed! why can it be?
Here is the fragment of code that I changed:
<div class="PostDate">
<?php
// ------------------------------------ START OF POSTS ----------------------------------------
if( isset($MainList) ) $MainList->display_if_empty(); // Display message if no post
if( isset($MainList) ) while( $Item = $MainList->get_item() )
{
$MainList->date_if_changed();
?> </div>
why only date of one most recent post is changed, and rest is still unformatted? :roll:
8 sam2kb Jan 04, 2008 20:52
<?php
// ------------------------------------ START OF POSTS ----------------------------------------
if( isset($MainList) ) $MainList->display_if_empty(); // Display message if no post
if( isset($MainList) ) while( $Item = $MainList->get_item() )
{
?>
<div class="PostDate"><?php $MainList->date_if_changed(); ?></div>
9 edb Jan 04, 2008 20:56
That's not the best way to do that. You really want your div ONLY around the bit that makes "date_if_changed". Like this:
<?php
// ------------------------------------ START OF POSTS ----------------------------------------
if( isset($MainList) ) $MainList->display_if_empty(); // Display message if no post
if( isset($MainList) ) while( $Item = $MainList->get_item() )
{ ?>
<div class="PostDate"><?php $MainList->date_if_changed(); ?></div>
As to why, well the answer is that you are styling "date_if_changed". That means if you have 3 posts on one day then another post on a previous day you will see "date_if_changed" only twice.
DATE_IF_CHANGED
post on today
post on today
post on today
DATE_IF_CHANGED
post on yesterday
Make sense?
So now you want to style the actual post date. For example where I see a permalink icon then "02:00:13 pm, by admin, No views" you want something different for the time of day you posted. Am I correct?
If so look at your _main.php file a bit further down than where you were just working. You will see either
<?php $Item->issue_date() ?>
or
<?php $Item->issue_time() ?>
Those bits can be styled and shaped and structured in all sorts of ways, but let's make sure this is what you want before I try and figure out how ;)
10 edb Jan 04, 2008 20:58
Hey! sam2kb beat me by 4 minutes with the same "improved" php bit. Great minds think alike yah? :D
11 sam2kb Jan 04, 2008 21:02
But that description, you just wrote, is really helpful :)
12 jakasnazwa Jan 04, 2008 21:09
yes, I see issue_time, but I figured out that this is to format an hour, minutes and seconds of post...
That's picture showing what exactly I want to do:
http://www.blog.ewolucja.org/blog.jpg
a) what changed when I inserted the piece of code that I cited in my previous post
b) what has not changed, and I want it to change - to look exactly like a)
c) what changes when I format issue_time
There is nothing like "issue_date" in my main_php (I copied exactly everything from tutotial about creating my own style ;) )
and again, my [URL=http://www.blog.ewolucja.org/]blog url[/URL]
13 sam2kb Jan 04, 2008 21:28
Can you PM me your _main.php ?
And you should delete <link HREF="style.css" REL="STYLESHEET"> from head section
14 yabba Jan 04, 2008 21:29
$MainList->date_if_changed( '<div class="PostDate"><h2>', '</h2></div>' );
;)
¥
15 jakasnazwa Jan 04, 2008 21:34
¥åßßå, ayou are genius! :D
you all are, but Mr/Ms ¥åßßå gave me full satisfaction. :>>
Now it's looking exactly like I need it to look.
thanks to everyone!
and have a nice day. or evening, or whatever time zone you are.
Welcome to the forum.
We need to know what skin are you using. Tell the name and I'll help you :)
You can do it with <!--more--> (!M button in extended view mode when you composing the post)