Page 61 of 77

Re: SEO MOD

Posted: Tue Jan 13, 2009 7:15 pm
by xrickd
rwap01 wrote:

Code: Select all

// Redirect to login or to the correct post upon emailed notification links
if (isset($_GET['e']))
{
	$jump_to = request_var('e', 0);

    $redirect_url = format_url($topic_title, "t$topic_id");

	if ($user->data['user_id'] == ANONYMOUS)
	{
		login_box($redirect_url . "&p=$post_id&e=$jump_to",  user->lang['LOGIN_NOTIFY_TOPIC']);
	}

	if ($jump_to > 0)
	{
		// We direct the already logged in user to the correct post...
		redirect($redirect_url . ((!$post_id) ? "&p=$jump_to" : "&p=$post_id") . "#p$jump_to");
	}
}
I wonder if it should read simply:

Code: Select all

// Redirect to login or to the correct post upon emailed notification links
if (isset($_GET['e']))
{
	$jump_to = request_var('e', 0);

    $redirect_url = format_url($topic_title, "t$topic_id");

	if ($user->data['user_id'] == ANONYMOUS)
	{
		login_box($redirect_url . "#p$jump_to", $user->lang['LOGIN_NOTIFY_TOPIC']);
	}

	if ($jump_to > 0)
	{
		// We direct the already logged in user to the correct post...
		redirect($redirect_url . "#p$jump_to");
	}
}
That certainly works here - but is it always the case?
Did work for me and thank you, however if the topic has more than one page, it is redirecting to the first page.
You can fix it changing this:

replace this part:

Code: Select all

redirect($redirect_url . "#p$jump_to");
with this:

Code: Select all

redirect($redirect_url . "-p=$jump_to" . "#p$jump_to");
If anyone still has any problems with URL rewriting and special characters, please refer to this site:

http://www.kyouki-house.com/?p=135
and ask for further assistance if needed. This is an alternative solution.

Most known issues with seo mod you can find there:

http://www.phpbb.com/community/viewtopi ... 5#p5716395

I am posting this link again as it is not easy to find it :)

I just have quick question for mod author.
As we have most fixes listed on the above link, why you just don't include these to the official release??

Regards and thank you for this great mod :)

Re: SEO MOD

Posted: Tue Jan 13, 2009 9:58 pm
by helpmeplease2
hello how do I install the mod?
I downloaded..

but where do I upload in my FTP?

which file cheers??
somebody help meeee
pleaseeeee :mrgreen:

Re: SEO MOD

Posted: Tue Jan 13, 2009 11:42 pm
by stickerboy

Re: SEO MOD

Posted: Thu Jan 15, 2009 1:35 pm
by knkk
I've been trolling through this thread, and I refer to this post in this very thread:

http://www.phpbb.com/community/viewtopi ... 5#p5716395

I have just one doubt - if I download and install this mod, do I need to do anything else after that (like that list of things pointed out in that post above), or will it start working just fine? As in, does the latest version of this mod take care of all of those points listed in that post above?

Thank you all for your time!

Re: SEO MOD

Posted: Thu Jan 15, 2009 2:04 pm
by shadav
need a bit of help...it seems that everything else works fine, that I know of, but the polls no longer work...

I applied the fixes
Clean URL to ensure characters such as "!" work in topic titles:
viewtopic.php?f=69&t=691165&p=6009315#p6009335 (updated 30th June 2008)
and
Fix polls and Return to forums:
viewtopic.php?f=69&t=691165&st=0&sk=t&sd=a&start=105#p4222945
(Added 14th July 2008)

but the polls still aren't working
The requested URL /black-magic-metal-t17.html- was not found on this server.
The requested URL /picture-imperfect-t245.html- was not found on this server.

[edit]nevermind found the answer
and the polls now seem to be working again

Re: SEO MOD

Posted: Thu Jan 15, 2009 10:59 pm
by dontcoz
knkk wrote:I've been trolling through this thread, and I refer to this post in this very thread:

http://www.phpbb.com/community/viewtopi ... 5#p5716395

I have just one doubt - if I download and install this mod, do I need to do anything else after that (like that list of things pointed out in that post above), or will it start working just fine? As in, does the latest version of this mod take care of all of those points listed in that post above?

Thank you all for your time!
You have to install the mod and then all the listed fixes after you've installed the mod. It is not a 5 min install but it's very doable (and I can say that with confidence cause a noob like me got it to work), so just give it a shot ok? just DO IT! lol and don't forget to backup all the files..

Re: SEO MOD

Posted: Sat Jan 17, 2009 5:42 am
by smart_prince17
I m using phpbb 3.0.4

SO this mod will work in 3.0.4 & this is latest mod na ?

Re: SEO MOD

Posted: Sun Jan 18, 2009 5:29 pm
by Christopher
AllGo wrote:Change your moved_topic in functions_seo.php from:

Code: Select all

$sql = 'SELECT t.topic_title
             FROM ' . POSTS_TABLE . ' p
                ' . TOPICS_TABLE . " t
             WHERE t.topic_id = p.topic_id
                AND t.topic_id = $id";
          $newid = "p$id";
To:

Code: Select all

$sql = 'SELECT t.topic_title
				FROM ' . POSTS_TABLE . ' p,
					' . TOPICS_TABLE . " t
				WHERE t.topic_id = p.topic_id
					AND p.post_id = $id";
			$newid = "p$id";
Your my freakin hero man! *BOWS* I had the same issue in conjuction with the "last topic main page" MOD. I was a little worried. It's working great now. If your in Cali beers on me!

Re: SEO MOD

Posted: Sun Jan 18, 2009 5:43 pm
by shadav
smart_prince17 wrote:I m using phpbb 3.0.4

SO this mod will work in 3.0.4 & this is latest mod na ?
yes it will work, but you'll need to add the fixes stated as you notice them...the only fix that I really noticed that I needed was for the polls...but I could just be overlooking things.

Re: SEO MOD

Posted: Mon Jan 19, 2009 4:07 am
by Christopher
Alright so I'm running into some issues here and I really hope you masters of code can help :cry: I'm having the "page 2" problem (I also tried a ton of the fixes here in the thread already posted and none worked)



If you click on page 2 in forum "lobby" here it works: http://www.esmoketalk.com/the-long-arm- ... aw-f6.html

If you click "Next" or The Number 2 WHILE INSIDE the thread on the buttom I get a 404 error: http://www.esmoketalk.com/law-suits-njo ... n-t19.html


I'm pretty desperate here, I really don't want to uninstsall the kick ass mod so any help is greatly appreciated.


EDIT: My polls are also not working even thought I used some of the fixes listed in this thread

Re: SEO MOD

Posted: Mon Jan 19, 2009 6:45 am
by knkk
I do not know if this request has been made before, but could someone (preferably the original mod writer, but also perhaps someone who has extensively worked with this mod in the process of installing it) post a new version of this mod, completely debugged? From all the posts on this thread, it seems fair to conclude that there are a lot of problems with a mod as important as this. Of course, this is not at all to discount all the volunteer effort put into developing the mod.

Re: SEO MOD

Posted: Tue Jan 20, 2009 4:36 am
by Mudjosh
Some major issues..

First, some details:
The way I have my forum in my database is this:
Root/_____
With the "____" being my forum's directories and scripts.

Now, here's my issues:
1. when I first installed this mod, I tried to go to my site test.com/index.php but I was rerouted to test.com which showed up blank..

I saw some people having issues with the mod rerouting the index to their portal so I tried their fix.. Seemed to work.. Now when I am in the ACP and click return to index, I get a 404 error.. (Because I renamed the index.php to forum.php)

2. When I go to a forum within the site, I get rerouted back to my newly named forum.php and it doesn't seem to be using the .css anymore.. So in otherwords, it seems broke..

I will be uninstalling this mod sadly. Could anyone help me for a future attempt?

Re: SEO MOD

Posted: Tue Jan 20, 2009 12:15 pm
by xrickd
knkk wrote:I've been trolling through this thread, and I refer to this post in this very thread:

http://www.phpbb.com/community/viewtopi ... 5#p5716395

I have just one doubt - if I download and install this mod, do I need to do anything else after that (like that list of things pointed out in that post above), or will it start working just fine? As in, does the latest version of this mod take care of all of those points listed in that post above?

Thank you all for your time!
Hi. There is still some details which are not working.
I posted one fix above (see my previous post) and there is another fix:

When topic name contains ">" or "<" - it will not redirect correctly.

To make it work you have to edit includes/functions_seo.php again and:

find:

Code: Select all

    function clean_url($url)
    {
       $url = trim(str_replace(array('Re:', 're:'), '', $url));
       //$find = array('?', '#', '%', '?', '^', '.', '/', ' ', '_', ')', '(', '[', ']', ':', '.');
       $find = array(' ', '@', '=', '$', '&amp', '&quot', '+', '~', '`', '?', '#', '%', '!', '^', '.', '/', '_', ')', '(', '[', ']', '{', '}', ':', ',', '<', '>', ';', '|', '*', '"', '\'', '\\');
       $url = str_replace($find, '-', censor_text($url));
       // remove all duplicates "-"
       $url = ereg_replace("-+", '-', $url);
       // remove the last "-", to avoid this "/test--t14.html"
       if ($url{strlen($url)-1} == '-')
       {
          $url = substr($url, 0, -1);
       }
       return utf8_clean_string($url);
    }
and replace with:

Code: Select all

function clean_url($url)
    {
       $url = trim(str_replace(array('Re:', 're:'), '', $url));
       //$find = array('?', '#', '%', '?', '^', '.', '/', ' ', '_', ')', '(', '[', ']', ':', '.');
       $find = array(' ', '@', '=', '$', '&amp', '&quot', '&gt', '&lt', '+', '~', '`', '?', '#', '%', '!', '^', '.', '/', '_', ')', '(', '[', ']', '{', '}', ':', ',', '<', '>', ';', '|', '*', '"', '\'', '\\');
       $url = str_replace($find, '-', censor_text($url));
       // remove all duplicates "-"
       $url = ereg_replace("-+", '-', $url);
       // remove the last "-", to avoid this "/test--t14.html"
       if ($url{strlen($url)-1} == '-')
       {
          $url = substr($url, 0, -1);
       }
       return utf8_clean_string($url);
    }
I added &gt and &lt flags to fix this.

And there is at least one more I found.

Mark topics read works fine... only from mainpage of your forum. If you will go to any other forum and try to do this, it won't work :/
Any ideas anyone??


*described fix refer to updated version only as I applied all fixes from here:
http://www.phpbb.com/community/viewtopi ... 5#p5716395
and now I am trying to find and repair all other details...

Re: SEO MOD

Posted: Wed Jan 21, 2009 1:52 am
by poke6uy
Hi, I don't know which mod is causing this problem, I apologize in advance.

for some reason, when I click on the category link when I'm inside the category, the link has an extra "-" at the end of the .html extension. This causes an invalid link which ultimately leads to a 404 error. Does this have to do with the SEO mod?
Untitled-1.gif
Untitled-1.gif (66.82 KiB) Viewed 672 times

Re: SEO MOD

Posted: Wed Jan 21, 2009 6:36 am
by xrickd
poke6uy wrote:Hi, I don't know which mod is causing this problem, I apologize in advance.

for some reason, when I click on the category link when I'm inside the category, the link has an extra "-" at the end of the .html extension. This causes an invalid link which ultimately leads to a 404 error. Does this have to do with the SEO mod?
Untitled-1.gif
Hi. To fix this issue:

open Open includes/functions_seo.php and find:

Code: Select all

return $url . (($append_url) ? $url_delim . $append_url . $amp_delim : $url_delim) . $params . ((!$session_id) ? '' : $amp_delim . 'sid=' . $session_id);
replace with:

Code: Select all

return trim($url . (($append_url) ? $url_delim . $append_url . $amp_delim : $url_delim) . $params . ((!$session_id) ? '' : $amp_delim . 'sid=' . $session_id), '-');
done.