MyBB Community Forums

Full Version: Google SEO installation issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi guys,
I've tried to install Google SEO yestoday, did correct the .htaccess file but i had problem with function.php.
First replaced it with the one that came with the mod Google SEO (i've replaced it with the correct version - 1.4.10 that i have). After i've replaced the function.php the forum crashed - upon opening the index page there were only errors.
Than i try to do it manually - same result.
I decided to miss the step and go thru installing the plugin - got some errors about the .htaccess file in the Admin CP>Plugin window - fixed that. Also there were error about the function.php. This is where i've stopped and uninstalled the mod.
Where i had to replace the code - there was already a code (in function.php)
First time manualy - i've replaced it, second time - just added the new one.

So, pretty obviously did something wrong, but from what i've read in the installation doc and from threads couldn't find where i do wrong.

And finally the Q - Can the forum be indexed by google without Google SEO and can someone give me a tip how to do it correct? Smile

Thanks in advance
Do you have any other plugins that modify functions.php as well? Not sure how Google SEO's modifications would cause you errors.

Only URLs need the modification of functions.php, all other features of Google SEO you can use without this modifications. So you could for example still use the Sitemap and dynamic meta description functionality if you want to.
Thanks for the information, so even without edited function.php i can continue with my goal - indexing the forum in google.

In the installation instruction about manually writing fuction.php there is something like that:
Find:
       function get_profile_link($uid=0)
       {

     Replace with:
       function get_profile_link($uid=0)
       {
           if(function_exists("google_seo_url_profile"))
           {
               $link = google_seo_url_profile($uid);

               if($link)
               {
                   return $link;
               }
           }

ok, but i already have code after the function:
function get_profile_link($uid=0)
{
	$link = str_replace("{uid}", $uid, PROFILE_URL);
	return htmlspecialchars_uni($link);
}

Do i have to replace all of the existing lines with the given one in the installation manual or should i add after them?

More important one - i didn't quite got if the usage of Google SEO will be better in indexing the forum in google?

Thanks again
The original code is to be left in place, the modification just adds an additional function call at the top of the function. If you do the replacement as described (replace only the two lines shown with the other lines shown) what you actually end up with is a code insertion not a replacement. I guess it could be described better. Have a look at the included modified functions.php to see what it's supposed to look like.
Done it. Thank you very much.
Sitemap and meta tags work fine.
Thanks again i thought to leave it uninstalled.
(2010-01-08, 07:13 AM)frostschutz Wrote: [ -> ]Do you have any other plugins that modify functions.php as well? Not sure how Google SEO's modifications would cause you errors.

Only URLs need the modification of functions.php, all other features of Google SEO you can use without this modifications. So you could for example still use the Sitemap and dynamic meta description functionality if you want to.

Hi Frost, thanks you for the Google SEO plugin.

I am planning and preparing to install your G SEO plugin with my new live MyBB forum ( http://www.ig4s.net/Forum ). I want to clarify following issues b4 starting:

1. Modifying htaccess and functions.php should be done AFTER install and activate all G seo features, right?

2. Where is my robots.txt? If I don't have it, how do I create one?

3. I know gseo sitemap and url rewrite rules have to be added to htaccess file in <IfModule mod_rewrite.c> But how about gseo 404? where (which module) I have to add this to htaccess file?

4. If I modify my functions.php as instructed to make seo url and redirect properly work and then later remove the modification from functions.php, what would happen after that? any harm? or advantage? (right now b4 gseo plugin, I have some links in my site (outside of MyBB) allow visitors to login or register or browse certain forum of my MyBB. Will these links still work when gseo url and redirect start to set in?)

Thank you for your help.
1) doesn't matter (the modification doesn't do anything when Google SEO is not active)
2) just create or upload one...
3) anywhere. this is a standard feature usually not enclosed by <if>
4) when you remove the modification to functions.php, you're back to the original MyBB URLs. If Google SEO is still installed and active then, it will redirect Google SEO URLs back to the MyBB original ones
(2010-01-21, 12:24 AM)frostschutz Wrote: [ -> ]2) just create or upload one...

Thanks, Frost. I know robots.txt is off gseo plugin or even MyBB. But still need some tips: (1) how to create one? what is the format or syntax? (2) where do I upload it to?

Thanks
(2010-01-21, 12:24 AM)frostschutz Wrote: [ -> ]1) doesn't matter (the modification doesn't do anything when Google SEO is not active)
2) just create or upload one...
3) anywhere. this is a standard feature usually not enclosed by <if>
4) when you remove the modification to functions.php, you're back to the original MyBB URLs. If Google SEO is still installed and active then, it will redirect Google SEO URLs back to the MyBB original ones

Help! Frost, I just installed the gseo plugin and it's activated, but all the 5 features are 'disabled' with red ! mark. What went wrong? How do I enable the features?

... OK, know how to enable them and all are enabled, but it keeps on saying this:

Add to .htaccess:

RewriteEngine on

# Google SEO workaround for search.php highlights:
# Make this rule the first rewrite rule in your .htaccess!
RewriteRule ^([^&]*)&(.*)$ http://www.ig4s.net/Forum/$1?$2 [L,QSA,R=301]

# Google SEO Sitemap:
RewriteRule ^sitemap-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC]

# Google SEO URL Forums:
RewriteRule ^Forum-([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]

# Google SEO URL Threads:
RewriteRule ^Thread-([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC]

# Google SEO URL Announcements:
RewriteRule ^Announcement-([^./]+)$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]

# Google SEO URL Users:
RewriteRule ^User-([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]

# Google SEO URL Calendars:
RewriteRule ^Calendar-([^./]+)$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]

# Google SEO URL Events:
RewriteRule ^Event-([^./]+)$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]

# Google SEO 404:
ErrorDocument 404 /Forum/misc.php?google_seo_error=404
=========================================

I copy it and add to htaccess and it still show the same thing in ACP. Then I go to my forum index page fine, but after that I can go no where! Click any forum and it bring up Error 404! It seems the url have been rewrited accordingly, but the browser say: "the requested url was not found on this server. The link on the referring page seems to be wrong or outdated."

How do I solve this problem? Thanks for help
If the URL go to a 404 page, your rewrite rules don't work. If at the same time Google SEO complains that you haven't added the rules to your .htaccess, it probably means you didn't add them. Make sure you add it to a file called .htaccess (dot at the beginning, no .txt at the end, just .htaccess) in your forum folder.
(2010-01-21, 01:09 PM)frostschutz Wrote: [ -> ]If the URL go to a 404 page, your rewrite rules don't work. If at the same time Google SEO complains that you haven't added the rules to your .htaccess, it probably means you didn't add them. Make sure you add it to a file called .htaccess (dot at the beginning, no .txt at the end, just .htaccess) in your forum folder.

Hey Frost, thank you so much. You're hitting good on my lost head here! Now I created a .htaccess file in my forum folder and re-enabled gseo and it went totally smoothly (url, re-direct, ... etc) for my few tests (with no way to know if it pleases google search engine yet). However, one thing still puzzling me that I couldn't find my sitemap-index.xml which should be created in my forum folder. After all, can I see and read the sitemap file? or it was just created and sent to google only?

Please clear this final (hope) puzzle for me. Thanks
Pages: 1 2