1 tosca Mar 08, 2008 01:03
3 afwas Mar 08, 2008 01:38
In the folder of your skin, open the file index.main.php. The file is probably in the folder /b2evolution/blogs/skins/nifty_corners/
Search for this piece of code:
$Item->permanent_link( array(
'text' => '#icon#',
) );
after it, put:
$Item->author( array(
'before' => T_('By'),
'after' => ' ',
) );
I don't have a solution for the numbers after the categories.
Good luck
4 afwas Mar 08, 2008 01:41
I'm supposed to beat you, EdB, so next time wait till I posted. ;)
5 edb Mar 08, 2008 01:48
Wow! It looks like I beat Afw ... er ... okay let's go for best 2 out of 3 ;)
6 tosca Mar 08, 2008 01:54
Thanks! I'll try those suggestions. :D
Hmmmm..... I thought in a certain category it would show numbers, but maybe that's in a different blog system. Something like....
Main (5)
7 afwas Mar 08, 2008 02:00
Hi Tosca,
That was in the 1.10 series. But things have changed. Posts are not called posts anymore, but Items. That's because Podcasts can be Items also. Together with some other changes made the developers drop the postcount for the categories. It may return some day.
Good luck
8 tosca Mar 08, 2008 02:15
Howdy!
Oh, that makes sense....
I realize that you (Afwas) and EdB are joking, but have to tell you that I've tried both suggestions.... I may have to add a buzzer for you both ;).
For some reason, EdB's didn't take with a T string error and with your suggestion the name doesn't show up in the Home/All Blog -- only the categories within an "item" (post). So, if I wanted to see who wrote what on the main blog, this is unavailable.
Any suggestions.... let's see who response first! ;)
Thanks again,
Tosca
9 edb Mar 08, 2008 02:24
You may need to remove the <?php at the beginning of, and the ?> at the end of what I pasted, but for a fact the code both Afwas and I shared shows the author's name of any given post.
Assuming you found the bit Afwas pointed to, try adding the following after it - on a new line:
echo ' HERE ';
just to make sure you are editing the right file. If it doesn't show up you're not in the right file. If it shows up with an error you're doing something wrong. If it shows up you're in the right file and doing it right, so replace that with
$Item->author();
and you will get the name - except it won't have "by" before it or a "comma space" after it. So you do one more replacement of
$Item->author( array( 'before' => ' BEFORE ', 'after' => ' AFTER ' ) );
and be happy.
EDIT: by the way I put the whole thing onto one line because of how stuff changes a bit when you copy/paste from a forum to a file. Like, a tab becomes 'space space'. Shouldn't matter, but you never know...
Hey what are you using to edit your files?
10 afwas Mar 08, 2008 02:31
You now have:
Permalinkby06:12:00 pm Categories: My Story
Where Permalinks is not the word but an icon.
This is about how it should look like:
<div class="bSmallHead">
<?php
$Item->permanent_link( array(
'text' => '#icon#',
) );
$Item->author( array(
'before' => T_('By'),
'after' => ' ',
) );
$Item->issue_time( array(
'before' => ' ',
'after' => ', ',
) );
I showed the starting of the div also to point you where the php block starts.
For the rest, read EdB's post. He beat me again.
11 edb Mar 08, 2008 02:42
Tosca we plan this. Private chat channel. Well coordinated effort to look randomly coincidental. Now that you know this, sadly, we will have to hack your blog and say bad things about your neighbors flower garden.
12 afwas Mar 08, 2008 02:51
Hi EdB,
How is your aunt in Vancouver? Does she still play piano?
13 tosca Mar 08, 2008 03:00
Hi Guys!
EdB -- too funny! :lol:
I'm using Dreamweaver to make edits.
Here's what I went with.... sorry Ed B.... the one line seem to insert "HERE" in between things (I used the cut/paste)
I did notice that I made a mistake and didn't add "author" when I hand wrote the code, before "array" argument. BUT.... for some reason it still didn't like the "strong" stuff.
Here's what I have now. It was already in there file.
<div class="bSmallHead">
<?php
$Item->permanent_link( array(
'text' => '#icon#',
) );
$Item->author( array(
'before' => T_('By - ' ),
'after' => ' ',
) );
$Item->issue_time( array(
'before' => ' ',
'after' => ' , ',
) );
Here's the blog again:
http://www.rhrplus.com/b2evolution/blogs/index.php/All/
I'm happy with this. :D
14 afwas Mar 08, 2008 03:17
That looks OK. You may want to vary, like with a comma after the name. Change to:
'after' => ', ',
The first comma shows in the list, the second comma is for php's array.
EdB,
Ever seen your uncle Ted again after he disapeared with the Lotto millions?
15 tosca Mar 09, 2008 19:38
Thanks again -- that was helpful. You guys are great!
I changed this as suggested, but the comma doesn't show up.
Hmmmm......
16 tosca Mar 09, 2008 23:47
"Tosca" wrote:
Thanks again -- that was helpful. You guys are great!
I changed this as suggested.
17 tosca Mar 10, 2008 20:49
Hi Afwas:
Hope all is well with you today. :D
Quick question about your reply to me:
That's because Podcasts can be Items also. Together with some other changes made the developers drop the postcount for the categories. It may return some day.
Is there some way that I can add it myself? I really like the number count and find it handy.
Thanks, again for your input.
Tosca
Depending on your skin's file structure, adding the author is pretty easy. Assuming you have a file called index.main.php (and don't have files called posts.main.php and single.main.php) just open it up in a plain text editor and insert the following at the point you want the author's name to show up:
Looking through the code, it'll be sort of obvious which part makes what bits on your blog.
Getting the post count by author hasn't been done to the best of my knowledge. It can be done - just hasn't been done yet that I know of.