Slight change in the front page layout.

CougTek

Hairy Aussie
Joined
Jan 21, 2002
Messages
8,726
Location
Québec, Québec
Hi,

I added a shortcut to the ten most recent news on the top center of the front page in an attempt to make the whole thing more readable. Alas, I don't see how to widen the text in the news' titles, but at least, you should have an idea of the content of the news.

I also added a menu (right corner) to inform you of the latest files I add in the download section. Simply showing the ten most popular wasn't enough IMO. I added two new benchmarks (LinPack and Cachemem) and a link to download the lastest version of Netscape (6.2.2) for those who would be interested.

Opinions about that layout changes would be appreciated.

Thanks.
 

Tea

Storage? I am Storage!
Joined
Jan 15, 2002
Messages
3,749
Location
27a No Fixed Address, Oz.
Website
www.redhill.net.au
I like it Coug. Forgive me not paying as much attention as I should, I've been kind of tied up with a few layout issues of my own lately. (Learn CSS in one day - yuk! Getting there though.)

One thing to suggest: the top ten news itens cut off only half way across the window. It would be nice if they were a little longer, so that I could read the whole heading, or at least a few more words of it.

PS: Thanks for the new Mozilla/2 :) I'll download it and give it a whirl as soon as I'm back at the office with an OS/2 machine to run it on.
 

P5-133XL

Xmas '97
Joined
Jan 15, 2002
Messages
3,173
Location
Salem, Or
Could you please widen the text field in the recent news section, so that the titles are not chopped off. Perhaps put the dates to the left and allow the text field extend to the right to the end of the box.
 

CougTek

Hairy Aussie
Joined
Jan 21, 2002
Messages
8,726
Location
Québec, Québec
I would like to, but there's no option in the admin menu to allow me to adjust the text width. Maybe Doug could edit the block from elsewhere, but I have no access to that part of the front page administration. It's weird, but it's the way it is :(
 

Handruin

Administrator
Joined
Jan 13, 2002
Messages
13,741
Location
USA
I think I've got it. It took a little hunting into the code, but I've found how xoops manages the top section. It was in the file called news_top.php and here is the function that generates the abbreviated topics.

I've adjusted if (strlen($title) >= 250) {
$title = substr($title,0,100)."...";
so that a topic greater then or equal to 250 characters will be limited to the first 100.


Code:
function b_news_top_show($options) {
	global $xoopsDB, $xoopsConfig;
	$myts = new MyTextSanitizer();
	$block = array();
	$block['content'] = "<small>";
	$sql = "SELECT storyid, title, published, counter FROM ".$xoopsDB->prefix("stories")." WHERE published<".time()." AND published>0 ORDER BY ".$options[0]." DESC";
	$result = $xoopsDB->query($sql,$options[1],0);
	while ( $myrow = $xoopsDB->fetchArray($result) ) {
		$title = $myts->makeTboxData4Show($myrow["title"]);
		if ( !XOOPS_USE_MULTIBYTES ) {
			if (strlen($title) >= 250) {
				$title = substr($title,0,100)."...";
			}
		}

let me know if this works for everyone.

-Doug
 
Top