ElkArte Community

Project Support => Support => Topic started by: overscan on March 11, 2015, 04:24:57 am

Title: Adding Meta Tags (e.g. NoIndex) easily
Post by: overscan on March 11, 2015, 04:24:57 am
So - Google found my test Elkarte forum. It is now presenting it in Google searches instead of current SMF forum. Good for Elkarte, but this is a problem to me until migration :)

I've solved using .htaccess to add noindex headers in Apache, but I wonder if  way to enter meta tags or even a tickbox to say "stop search engines indexing my site" might not be useful. I an sure certain types of forums would benefit from this :)
Title: Re: Adding Meta Tags (e.g. NoIndex) easily
Post by: emanuele on March 11, 2015, 11:54:56 am
Google is damn good at finding things it should not find. ROFL
I think I had a similar problem a while ago... LOL

An addon for that would be dead easy to write.
If this evening I'm not dead I can try. ;)
Title: Re: Adding Meta Tags (e.g. NoIndex) easily
Post by: emanuele on March 11, 2015, 05:34:39 pm
Attached the files, and the two hooks are:
Code: [Select]
<?php
$hooks = array(
array(
'integrate_load_theme',
'Noindex_Integrate::load_theme',
'SOURCEDIR/Noindex.integrate.php',
),
array(
'integrate_general_mod_settings',
'Noindex_Integrate::general_mod_settings',
'SOURCEDIR/Noindex.integrate.php',
),
);
foreach ($hooks as $hook)
add_integration_function($hook[0], $hook[1], $hook[2]);