Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automatic ping to search engines
#1
I like the new automatic sitemap generation (though it'd be nice being able to disable it, via gsconfig or setting), but I honestly think that pinging SEs by default is not a good idea. I didn't know about this new feature, and found that one of my 3.1 test sites was quickly indexed by Google.

Not a problem for me, I will just delete my site, but If you are developing a new site for a client or just trying GS, and forget to (or don't know you have to) enable GSDONOTPING, it will probably be involuntarily indexed.
Reply
#2
I think I agree with you. before since you actually had to manually generate your sitemap, it was known that you were pinging search engines. now that it's automatic, I am changing gsconfig to turn it off by default.

Thanks Carlos!
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#3
maybe that could become a setting in the "general settings section" and maybe the names of the search engines could be listed ... in a future version of GS ;=)
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#4
Thanks for the heads up, Carlos and Chris for not activating the auto ping after installation!
Reply
#5
Like Connie, I think it would be great to have this in backend settings. Some checkbox(es), like:

Code:
[ ] Ping search engines when site updated

or even greater:

Code:
[x] Generate sitemap when site updated
[ ] Ping search engines automatically

The second checkbox could be hidden if the first is unchecked.

But anyway this could be left for GS 3.2 (or 3.1.1...)
Reply
#6
i agree... lets put that on the roadmap for 3.2
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#7
Added this to the issue tracker
My Github Repos: Github
Website: DigiMute
Reply
#8
(Besides what I suggested in post 5 in this thread)

- I'd suggest to be able to disable the sitemap generation with a new gsconfig setting, e.g. GSNOSITEMAP

- Another possibility is stuffing all the sitemap code into a plugin, to be bundled with GS, so if you don't need it you just disable or remove the plugin.

Either of those would also let other plugins -like I18N- generate their own special sitemap, or allow creation of custom sitemap plugins...
Reply
#9
i dont see why you don't want the sitemap to be generated? If you dont use it, then dont use it... the generation (once the code is fixed to not recreate it once per file) doesnt take very much overhead.
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#10
ccagle8 Wrote:i dont see why you don't want the sitemap to be generated? If you dont use it, then dont use it... the generation (once the code is fixed to not recreate it once per file) doesnt take very much overhead.

Sorry, I have to disagree with you. Even with that code fixed (and even making it use internal page caching instead of reading all xml files), it's not only that small overhead, but also doing an unnecessary file write to disk.

But anyway, let's leave this aside for a moment: What about my last paragraph? (custom sitemap plugins, etc.)
Reply
#11
I'll add here other things I've noticed with sitemap generation:
  • the sitemap actions are useless (see here)
  • action changedata-aftersave is executed BEFORE generate_sitemap, page-delete AFTER generate_sitemap
  • there is no action when restoring backed up pages - it would be needed to generate custom sitemaps.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#12
@Carlos: I18N now generates a sitemap (in most cases), see here.

@ccagle8, n00dles101: it's easy in 3.0 (just change the link of the "Generate Sitemap" menu), but nearly impossible in 3.1: e.g.
  • for page save I use the changedata-aftersave action, generate the sitemap, do the same as in changedata.php, but without calling generate_sitemap and die.
  • for page delete and save settings, I regenerate the sitemap correctly afterwards on an action hook
  • for restoring a page there is no hook - I can't generate the correct sitemap in that case.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#13
@ccagle & all

I'd like to add another possibility to those two I suggested in post 8 (this thread):

- Add a hook or filter at the beginning of function generate_sitemap(), that returns without generating the sitemap if some condition is met.

For example:

Code:
function generate_sitemap() {
    global $nositemap;
    $nositemap = FALSE;
    exec_action('before-sitemap'); // a plugin could set $nositemap to TRUE here
    if ($nositemap) return TRUE;
    
    // ... GS code for generating the sitemap

(Possibly there's a better way to do this...)

(Edit: typo fix)
Reply
#14
mvlcek Wrote:for page save I use the changedata-aftersave action, generate the sitemap, do the same as in changedata.php, but without calling generate_sitemap and die.
Clever way of patching without changing the core! :-)

But replacing/customizing/removing the sitemap it shouldn't be so complicated...
Reply
#15
More or less the same as in post #13, but using a new filter (instead of an action):

Code:
function generate_sitemap() {
    $nositemap = exec_filter('replace-sitemap',FALSE); // a plugin could return TRUE here
    if ($nositemap) return TRUE;
    
    // ... GS code for generating the sitemap

Opinions? Better than a GSNOSITEMAP gsconfig setting as I also suggested?
Reply
#16
Carlos Wrote:More or less the same as in post #13, but using a new filter (instead of an action):

Code:
function generate_sitemap() {
    $nositemap = exec_filter('replace-sitemap',FALSE); // a plugin could return TRUE here
    if ($nositemap) return TRUE;
    
    // ... GS code for generating the sitemap

Opinions? Better than a GSNOSITEMAP gsconfig setting as I also suggested?


Instead of all that, maybe just use a global for the sitemap itself (xml or array or object), before creating it, call the hook, if after the hook the global is no longer empty then something already made a sitemap for us so we exit.

Also i think exec_action uses call_user_func which is anonymous and will never get the return value, actually since exec action loops its not possible to even have a return, or else it would break the loop.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#17
shawn_a Wrote:Instead of all that, maybe just use a global for the sitemap itself (xml or array or object), before creating it, call the hook, if after the hook the global is no longer empty then something already made a sitemap for us so we exit.

Yes, that's another possibility. A 'replace-sitemap' hook or filter.

I've sometimes thought about that, I intended to suggest someday a new type of hook/filter, not only for this sitemap thing, but for template tags like get_navigation, get_page_title, get_content, etc. Something like 'replace-navigation', 'replace-content', etc. GS would check if, after being executed, the corresponding global variable has some value, then stop if it has. This way plugins could customize those tags' outputs without needing to change anything in a typical default template (to make all this easier)
Reply
#18
Since GS 3.3.0 there is a 'sitemap' filter.
Reply
#19
Why don't like auto pinging google when new post created?
Reply




Users browsing this thread: 1 Guest(s)