Recent Topics

1 Dec 12, 2007 18:34    

My b2evolution Version: Not Entered

Hi, I'm using b2e v 2.0.2-alpha with skin Asevo, and want to add text to the sidebar, above the calendar on a regular basis ('Quote of the Day').

What file do I edit to add the text? Is there a way to create a (for instance) quote.php file that will be called into the sidebar, so I can edit the quote.php file without editing the sidebar php?

Thanks for the wonderful software.

// Dave

2 Dec 12, 2007 23:05

You need to edit your skin's index.main.php file, most likely, to get at the sections you need...

Something like this:

<?php include 'quotes.php' ?>

The content of quotes.php would be something like this:

<?
$textfile ="/path/to/quotes.txt";
$items = file("$textfile");
$item = rand(0, sizeof($items)-1);
echo $items[$item];
?>

And then the quotes.txt file would be a simple text file with the complete content of the quote, one quote per line, with no line-break after the very last quote or you'll occasionally get a blank quote showing up in the area where you included the include...

<p>This is the content of the first quote</p>
<p>This is the content of the second quote</p>
<p>This is the content of the third quote</p>

Hope this helps...

jj.

5 Dec 14, 2007 19:05

I think jibberjab will be glad to know that I have also used his tips and my random quote is working pretty fine.

6 Dec 18, 2007 18:44

Yes good tutorial there. Helped me to put it in my sidebar as well


Form is loading...