- Readme First! - Read and follow the rules, otherwise your posts will be closed
There are currently, 56 guest(s) and 0 member(s) that are online. You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Mark all posts as read [ ]
Author
Message
tommy13v
Nuke Cadet
Joined: Mar 03, 2005
Posts: 3
Posted:
Fri Mar 04, 2005 6:24 am
I am having an issue with the link in the forums "Mark All posts as read" when clicked it only returns back to the forum and does not mark the posts. the link just shows forum1.html or forum2.html depending on what forum you are in.
Here are my .htaccess files and header.php files.
Code:
#Forums
RewriteRule ^forums.* gate.html?name=Forums
RewriteRule ^forums.* gate.html?name=Forums&file=index
RewriteRule ^forums.* gate.html?name=Forums&file=index&mark=forums
RewriteRule ^fcat([0-9]*).* gate.html?name=Forums&file=index&c=$1
RewriteRule ^forum([0-9]*).* gate.html?name=Forums&file=viewforum&f=$1&mark=topic
RewriteRule ^viewforum([0-9]*)-([0-9]*)-([0-9]*).* gate.html?name=Forums&file=viewforum&f=$1&topicdays=$2&start=$3
RewriteRule ^forum([0-9]*).* gate.html?name=Forums&file=viewforum&f=$1
RewriteRule ^ptopic([0-9]*).* gate.html?name=Forums&file=viewtopic&t=$1&view=previous
RewriteRule ^ntopic([0-9]*).* gate.html?name=Forums&file=viewtopic&t=$1&view=next
RewriteRule ^watchtopic([0-9]*)-([0-9]*).* gate.html?name=Forums&file=viewtopic&t=$1&watch=topic&start=$2
RewriteRule ^unwatchtopic([0-9]*)-([0-9]*).* gate.html?name=Forums&file=viewtopic&t=$1&unwatch=topic&start=$2
RewriteRule ^ftopic([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* gate.html?name=Forums&file=viewtopic&t=$1&postdays=$2&postorder=$3&start=$4
RewriteRule ^ftopic([0-9]*)-([0-9]*).* gate.html?name=Forums&file=viewtopic&t=$1&start=$2
RewriteRule ^ftopic([0-9]*).* gate.html?name=Forums&file=viewtopic&t=$1
RewriteRule ^ftopic([0-9]*).* gate.html?name=Forums&file=viewtopic&t=$1&highlight=$2
RewriteRule ^ftopic([0-9]*).html gate.html?name=Forums&file=viewtopic&t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5
RewriteRule ^author-([a-zA-Z0-9+=]*).html gate.html?name=Forums&file=search&search_author=$1
RewriteRule ^member-([a-zA-Z0-9+=]*)-([0-9]*).html gate.html?name=Forums&file=profile&mode=$1&u=$2
RewriteRule ^sutra([0-9]*).* gate.html?name=Forums&file=viewtopic&p=$1&highlight=$2
RewriteRule ^sutra([0-9]*).* gate.html?name=Forums&file=viewtopic&p=$1
RewriteRule ^searchforums.html gate.html?name=Forums&file=search
RewriteRule ^markedread.html gate.html?name=Forums&file=viewforum&f=1&mark=topics
Code:
if (eregi("header.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
ob_start();
function replace_for_mod_rewrite(&$s)
{
$urlin =
array(
"'(?<!/)index.php'",
"'(?<!/)modules.php'",
"'(?<!/)gate.html\?name=Forums&file=search&search_author=([a-zA-Z0-9+=]*)'",
"'(?<!/)gate.html\?name=Forums&file=profile&mode=([a-zA-Z0-9+=]*)&u=([0-9]*)'",
"'(?<!/)gate.html\?name=Forums&file=profile&mode=([a-zA-Z0-9+=]*)&u=([0-9]*)'",
"'(?<!/)gate.html\?name=Forums&file=viewforum&f=([0-9]*)&topicdays=([0-9]*)&start=([0-9]*)'",
"'(?<!/)gate.html\?name=Forums&file=viewforum&f=([0-9]*)&mark=topics'",
"'(?<!/)gate.html\?name=Forums&file=viewforum&f=([0-9]*)'",
"'(?<!/)gate.html\?name=Forums&file=viewforum&f=([0-9]*)'",
"'(?<!/)gate.html\?name=Forums&file=viewtopic&t=([0-9]*)&view=previous'",
"'(?<!/)gate.html\?name=Forums&file=viewtopic&t=([0-9]*)&view=next'",
"'(?<!/)gate.html\?name=Forums&file=viewtopic&t=([0-9]*)&postdays=([0-9]*)&postorder=([a-zA-Z]*)&start=([0-9]*)'",
"'(?<!/)gate.html\?name=Forums&file=viewtopic&t=([0-9]*)&start=([0-9]*)&postdays=([0-9]*)&postorder=([a-zA-Z]*)&highlight=([a-zA-Z0-9]*)'",
"'(?<!/)gate.html\?name=Forums&file=viewtopic&t=([0-9]*)&start=([0-9]*)'",
"'(?<!/)gate.html\?name=Forums&file=viewtopic&t=([0-9]*)&watch=topic&start=([0-9]*)'",
"'(?<!/)gate.html\?name=Forums&file=viewtopic&t=([0-9]*)&unwatch=topic&start=([0-9]*)'",
"'(?<!/)gate.html\?name=Forums&file=viewtopic&t=([0-9]*)&highlight=([a-zA-Z0-9]*)'",
"'(?<!/)gate.html\?name=Forums&file=viewtopic&t=([0-9]*)'",
"'(?<!/)gate.html\?name=Forums&file=viewtopic&p=([0-9]*)&highlight=([a-zA-Z0-9]*)'",
"'(?<!/)gate.html\?name=Forums&file=viewtopic&p=([0-9]*)'",
"'(?<!/)gate.html\?name=Forums&file=viewtopic&p=([0-9]*)'",
"'(?<!/)gate.html\?name=Forums&file=index&c=([0-9]*)'",
"'(?<!/)gate.html\?name=Forums&file=index&mark=forums'",
"'(?<!/)gate.html\?name=Forums&file=index'",
"'(?<!/)gate.html\?name=Forums&file=index'",
);
$urlout = array(
"index.html",
"gate.html",
"comment\\1-\\2-\\3\\4\\5\\6.html",
"cat\\1-\\2.html",
"cat\\1.html",
"cat\\1.html",
"cat\\1-\\2.html",
"cat\\1.html",
"cat\\1.html",
"viewforum\\1-\\2-\\3.html",
"forum\\1.html",
"forum\\1.html",
"forum\\1.html",
"ptopic\\1.html",
"ntopic\\1.html",
"ftopic\\1-\\2-\\3-\\4.html",
"ftopic\\1.html",
"ftopic\\1-\\2.html",
"watchtopic\\1-\\2.html",
"unwatchtopic\\1-\\2.html",
"ftopic\\1.html",
"ftopic\\1.html",
"sutra\\1.html",
"sutra\\1.html",
"sutra\\1.html",
"fcat\\1.html",
"forums.html",
"forums.html",
"forums.html",
);
$s = preg_replace($urlin, $urlout, $s);
return $s;
}
require_once("mainfile.php");
##################################################
# Include some common header for HTML generation #
##################################################
$header = 1;
function head() {
global $slogan, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle;
$ThemeSel = get_theme();
include("themes/$ThemeSel/theme.php");
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
echo "<html>\n";
echo "<head>\n";
include("includes/dynamic_titles.php");
//echo "<title>$sitename $pagetitle</title>\n";
include("includes/meta.php");
include("includes/javascript.php");
if (file_exists("themes/$ThemeSel/images/favicon.ico")) {
echo "<link REL=\"shortcut icon\" HREF=\"themes/$ThemeSel/images/favicon.ico\" TYPE=\"image/x-icon\">\n";
}
echo "<LINK REL=\"StyleSheet\" HREF=\"themes/$ThemeSel/style/style.css\" TYPE=\"text/css\">\n\n\n";
include("includes/my_header.php");
echo "\n\n\n</head>\n\n";
themeheader();
}
online();
head();
include("includes/counter.php");
global $home;
if ($home == 1) {
message_box();
blocks(Center);
}
PHP Nuke version 7.5
I took out some of the code in the .htaccess file and header file to make this post a little shorter.
Thanks for any help, I really appreciate it.
sixpack
Lieutenant
Joined: Oct 20, 2004
Posts: 165
Posted:
Fri Mar 04, 2005 8:46 am
This is probly going to be differnet than yours but this is what I have;
For .htaccess:
Code:
RewriteRule ^forum-mark.html modules.php?name=Forums&file=index&mark=forums
and for the header:
Code:
"'(?<!/)modules.php\?name=Forums&file=index&mark=forums'",
AND
Hope that helps!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum