Giter Site home page Giter Site logo

mybb-google-seo's People

Contributors

borekon avatar frostschutz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mybb-google-seo's Issues

Going to a deleted/nonexistent thread generates a permission error

I just got this report from a user who was subscribed to a forum, got an e-mail notification of a new thread, but by the time they click on the the link, the OP deleted the thread. My user was confused because the error message kept mentioning permissions, and the user is a moderator.

Here's a live example from a random MyBB instance that uses Google SEO:
http://www.pavementsucks.com/board/thread-that-doesnt-exist

I've just hacked my messages.lang.php and now the error mentions the thread being deleted as the most probable cause:
http://forum.quantifiedself.com/thread-that-doesnt-exist

There must be better solutions, though, perhaps identifying if the URL starts with the thread prefix and issuing an error that "The specified thread does not exist", like here: http://community.mybb.com/thread-999999.html

lastposter SQL error

MyBB's parameter cleaning code does not clean int parameters if the value is "lastposter". This causes SQL errors. (will be fixed in the next version)

meta noindex,nofollow

A forum may have content in subforums that is readable by guests, but shouldn't appear on search engines anyway (for privacy reasons or whatever). Provide the option to remove those forums from search engines effectively by adding a meta norobots tag, and excluding those threads and forums from the sitemap regardless of user permissions.

404 relative links

for site/foo/bar/baz/ the 404 page may include missing images due to relative links in the users theme

as there is no other solution, add a <base> tag to the header

meta noindex non-canonicals

Add a noindex tag to pages that are not canonical as an additional hint to google that it should not index anything that is not its canonical name. Some research is necessary as to whether that would actually be useful. In theory the canonical tag alone should be sufficient.

Redirect and %-escapes

http://community.mybb.com/thread-101158.html

Workaround is put into place easily enough, however this reveals a deeper issue; Redirect is making assumptions about how URLs are encoded which may or may not be actually true. For a technically proper solution we have to parse and decode everything, compare, and if it differs, re-encode everything anew to make the redirect.

cheaper sitemap pagination

Currently the sitemap pagination can be expensive for forums with >100k threads. This is because it uses one query per page, trying to achieve exact pagination (1000 threads per page).

It's possible to go with a less accurate approach (not 1000 threads but 1000 thread ids per page, leaving out deleted/missing threads), as this requires only a single query to build the main index by using GROUP BY floor(tid/pagination). Even for large tables this seems less expensive than extensive sorting / limiting queries.

Downside is that it would lead to lots of nearly empty sitemap pages for forums that had lots of threads deleted or in inaccessible sections, and also more timestamp noise if we sort by id rather than date. E.g. the MyBB community forums (if they were to use this sitemap) would see 113 pages for threads with the new method when there's actually just 95 pages with the old method. However building the sitemap index would use just one query instead of 95...

So the cheaper sitemap wins in terms of performance but the old method is more accurate... but since Google doesn't care about the number of sitemap pages (as long as there arent completely empty ones) we should go with the cheaper approach

redirect loop with nginx, highlights

MyBB's issue with wrong ?& in the URL, combined with nginx, combined with a highlight=word+word, leads to a redirect loop.

MyBB produces an URL like http://site&highlight=word+word without ? (workaround: enable MyBB SEF URL setting if possible)

nginx redirects it to http://site?highlight=word%2Bword (Apache does word+word or word%20word). [Is it nginx or apache misbehaving here?]

Google SEO Redirect sees word%2Bword which should be treated as word+word however it's treated as 'word word'. So Redirect is decoding the parameter twice.

The final redirect result however is word+word anyway so it redirects to word%2Bword (word+word) and doesn't notice that's already the correct location because it thinks it should be word+word (word word).

Redirect behaviour obiously needs to be fixed. Not sure what we can do about nginx behaviour.

meta for printthread

not everyone disallows printthread.php, and since it's duplicate content, canonical should cover it. Especially in MyBB 1.6 where printthread.php is paginated.

Hidden Forums

Hi Andreas, the hidden forums are also displayed in the Sitemap-Index.xml. Is there a way to disable this by default?

Error in inc/plugins/google_seo/redirect.php

For the first time in ~4 years, I just got this email notification from my MyBB instance, I assume as a result of a penetration attempt:

Your copy of MyBB running on ... has experienced an error. Details of the error include:

---
Type: 2
File: inc/plugins/google_seo/redirect.php (Line no. 367)
Message
urlencode() expects parameter 1 to be string, array given

The instance was using Google SEO 1.6.5, admittedly old.

search highlight breaks in some cases

search highlight links are broken for searches that contain / (fixing this would require changes to MyBB code. workaround: set MyBB SEF URLs to 'yes')

nofollow links

  • nofollow some internal links (google seo does not really do stuff you can do in templates at this point - also depends on individual themes so no general purpose solution can be made. plus it's not important, as robots.txt >> nofollow anyways)
  • nofollow all posted links (there's another plugin: http://community.mybboard.net/thread-54469.html - see also my comments there)

Ping Sitemap to Google and Bing

You can add a button to ping Sitemap to Google and Bing?

It would be great to add the button in the templates administrators.

MyBB's word wrap breaks Google SEO links

The word wrap feature of MyBB can break links that are part of a posting message. This includes backlinks that are contained in quotes. Especially forums that use foreign character sets will be affected by this, because their thread subjects will not be words but for example long list of kanji without spacing, which is where the word wrap will jump in.

This is a bug in MyBB so it won't / can't be fixed in Google SEO.

Possible workarounds:

  • disable wordwrap
  • set wordwrap to a sufficiently large value (depends on your thread subjects)
  • modify inc/functions.php::my_wordwrap() to add % to the list of ignored characters

Possible fixes:

  • make wordwrap ignore html tags

https redirect

currently the redirect forces users to (not) use https depending on the bburl setting

there should be a setting to make it ignore https status so users can choose themselves whether they want to use https or not.

redirect: preserve page=last somehow

Although not used, showthread.php?tid=x&page=last is still a core feature and as such, should be supported.

Redirect int casts various parameters because MyBB doesn't do it, and because invalid characters can cause errors in HTTP headers. And the case where a string is actually interpreted as an int because it starts with int (page=123xyz) should still be properly redirected.

404 disabled - unknown location

If someone added the ErrorDocument 404 directive to their .htaccess, and then disabled Google SEO 404 without removing it, all 404 pages will go to an empty white misc.php page, and even worse, also end up in the who is online list as unknown location.

Technically this is not the fault of the plugin but a user error. The user should not put the ErrorDocument directive in his .htaccess if he does not intend to use it. However, it would not hurt to add a warning to the plugin status, telling the user he should remove this directive when Google SEO 404 is disabled.

limit number of URLs created per request

In very large forums, when first enabling Google SEO URL, a single request may cause thousands of SEO URLs to be initially created (e.g. large index page with links to hundreds of forums threads and user profiles). There should be a limit imposed to avoid load spikes and sluggishness of the forum shortly after enabling the plugin for the first time.

redirect can't deal with some requests

strange requests like ?cfg[rootpath]=foobar cause warnings with Redirect and the [rootpath]=foobar is lost (won't fix stupid PHP)

same applies for strange characters in requests, which are filtered by PHP

fixing this would require writing our own parameter parser instead using the one provided by PHP

develop a better url caching mechanism

Currently, with third party plugins creating lots of links, it's possible for Google SEO to require hundreds of SQL queries during a single page load. With a smarter caching system, these could be avoided. The problem is making it smarter without breaking anything.

For example, instead of real URLs, placeholders could be returned and then replaced before the output is sent to the client. However this would break cases where the returned URL is not output to the user but something else is done with it instead (such as a mail sent to the user).

Alternatively, we could listen in on database queries and cache any IDs returned in them. However while this would reduce queries by Google SEO, it would make all other queries more expensive because the results would be looped over twice instead of once then.

Alternatively, we could unconditionally cache URLs. Like all forums, and all most active users, and all recent threads. However this would mean that a lot of URLs would be computed in every request, whether or not they are actually required. While this would reduce number of queries on high load pages, it would increase load on all other pages that don't need those URLs.

Yet another approach would be to count on cooperation from the third party, i.e. the third party notifying us which URLs it is going to need before it actually fetches those URLs. This is what Google SEO Sitemap currently does. However this would mean that other plugins have to be modified for the sake of Google SEO.

sitemap: x-robots-tag

Prevent search engines from showing the XML Sitemap itself in search results, using the X-Robots-Tag: noindex header.

redirects within directory structure

Hello,

The plugin works fine, except the links to "recent posts" generate a link that ends with "?action=lastpost" that redirects (example) =>

HTML link = www.poney-team.fr/sujet/21-joueurs-les-commandes-utiles-en-jeu?action=lastpost

Redirects to : http://www.poney-team.fr/sujet/sujet/21-joueurs-les-commandes-utiles-en-jeu?pid=48#pid48

Problem => /sujet/sujet/

Site : www.poney-team.fr
MyBB : 1.6.9
Google SEO : 1.6.5
PluginLibrary : 11
Server : lighttpd on centos

Sorry for my english.

plugin status: file verification / warning

The plugin status could verify the plugin's files (just inc/plugins/google_seo**). Apparently there is a chance that someone will only upload one or two files but not all which in turn leads to funny issues as the plugin can't detect such a "mixed setup" yet.

url at end of links

I'm trying to figure out why google keeps putting the website name at the end of each link. Its driving me nuts. lol

So like title whatever topic - example.com

Is there a setting for this?

Noidex Forum malfunctioning

The first id Noindex Forums not work without a comma.

example:
1,23,54
id forum 1 not work

,1,23,54
all work

Sitemap without mod_rewrite

It's possible to use the Sitemap without mod_rewrite by setting the Sitemap URL scheme to empty string. However this behaviour is not intiutive, not clearly documented and if you actually do it, the plugin status tells people to add RewriteRule ^$ to their .htaccess which of course is total mumpitz. So the plugin status has to be made aware of this case and the documentation should be improved.

search.php doesn't highlight more than one word

I'm using Google SEO with MyBB 1.6.3 on nginx.

If I understand correctly, this rule needs to be added to the .conf file because otherwise, search.php is appended an ampersand instead of the question mark:

# Google SEO workaround for search.php highlights:
# Make this rule the first rewrite rule in your .htaccess!
rewrite ^/([^&]*)&(.*)$ http://forum.quantifiedself.com/$1?$2 permanent;

The problem I see on my board is that the whole query string gets URL-encoded, including the plus sign between keywords to be highlighted. This causes the highlight to not work.

Example on my board: search.php generates a list of threads or posts with URLs that are incorrect, i.e. have the ampersand:

http://forum.quantifiedself.com/thread-measuring-cognitive-performance&highlight=reaction+time

Then these get rewritten to replace the '&' with '?'. In the process, the + gets URL-encoded to %2B:

http://forum.quantifiedself.com/thread-measuring-cognitive-performance?highlight=reaction%2btime

PS: All I could find relevant to this issue in the enormous thread on community.mybb.com was this post.

use str_replace instead of eval

Currently, eval is used to expand some of the variables in setting strings. Since the number of useful variables is limited, str_replace should be used instead, since eval also allows execution of other code. For someone with admin priviledges this can be an issue.

more powerful URL handling

URL handling should be more powerful. Instead of generating one unique URL that has one column in the database, it should be made up of components such as name, directory, uniquifier, and these components should then be accessible from the URL scheme. Also, the possibility of scheme sharing should be looked into.

calendar action=weekview week not numeric

inc/plugins/google_seo/redirect.php

                    $target = get_calendar_week_link((int)$mybb->input['calendar'],
                                                     (int)$mybb->input['week']);

This code casts $mybb->input['week'] to an integer. However MyBB uses it as string for supporting weeks before 1970 (number prefixed with a n).

old links

some links keep using the old URL scheme, because MyBB is not using its own get_*_link() functions everywhere (fixing this would require changes to MyBB code)

automatically ping sitemap to google

Some users have trouble locating their sitemap or understanding how they can let search engines know about their sitemap. At the same time, Google (and some other search engines) offer a direct and anonymous sitemap pinging service.

If the hosts PHP installation allows contacting remote hosts via the http protocol this could be used to make such a ping request, automatically telling the search engine that the sitemap is available, once the plugin is installed and the sitemap feature enabled.

The same method could also be used to resubmit sitemaps, telling Google if it was updated (because a new post was made). To avoid spamming the ping service, the setting should be restricted to ping no more than once every X minutes, X being a setting.

unexpected get_calendar_permissions() return value

If all calendars of a forum are deleted, get_calendar_permissions() returns a flat structure of user permissions, instead of the expected array(cid => permissions). Normally this does not cause a problem as the later permission check subsequently fails, but there was at least one case where the permission names made their way into the query (instead of the cid). So we have to add a check that cid is actually an int at this point, since get_calendar_permissions() can give an unexpected return value where this is not the case...

workaround:
in the sitemap settings, set calendar and events to no

plugin status unreadable in RTL

Some language use right-to-left instead of left-to-right direction for text. In such an environment, the plugin status, especially code to be added, is moved to the right, while punctuation remains on the left. The result is broken instructions as to which edits to make.

I am unsure as to whether or how this should be fixed by this plugin. Also I have no means of testing if my changes would make any difference.

New Reply Notification Breaks

Hello,

Earlier today a member of my forum notified me that the "from" field of a notification email was broken. After doing some research into the issue, I found many other posts regarding the very same issue left unanswered. The common theme appears to be the Google SEO Plugin we all have enabled. When we disable all plugins, the problem is instantly solved.

Here's a screenshot of the problem:
http://screensnapr.com/v/ZBuM8N.jpg

*Please note that the one where it is working fine was the test with plugins disabled. Also note that email notifications remain completely unaffected.

Here is a link to one such topic that was left unanswered, but reinforces that this is indeed a problem:
http://community.mybb.com/archive/index.php/thread-106145-1.html

I did notice a strange occurrence in the email source as documented below: (the top one is from the test with plugins disabled, the bottom sent normally)
http://screensnapr.com/v/xLKAwI.jpg

Any help at all on this issue would be fantastic.

Thanks.

Sitemap should respect timezone

Currently, timestamps in the sitemap use Z. This isn't a problem if the timestamp is to be used only for seeing if there was any change compared to another version, however it doesn't reflect the actual local time of the forum.

Instead of Z, it should be using the default timezone set in the forum configuration, or better yet, the timezone of the current user, which for guests would be the default timezone, but it would allow for making a special account for a bot and giving them a different timezone.

special character domain tld

Currently, Google SEO supports UTF-8 in its own URLs, however if the domain itself contains special characters, Google SEO Redirect will mess up unless the bburl is set to the ASCII normal form (xn--foobar-n4a etc.).

Support for this should really be in MyBB itself (already rejected) but I guess we could parse the bburl and at least handle it somewhat gracefully, or if that is too much effort, at the very least display a warning on the plugin status page so the board admin can set the ascii form as bburl directly, thereby working around the issue (with the minor downside of mails looking crappy).

page breaks sitemap

if any other plugin feels responsible for the page parameter on misc.php, it may break the sitemap which uses misc.php?google_seo_sitemap=xyz&page=123 style URLs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.