PDA

View Full Version : Can You Add More Than 1 Headline On Index?


dcei
02-09-2006, 02:05 AM
I'm running v. 3.1 on Unix Platform.

Is it possible to show more than 1 headline on the /index page? I see in /admin that you can set rotating headlines, but no capability to show more than 1. Is this possible, and if so, how?

Alex
02-09-2006, 12:48 PM
Sort of, yes... We were really under the impression that rotating headlines are so cool, that no one will want to have "plain, ol' ones" :D

Anyhow, a hack is needed to allow this. You actually need to disable AJAX and put back config line for several headlines.

1. index.php file, remove comment on line 678 - $featured_news_HTML = HTML_latest_news(1); so it is active again

2. comment out the next few lines, that put AJAX (681-687):

if ($featured_news_HTML = HTML_featured_news())
{
if (isset($ajax_script) && file_exists($ajax_script))
$java_scripts = "<script language=\"JavaScript\" src=\"{$url}{$ajax_script}\"></script>";
else
$java_scripts = "<script language=\"JavaScript\" src=\"{$url}include/ajax.js\"></script>";
}


3. include/config.php, line 5: $headlines_number='0'; put desired number in

4. templates/index.tpl - remove JavaScript player for rotation (complete <tr> section below {FEATURED_NEWS}.

That would be about it...

sphynx
06-29-2007, 01:31 AM
Is there any hack to achieve this unde 3.5? I noticed there's no such thing in 3.5:

3. include/config.php, line 5: $headlines_number='0'; put desired number in