MyBB Community Forums

Full Version: Google SEO Legacy 1.4.1
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to reduce the number of queries, because it certainly burdened server?
The next version of Google SEO will employ more caching mechanisms and possibly follow other venues to reduce the number of queries. However that won't change that there is some cost involved with this plugin. If you're on a free or overloaded shared host with a slow database, those aren't ideal conditions for a forum. Also if you have plugins that put lots of additional links on pages, that increases the amount of work Google SEO has to do.

Under normal conditions, the queries shouldn't be a problem; Google SEO already is optimized to not cause too many of them, and the queries themselves are as fast as they can be. Google SEO doesn't do any expensive sorting / scanning operations on the database, but they are all index based lookups.

If you need to reduce the queries no matter what, you can disable the URL feature; either completely or just selectively. For example you could choose to use SEO URLs for threads only, and leave user profiles, forums, et cetera out of the picture. You can do that by removing the URL scheme for all but threads in the URL settings, and / or by reverting the changes to inc/functions.php to all but get_thread_link / get_post_link.

This way no queries would have to be made for user profiles, forums, etc. thereby reducing the total number of queries.
(2011-01-01, 10:21 AM)frostschutz Wrote: [ -> ]I haven't used it; I just don't have that kind of money, especially not if it's something I can easily make myself. Besides I don't even like their URLs.

The official vBSEO forums don't even put the forum name in the URL, they just put in the IDs /f55/ and now that's really completely useless crap in the URL if you ask me.

You can replace it with another identifier, for example t-. If you remove it entirely, you'll run into conflicts, for example if someone names their thread "Forum Anything" and it would result in an URL Forum-Anything, it would be misinterpreted as a forum URL and the thread would be inaccessible.

I believe there is another plugin for that. The problem about this feature is that it's expensive; for every link you actually have to access their site in order to fetch the page title.

Well I have used it on projects I have worked on in the past, and its a great piece of software.

I agree forum names as f55 in the URL are useless crap, but this is just one of the built in URL redirect styles, and I think them using this style on there forums sets a bad example. Check out one of the forums they reference in regards to URL style in vBSEO setup:
http://www.vbulletinsetup.com/461-articl...orial.html
Now I dont particularly see a need for a forum ID in the URL, and I assume putting the thread ID in there is necessary to prevent duplicate URLs. From doing my tests, it seems like your mod is set up to search thread titles when posted to make sure it is not a duplicate. Wouldnt it be easier on the server to just insert the thread ID to begin with rather then searching the thread titles table?

As for changing thread to t-, could you explain what is required? I tried to do it myself but no luck. Heres what I did. In .htaccess:
		RewriteRule ^t-([0-9]+)\.html$ showt.php?tid=$1 [L,QSA]
	RewriteRule ^t-([0-9]+)-page-([0-9]+)\.html$ showt.php?tid=$1&page=$2 [L,QSA]
	RewriteRule ^t-([0-9]+)-lastpost\.html$ showt.php?tid=$1&action=lastpost [L,QSA]
	RewriteRule ^t-([0-9]+)-nextnewest\.html$ showt.php?tid=$1&action=nextnewest [L,QSA]
	RewriteRule ^t-([0-9]+)-nextoldest\.html$ showt.php?tid=$1&action=nextoldest [L,QSA]
	RewriteRule ^t-([0-9]+)-newpost\.html$ showt.php?tid=$1&action=newpost [L,QSA]
	RewriteRule ^t-([0-9]+)-post-([0-9]+)\.html$ showt.php?tid=$1&pid=$2 [L,QSA]

And in the Admin CP I tried changing the thread setting to T-{url} and t-{url} as I would prefer a lower case t. The url seemed to change appropriately but all I got was a white page.

As for the other mod, do you know the name? I would like to see how much impact it has.
(2011-01-05, 06:30 PM)Xplorer4x4 Wrote: [ -> ]Now I dont particularly see a need for a forum ID in the URL, and I assume putting the thread ID in there is necessary to prevent duplicate URLs.

To them the thread id is actually necessary to make the URL work. You can change anything else to your liking. So if you don't like a particular site you just link to:

http://www.vbulletinsetup.com/461-insert...-here.html

The forum ID actually doesn't matter here, you can replace it with 123456 so again, no point to put it in there in the first place.

(2011-01-05, 06:30 PM)Xplorer4x4 Wrote: [ -> ]Wouldnt it be easier on the server to just insert the thread ID to begin with rather then searching the thread titles table?

The threads table is never searched in that fashion. It does search the google_seo URLs table for duplicates, yes, however that only happens when a URL is created. So in terms of server load, this matters very little.

Of course, doing ID based URLs is just so much easier for the programmer. Most Forum SEO plugin use ID based URLs, not out of SEO considerations, but because it is the easy way out in the implementation logic (how hard the program is to write, not necessarily related to server load).

You're complaining to me because my plugin does not support that (IMHO horrible) vB URL style. I wonder if anyone ever complains to them that they don't offer the same nice ID free URLs Google SEO does for free. Sometimes I think it's the single most underappreciated feature of Google SEO. Sad However if you're absolutely set on IDs in URLs, there already is an option for that.

Quote:
		RewriteRule ^t-([0-9]+)\.html$ showt.php?tid=$1 [L,QSA]
And in the Admin CP I tried changing the thread setting to T-{url} and t-{url} as I would prefer a lower case t.

t-{url} would result in t-subject-goes-here as URL. However your rewrite rule only matches [0-9] and also has a \.html at the end so the scheme would've had to be t-{url}.html. You probably simply modified the wrong rewrite rule here? Also if you want old URLs be redirected, you must never edit old rewrite rules but instead add new ones (preferably without conflicts).

Either one should work as long as scheme, and rewrite rule, match together (see the plugins page, it'll complain about missing rewrite rules there). Also there must not be any other rewrite rule that matches the same pattern. So if you already have another rule that matches t-(.*) (for example) you'd have a conflict in rewrite rules.

Sorting out .htaccess and URL schemes to not cause any conflicts, is your responsibility. Google SEO has very limited ability to detect those issues by itself.

Quote:As for the other mod, do you know the name? I would like to see how much impact it has.

You mean MyBB SEO? It's been unmaintained and dead for >2 years and full of bugs. It's still available for download here in the mods database (MyBB 1.4 archive - not compatible with 1.6). Go for it if you like but you're beating a dead horse there.
(2011-01-05, 07:18 PM)frostschutz Wrote: [ -> ]You're complaining to me
First,foremost, and most importantly NEVER once did I complain. EVER. All I did was ask for information regarding customizing the URLs, making requests, and offering a suggestion to omit a query.

Quote:The forum ID actually doesn't matter here, you can replace it with 123456 so again, no point to put it in there in the first place.
Well this is beating a dead horse at this point. As I explained before, personally, I do feel it could help in terms of relevance sometimes. Obviously I am not alone as I am sure if I took the time I could find 100s, maybe thousands of vB forums using vB SEO with rewrite conditions including forum names in the URL. Keep in mind that even though you can omit the forum name, google is still going to index the forum name.

Quote:The threads table is never searched in that fashion. It does search the google_seo URLs table for duplicates, yes, however that only happens when a URL is created. So in terms of server load, this matters very little.
I suppose you are right on that thinking about it more in depth. However, it is still an extra query that could be avoided imo.

Quote:I wonder if anyone ever complains to them that they don't offer the same nice ID free URLs Google SEO does for free.
In all fairness, no it is not free,but they also offer alot a more advance piece of software then this. Thats not to say your work is bad, because it isn't. Also, I believe you can customize it to be ID free. Not 100% sure on that but I know for a fact that they have very very in depth options in regards to customizing various URLs.

Quote:You probably simply modified the wrong rewrite rule here?
Thanks, for pointing that out. I used a quick search and replace function in Notepad2 to modify the rules, and seems I over looked that.

In regards to MyBB SEO, thanks for the information. You didnt exactly specify it was fully of bugs and such. I wouldn't have asked if I knew that information.
(2011-01-02, 10:55 AM)BenOwns Wrote: [ -> ]i am having an issue
this is my

.htaccess
AddType x-mapp-php5 .php 
RewriteRule ^([^&]*)&(.*)$ http://blazingfire.com/forums/$1?$2 [L,QSA,R=301]
ErrorDocument 404 /forums/misc.php?google_seo_error=404
# EXAMPLE .htaccess FOR MYBB WITH GOOGLE SEO URL
# -------------------------------------------------------------------
# This file is identical to MyBB's htaccess.txt example file,
# with rewrite rules for a standard Google SEO install added.
#
# Before using this file please make sure to:
#
#   - replace /MyBB/ with your forum folder, e.g. / or /forum/
#   - replace yoursite/MyBB with your forum URL
#   - name the file '.htaccess' (starting with the dot, no .txt)
#
# Alternatively you can add the required rewrite rules to your
# existing .htaccess, the specific rules required will be displayed
# on the plugin status page once Google SEO URL is enabled.
# -------------------------------------------------------------------

Options -MultiViews +FollowSymlinks -Indexes

#
# If mod_security is enabled, attempt to disable it.
# - Note, this will work on the majority of hosts but on
#   MediaTemple, it is known to cause random Internal Server
#   errors. For MediaTemple, please remove the block below
#
<IfModule mod_security.c>
	# Turn off mod_security filtering.
	SecFilterEngine Off

	# The below probably isn't needed, but better safe than sorry.
	SecFilterScanPOST Off
</IfModule>

#
# MyBB "search engine friendly" URL rewrites
# - Note, for these to work with MyBB please make sure you have
#   the setting enabled in the Admin CP and you have this file
#   named .htaccess
#
<IfModule mod_rewrite.c>
	RewriteEngine on

	# Some hosts need a RewriteBase specification.
	RewriteBase /MyBB/

	# Google SEO workaround for search.php highlights:
	# Make this rule the first rewrite rule in your .htaccess!
	RewriteRule ^([^&]*)&(.*)$ http://yoursite/MyBB/$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 /MyBB/misc.php?google_seo_error=404

	# Default MyBB Rewrite Rules:
	RewriteRule ^forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]
	RewriteRule ^forum-([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA]

	RewriteRule ^thread-([0-9]+)\.html$ showthread.php?tid=$1 [L,QSA]
	RewriteRule ^thread-([0-9]+)-page-([0-9]+)\.html$ showthread.php?tid=$1&page=$2 [L,QSA]
	RewriteRule ^thread-([0-9]+)-lastpost\.html$ showthread.php?tid=$1&action=lastpost [L,QSA]
	RewriteRule ^thread-([0-9]+)-nextnewest\.html$ showthread.php?tid=$1&action=nextnewest [L,QSA]
	RewriteRule ^thread-([0-9]+)-nextoldest\.html$ showthread.php?tid=$1&action=nextoldest [L,QSA]
	RewriteRule ^thread-([0-9]+)-newpost\.html$ showthread.php?tid=$1&action=newpost [L,QSA]
	RewriteRule ^thread-([0-9]+)-post-([0-9]+)\.html$ showthread.php?tid=$1&pid=$2 [L,QSA]

	RewriteRule ^post-([0-9]+)\.html$ showthread.php?pid=$1 [L,QSA]

	RewriteRule ^announcement-([0-9]+)\.html$ announcements.php?aid=$1 [L,QSA]

	RewriteRule ^user-([0-9]+)\.html$ member.php?action=profile&uid=$1 [L,QSA]

	RewriteRule ^calendar-([0-9]+)\.html$ calendar.php?calendar=$1 [L,QSA]
	RewriteRule ^calendar-([0-9]+)-year-([0-9]+)\.html$ calendar.php?action=yearview&calendar=$1&year=$2 [L,QSA]
	RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
	RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4 [L,QSA]
	RewriteRule ^calendar-([0-9]+)-week-(n?[0-9]+)\.html$ calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]

	RewriteRule ^event-([0-9]+)\.html$ calendar.php?action=event&eid=$1 [L,QSA]

	<IfModule mod_env.c>
		SetEnv SEO_SUPPORT 1
	</IfModule>
</IfModule>

#
# If Apache is compiled with built in mod_deflade/GZIP support
# then GZIP Javascript, CSS, HTML and XML so they're sent to
# the client faster.
#
<IfModule mod_deflate.c>
	AddOutputFilterByType DEFLATE application/x-javascript text/css text/html text/xml
</IfModule>

But the links still are not working.

please let me know.

thank you!
just resharing
(2011-01-05, 09:26 PM)BenOwns Wrote: [ -> ]
(2011-01-02, 10:55 AM)BenOwns Wrote: [ -> ]
# EXAMPLE .htaccess FOR MYBB WITH GOOGLE SEO URL
# -------------------------------------------------------------------
# This file is identical to MyBB's htaccess.txt example file,
# with rewrite rules for a standard Google SEO install added.
#
# Before using this file please make sure to:
#
#   - replace /MyBB/ with your forum folder, e.g. / or /forum/
#   - replace yoursite/MyBB with your forum URL
#   - name the file '.htaccess' (starting with the dot, no .txt)
#
# Alternatively you can add the required rewrite rules to your
# existing .htaccess, the specific rules required will be displayed
# on the plugin status page once Google SEO URL is enabled.
# -------------------------------------------------------------------

Did you read and follow these instructions? Please clarify.
i will just call my self a DE DE DE and say thank you Big Grin
frost, I don't really care WHAT arguments you give me for what is better. That's YOUR opinion.

For aesthetic purposes, I prefer

mysite.com/forum/music/
mysite.com/forum/topic/the-beatles-reunite/

End of argument.
(2011-01-06, 08:37 PM)jmeeter Wrote: [ -> ]For aesthetic purposes, I prefer

mysite.com/forum/music/
mysite.com/forum/topic/the-beatles-reunite/

But THIS ist NOT possible because MyBB core isn't prepared to handle such links --> a lot of paths are relative in MyBB core.

With frotzschutz's plugin you get the best of what is possible with a plugin.