Recent Topics

1 Aug 08, 2007 15:28    

My b2evolution Version: 1.10.x

Hi -

Thanks for all your help to a newcomer over the last week or two...I've discovered that some of this is MUCH easier than it seems!

I have two new problems that I can't seem to find the correct search terms to use for the answers:

(1) I would like to be able to show (either at top or bottom of the post) the author's name - for example, my posts would show something like at the top - posted by garrisonclark on and then date/time and the other stuff - can this be done by turning something simple "on", or if it's a more difficult coding thing or something like that, is there anyone willing to help me make sure I do it right?

(2) I also need to figure out how to either duplicate a previous post and then modify it, or get a basic layout that I can use over and over...for example, I am summarizing episodes of television shows on one blog, and I need to be able to take an old post and change the date and summary and save it as a new post...OR....take a simple layout, fill in the info for the new day and post it...any suggestions??

Thanks in advance!

2 Aug 08, 2007 16:07

1) I give you a single line that you can post under the title or wherever:

<div class="bSmallHead">
<?php
echo('Written by ');
$Item->author( '<strong>', '</strong)' );
echo(' on ');
$Item->issue_date();
echo(' ');
$Item->issue_time();
?>
</div>


Try this, see how it looks an then dissect the code and you'll grasp the idea quiclly.

2) Can't you just copy / paste the 'old' post?
I use a txt file that has a specific table (I need this for my own blog). I write the post in a texteditor (notepad++) and then bring the post to the blog. For my specific needs this works fine. The txt file has only the bare table in it.

Good luck

3 Aug 08, 2007 16:23

1. Most skins do this by default. The easiest way to achieve this is to find a skin that displays it the way you want and copy the code from there. For example, the 'custom' skin does it like this:

		<div class="bSmallHead">
		<?php
			$Item->permanent_link( '#icon#', '#', '' );
			echo ' ';
			$Item->issue_time( '' );
			echo ', '.T_('by').' ';
			$Item->author( '<strong>', '</strong>' );
			$Item->msgform_link( $Blog->get('msgformurl'), ' ', ' ', '#', '#', '' );
			echo ', ';
			$Item->wordcount();
			echo ' '.T_('words');
			echo ', ';
			$Item->views( '#', '#', '#' );
			echo ' &nbsp; ';
			locale_flag( $Item->locale, 'h10px', 'flag', '' );
			echo '<br /> ', T_('Categories'), ': ';
			$Item->categories( '#', '<strong>', '</strong>', '', '', '<em>', '</em>', ', ' );
		?>
		</div>

2. Depending on how intricate a layout you're looking to design, you might try to create a custom button for it in the /plugins/_quicktags.plugin.php file. Then in your post editor you would just hit the custom-built button and it would drop a post layout template into your post editor which you could fill in...

Maybe something like this:

		b2evoButtons[b2evoButtons.length] = new b2evoButton(
				'b2evo_UNIQUE_BUTTON_ID'
				,'BUTTON TITLE', ''
				,'ALL THE HTML CODE FOR THE TEMPLATE'D POST LAYOUT GOES IN THIS SECTION',''
				,'z'
				,'<?php echo T_('MY_CUSTOM_BUTTON_TEXT') ?>'
			);

The easiest way to do this is to copy an existing button from your quicktags file and use it as a template. Basically, you need to edit the 4 sections I wrote in all-caps, but each of the existing buttons in your quicktags file will use a similar structure...

[EDIT: Oh, and before you go editing the quicktags file, [u]make a backup of it[/u].]

jj.


Form is loading...