Forum Moderators: coopster
I am using two scripts on my site.
"Rose News" and "Article Engine"
Now when I open my site to the news and browse to the Articles and then back. Everthing on the news page is gone. Reloading is not enough.
I have to shut down the browser and open it again in a few minutes. or empty my IE temp files folder.
what is it?
Thank you..
geiri
Try instead to continue in a forward-navigation, and don't click the back button. If that fixes it, cool. If not, or if I'm misunderstanding your question, just post a bit more information or a URL to the problem page.
I tryied what you said keept browsing around for some time, and then hit the home button and everthing worked fine. :)
The second time it did not work?
Thank you
Geiri
[edited by: jatar_k at 10:50 pm (utc) on April 18, 2004]
[edit reason] no personal urls thanks [/edit]
It is quite strange behaviour. I couldn't read therror message so I am not sure what it said but...
The only thng that comes to mind is are you using sessions or cookies? I can only guess that when you come back to the page some setting is keeping it in the broken state.
Since the only way you can reset it is to kill the browser, that is why sessions came to mind. I can't really think of any other reason.
The error message simply says "no news"
Is to be shown if no news are available.
I agree with you both that this has to be a session or a cookie thing.
The thing is I don’t know much about php
So If you guys can help me I would be grateful.
So where do we start ;)
Can I post some code here? or a link to the scripts…
Or is there some code I can use to clear the .....?
Thank you
Geiri
The first thing you need to do is isolate the portion of the code that is giving you that specific "No News" message.
Do you know where it gets the news from? I assume from a database of some kind.
The important information is to figure out what variables are being used to retrieve the news and where they are getting messed up.
Look through the source code and try to isolate this portion of the code, since we don't allow massive code dumps or links to personal sites you will have to do a little leg work. In the end this will help you a lot more than someone just doing it for you.
For now, look for the error message and the database call and post those few lines of code here and we can go from there.
The news system is called Rose news it was popular around 2002, then it was dropped.
It uses Mysql.
I went to PhpMyAdmyn and checked out the database for the id that calls the nonews error.
this is the layout
Varid is 3
Varname is nonews
Varvalue is No news have been posted
This is the code I found in the news script.
$template = replace_datetime($template, $date, $time_array);
$thenews .= $template;$merlin_speak .= merlin($merlinstuff, $news_stuff, $date);
}
$i++;
endwhile;
}
if ($thenews == '') {
$thenews = $variable[nonews];
}
if ($merlintalk == 'On') {
$topfile = file("includes/merlintop.inc");
$topfile = implode("", $topfile);
$bottomfile = file("includes/merlinbottom.inc");
$bottomfile = implode("", $bottomfile);
$merlin_to_send_back = $topfile;
$merlin_to_send_back .= $merlin_speak;
$merlin_to_send_back .= $bottomfile;
$merlintalk .= $merlin_to_send_back;
}
else {$merlintalk = '';}
return $thenews;
}
There is also some cookie settings there time
saying controlling if you have read the news or not..
Thank you for your help and time..
Geiri
it looks like the date stuff might be the mess
$thenews is the var being tested and it is based somehow on $date
Where does $date come from? Is that the cookie stuff?
saying controlling if you have read the news or not..
so maybe it lets you see the news once and then assumes you have read it and only shows news that is newer than the cookie date.
can you post the cookie stuff, pls?
# now cookies stuff
# find out who's logged in for Admin links
$variable[username] = $HTTP_COOKIE_VARS["con-Username"];
$variable[nickname] = $HTTP_COOKIE_VARS["con-Nickname"];
$variable[loggedin] = $HTTP_COOKIE_VARS["con-Logger"];
$variable[userpassword] = $HTTP_COOKIE_VARS["con-Password"];
$variable[userlevel] = $HTTP_COOKIE_VARS["con-Level"];
}
if ($variable[pagename] == 'None') {
Die;
}
[code]And this might do somthing ....
[code]
session_start();
if (!$PHPSESSID) {session_register('sess_voice');}
if ($merlin == 'on' ) {$sess_voice = 'On';}
elseif ($merlin == 'off' ) {$sess_voice = 'Off';}
include ('includes/newsfunctions.php');
$the_menu = menulayout($category, $showheadlines);
$the_category_menu = categorymenu('0');