Recent Topics

1 Aug 09, 2006 20:02    

Want to do a quote engine on my blog by having my linkblog to view random posts. Is there any way to make this? Found a way to make random pic on the forum but not a way to make random post...

Also I wonder if the same is possible on multiblogs. I know I don't know much php. But I know you people do :)

2 Aug 16, 2006 14:39

This should be right:


$my_item_list = new ItemList($yourparams);
$random_numer = /*whatever gets a random number*/;
$s = $my_item_list->total_rows;
for ( $i = 0; $i<$s; $i++)
{
   $c = & $my_item_list->rows[$i];
   if ( $c['id'] == a_number_close_to($random_number) ) {
   $our_random_post = $my_item_list->get_item($c['id']);
   break;
}

Something like that i would imagine, be sure to check out the technical docs to find out what stuff you will need to know... Anyway trying is the best way of learning :D

http://doc.b2evolution.net/HEAD/evocore/ItemList.html#methodItemList

3 Aug 20, 2006 16:53

I'll try it out tnx.


Form is loading...