 |
 |
 |
 |
 |
| Author |
Message |
roby124
Joined: 02 Jun 2008 Posts: 2
|
|
Random news ( again :D ) |
|
Hello!
Im using random news script which I found on this forum. The problem is that i have 3 include codes on one php site. I have to have 2 include codes for random content and one that will show latest news. I use random ones for random picture and random joke. When I first downloaded cutenewsru cms I put the include codes on the site, added random news function. It was all messed up then. Instead of random joke there was latest news, and so on... So i tried putting $static which i used on templates, categories and everything. It's all ok now. The latest news show up where they should. But the random joke and random picture don't. They mess each other up. So can anyone help me with this? I am using this code in show.inc.php:
 |  | if($random_single){
foreach($sql->select(array('table' => 'news', 'where' => $where)) as $row){
$selected_cat_arr[] = $row['id'];
}
$shuffle = array_rand($selected_cat_arr);
$query = $sql->select(array(
'table' => 'news',
'join' => array('table' => 'story', 'where' => 'id = post_id'),
'where' => array("id = ".$selected_cat_arr[$shuffle])));
$random_single = false;
} |
So please help me! I need this urgent...
Thank you in advance...
|
|
| Mon Jun 02, 2008 2:14 pm |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|
 |
 |
 |
|