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: a problem in xml page Snews1.6  (Read 690 times)

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .
a problem in xml page Snews1.6
« on: December 07, 2010, 01:39:54 AM »

He what's up
 ..I have a problem as in snews1.6 .
When i click on these links:

http://xxxxx.com/rss-comments/
http://xxxxx.com/rss-pages/
http://xxxxx.com/rss-comments/
http://xxxxx.com/rss-comments/seftitle/

Page is displaye this Message so:  No content

should be displayed page of xml.
To remind all .. I have never had this problem before to after  i add some mods.

thanks.
Logged
“Fifty years of programming language research, and we end up with C++?”

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: a problem in xml page Snews1.6
« Reply #1 on: December 07, 2010, 06:09:38 AM »

The best way to find out what mods might be causing the problem is to back-track and temporarily replace modded functions with default functions... one at a time... testing with each change... till you find the one that is causing the problem. Once you have it narrowed down to the function that is causing the problem... then you go through the function itself to see what changes you made... etc..
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .
Re: a problem in xml page Snews1.6
« Reply #2 on: December 08, 2010, 09:11:20 PM »

First, thanks for the reply Sorry for the delay..
Yes I understand what you mean.You want to say that I should restore the original functions in snews.phpI can not because I have many additions lasted 6 months as I added this property (http://snewscms.com/forum/index.php?topic=5063.0)
So I added also inspired :
<?php forth_extra(); ?>
<?php five_extra(); ?>


After the efforts that i have found this function  // STARTUP

I do not understand the ambiguity is probably the cause of this problem.
Look deep in this line
  if (get_id('category') == "sitemap.xml") {sitemapxml(); die;}
Code: [Select]
// STARTUP
# 1.60 - completely revised
function snews_startup() {
   connect_to_db();
   if (get_id('category') == "sitemap.xml") {sitemapxml(); die;}
$articleSEF = get_id('article');
if (false !== strpos($categorySEF, 'rss-')) {rss_contents($categorySEF, $articleSEF);}
$homeSEF = l('home_sef');
$categoryID = $categorySEF == $homeSEF ? 0 : retrieve('id', 'categories', 'seftitle', $categorySEF);
$articleCatID = retrieve('category', 'articles', 'seftitle', $articleSEF);
if (!empty($categorySEF) && $categorySEF != '404') {
switch(true) {
case ((!$categoryID || !is_numeric($categoryID)) && check_category($categorySEF) == false):
case (!empty($articleSEF) && false === strpos($articleSEF,l('paginator')) && !is_numeric($articleCatID)):
header('Location: '.db('website').'404/'); exit;
     break;
}
}
if ($categorySEF == '404') {header('HTTP/1.1 404 Not Found');}
update_articles();
if (isset($_POST['Loginform'])) {
$user = checkUserPass($_POST['uname']);
$pass = checkUserPass($_POST['pass']);
if (md5($user) === s('username') && md5($pass) === s('password') && mathCaptcha($_POST['calc'], $_POST['sum'])) {
$_SESSION[db('website').'Logged_In'] = token();
}}}
snews_startup();

When i download the original version(snews1.6) ''with no any MODS or more FUCTIONS ''These were not matched together.

In the original version is so
(                $categorySEF = get_id('category');


Code: [Select]
// STARTUP
function snews_startup() {
connect_to_db();
$categorySEF = get_id('category');
$articleSEF = get_id('article');
if (false !== strpos($categorySEF, 'rss-')) {rss_contents($categorySEF, $articleSEF);}
$homeSEF = l('home_sef');
$categoryID = $categorySEF == $homeSEF ? 0 : retrieve('id', 'categories', 'seftitle', $categorySEF);
$articleCatID = retrieve('category', 'articles', 'seftitle', $articleSEF);
if (!empty($categorySEF) && $categorySEF != '404') {
switch(true) {
case ((!$categoryID || !is_numeric($categoryID)) && check_category($categorySEF) == false):
case (!empty($articleSEF) && false === strpos($articleSEF,l('paginator')) && !is_numeric($articleCatID)):
header('Location: '.db('website').'404/'); exit;
     break;
}
}
if ($categorySEF == '404') {header('HTTP/1.1 404 Not Found');}
update_articles();
if (isset($_POST['Loginform'])) {
$user = checkUserPass($_POST['uname']);
$pass = checkUserPass($_POST['pass']);
if (md5($user) === s('username') && md5($pass) === s('password') && mathCaptcha($_POST['calc'], $_POST['sum'])) {
$_SESSION[db('website').'Logged_In'] = token();
}}}
snews_startup();
« Last Edit: December 08, 2010, 09:14:13 PM by adminphp »
Logged
“Fifty years of programming language research, and we end up with C++?”