Skip to main content
Topic: Adding Meta Tags (e.g. NoIndex) easily (Read 2238 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Adding Meta Tags (e.g. NoIndex) easily

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 :)

Re: Adding Meta Tags (e.g. NoIndex) easily

Reply #1

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. ;)
Bugs creator.
Features destroyer.
Template killer.

Re: Adding Meta Tags (e.g. NoIndex) easily

Reply #2

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]);