MyBB Community Forums

Full Version: SEO Links plugin wrong page link
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
hi mate;

I m using mybb 1.6.1 and latest seo link plugin. I showed the picture my problem. first page link wrong

[Image: TJ5n2.jpg]
It's most likely a bug with the SEO plugin you're using, disable that and it'll probably work.
1.6.0 also worked without any problems. thanks
Did the plugin require any file edits??
unfortunately I use SEO Links plugin
Yes, I can see you use a plugin, I asked if it requires any core file edits, which you may have overwritten in the upgrade.

Basically if there's a bug with this SEO plugin that means it can't get the correct page number from the URL, it's not going to show the right number in the page numbers.
Do you have a problem finding?

htaccess
# //seo_mod_start
RewriteEngine On
# Uncomment the following and add your forum path if rewrites arent working properly
#RewriteBase /mybb/
RewriteRule ^index.html$ index.php [L,NE]
RewriteRule ^(.*)-t-([0-9]+).html(.*)$ showthread.php?tid=$2$3 [QSA,L]
RewriteRule ^(.*)-t-([0-9]+)-([0-9]+).html$ showthread.php?tid=$2&page=$3 [QSA,L]
RewriteRule ^(.*)-f-([0-9]+).html(.*)$ forumdisplay.php?fid=$2$3 [QSA,L]
RewriteRule ^(.*)-u-([0-9]+).html$ member.php?action=profile&uid=$2 [QSA,L]
RewriteRule ^members/(.*)-([0-9]+).html$ member.php?action=profile&uid=$2 [QSA,L]
RewriteRule ^(.*)/(.*)-f-([0-9]+).html(.*)$ forumdisplay.php?fid=$2$3 [QSA,L]
RewriteRule ^(.*)-f-([0-9]+)-([0-9]+).html(.*)$ forumdisplay.php?fid=$2&page=$3 [QSA,L]
RewriteRule ^(.*)-f-([0-9]+)-([a-z]+)(-|-[a-z]+)-([0-9]+)-([0-9]+).html(.*)$ forumdisplay.php?fid=$2&sortby=$3&order=$4&datecut=$5&page=$6$7 [L]
RewriteRule ^(.*)-a-([0-9]+).html$ announcements.php?aid=$2 [L]
# //seo_mod_end

seo.php
	// replace forum urls..
	//$page = preg_replace("#(\"|')forumdisplay.php\?fid=([0-9]+)&sortby=([a-z]+)(.*)order.*datecut.*page=([0-9]+).*(\"|')#ie", "seo_forum_url('\\2', 2, '\\0', array('\\6'))", $page);
	$page = preg_replace("#(\"|')forumdisplay.php\?fid=([0-9]+)(.+?)(\"|')#ie", "seo_forum_url('\\2', 3, '\\0', array('\\4'))", $page);
	$page = preg_replace("#(\"|')forumdisplay.php\?fid=([0-9]+)(\"|')#e", "seo_forum_url('\\2', 1, '\\0', array('\\3'))", $page);

	// replace topic urls
	$page = preg_replace("#href=(\"|')(|.+?{$stripped_url})showthread.php\?tid=([0-9]+)(\"|')#e", "seo_topic_url(\\3, 4, '\\0', '\\4')", $page);
	$page = preg_replace("#(\"|')showthread.php\?tid=([0-9]+)(&|&)page=([0-9]+|last)(\"|')#e", "seo_topic_url(\\2, 2, '\\0', '\\5', \\4)", $page);
	
	// last post links
	if ($mybb->settings['cur_file'] == "index.php" || $mybb->settings['cur_file'] == "forumdisplay.php")
	{
		// find all last post tids and generate the cache
		$tids = array();
		preg_match_all("#(\"|')showthread.php\?(tid=([0-9]+)(&|&)action=lastpost|action=lastpost(&|&)tid=([0-9]+))(\"|')#", $page, $tid_matches);
		for ($i = 0; $i < count($tid_matches[2]); $i++) {
			if ($tid_matches[3][$i] == '') {
				$tid_matches[3][$i] = $tid_matches[6][$i];
			}
			$tids[] = $tid_matches[3][$i];
		}
pls help me...
I think no one will help.
Pages: 1 2 3