Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: footer disappears  (Read 2904 times)

jansie

  • Guest
footer disappears
« on: October 07, 2007, 10:01:58 pm »

hi

i tried using snewsMU, but found something strange happening when i try to rearrange the template to suit my needs. it seems that the login link fails when you remove the following from the file, and place it somewhere else:

<?php users_online(); ?>

and

<?php guests_online(); ?>

Any advice on why it does this?
Logged

jlhaslip

  • Sr. Member
  • ****
  • Karma: 16
  • Posts: 374
    • My snews with AEF Forum site
Re: footer disappears
« Reply #1 on: October 10, 2007, 10:46:28 pm »

some sample code please
Logged
Yes! I have no siggy.

jansie

  • Guest
Re: footer disappears
« Reply #2 on: October 10, 2007, 11:29:54 pm »

ok, lemme show you what i got. this is the index.php code...

<?php session_start(); include('snewsMU.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <?php title(); ?>   
   <meta name="Robots" content="index,follow" />
   <meta name="Generator" content="sNews 1.6" />
   <link rel="stylesheet" type="text/css" href="sabiz.css" media="screen" />
   <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss-articles/" />
   <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss-pages/" />
   <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss-comments/" />
</head>
<body>

<div id="pagewidth" >
<div id="header" >
<h1><?php echo s('website_title'); ?></h1>
</div>
<div id="wrapper" class="clearfix" >
<div id="maincol" >
<?php center(); ?>
</div>
<div id="leftcol" >
<ul id="menu">
<?php pages(); ?>
</ul>
<h3>Categories:</h3>
<ul id="categories">
<?php categories(); ?>
</ul>
<div id="extra">
<?php extra(); ?>
</div>
<h3>New Articles:</h3>
<ul id="new-articles">
<?php menu_articles(0,3); ?>
</ul>
<div id="search">
<?php searchform(); ?>
</div>
<h3>New comments:</h3>
<ul id="new-comments">
<?php new_comments(5, 30); ?>
</ul>
<ul id="rss">
<?php rss_links(); ?>
</ul>
<div id="users">
<?php users_online(); ?> <!-- This is where i wanted the users to show, in the sidebar area -->
<?php guests_online(); ?> <!-- This is where i wanted the guests to show, in the sidebar area -->
</div>
</div>
</div>

<div id="footer" >
<p>Barbecued by <a href="http://snewscms.com/" title="Single file CMS">sNews</a> | <?php login_link(); ?></p>
</div>
</div>
   
</body>
</html>


With this setup, the footer completely vanishes. i add a screenshot.

Logged

mosh

  • Hero Member
  • *****
  • Karma: 77
  • Posts: 510
  • Awesome day :)
    • cms-zen
Re: footer disappears
« Reply #3 on: October 11, 2007, 01:00:31 am »

i confirm this error,
no meter where i place it on index, no output after that code.

awesome day

update: fixed
REMOVE this -----> <?php guests_online(); ?>

i think this should be changed on the download file to  8)
« Last Edit: October 11, 2007, 01:17:41 am by mosh »
Logged

jansie

  • Guest
Re: footer disappears
« Reply #4 on: October 11, 2007, 02:13:27 pm »

hi

the other problem with this footer is, it's not good semantics. you're not supposed to have the <p> within the <ul>. now i know this doesn't really matter, but i'm sure for some standardistas it would be an issue.
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: footer disappears
« Reply #5 on: October 11, 2007, 06:37:20 pm »

Quote from: Jansie Blom
i know this doesn't really matter
Valid code is always better than invalid. So of course it matters. ;)
Logged

jansie

  • Guest
Re: footer disappears
« Reply #6 on: October 11, 2007, 07:26:51 pm »

hey agent smith. i agree. i prefer valid code. won't die on that hill, but i'll certainly put up a fight for it.

thanks again guys, for the great products and addons and mods and support. amazing stuff!
Logged