GetSimple Support Forum
simple google and yahoo site verification plugins - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: simple google and yahoo site verification plugins (/showthread.php?tid=591)



simple google and yahoo site verification plugins - uguronur - 2010-03-28

Hi,

This plugin allows you to enter your google-site-verification number and yahoo-site-verification number will automatically add the google and yahoo site-verification code to the header of your all pages, just before the </head> tag.

important:
Please enter the code just to sample like this....
<meta name="google-site-verification" content="xxxxxx---this character only---xxxx" />
<META name="y_key" content="<i>xxxxx---this character only---xxxxx</i>"/>

and also I tested it is works very good...


simple google and yahoo site verification plugins - Johonwayni - 2010-09-14

Thanks Onur


simple google and yahoo site verification plugins - enliven - 2011-10-02

it doesn't work. when i copy it to the plugins folder nothing loads in getsimple, all the pages are blank


simple google and yahoo site verification plugins - Connie - 2011-10-02

Are you sure, you copied the plugins in the correct way?

Mostly. plugins have one php-file which belongs into the plugins-folder and sometimes a subfolder

so be sure you uploaded in the correct directory level, this error happens very often


simple google and yahoo site verification plugins - enliven - 2011-10-03

Nope. Still can't get it to work.
But in the meantime I wrote this.
Others might not like the messy touch and file_get_contents business but i'm very new to xml and haven't learned how to it with getsimple plugins yet
In the meantime, the works fine for me.
Use and share if you want

Code:
<?php
$thisfile=basename(__FILE__, ".php");
register_plugin(
    $thisfile,
    'Google Verification',
    '',
    '',
    '',
    '',
    'plugins',
    'veri_admin'
);
add_action('theme-header','google_verification');
add_action('plugins-sidebar','createSideMenu',array($thisfile,'Google Verification'));
function google_verification() {
    if (file_exists("./data/other/google-veri.cfg")) {
        if (file_get_contents("./data/other/google-veri.cfg") != "") {
            echo '<meta name="google-site-verification" content="'.file_get_contents("./data/other/google-veri.cfg").'" />'."\n"; }}}
function veri_admin() {
    if (!file_exists("../data")) { echo "Sorry, I couldn't find your /data directory"; }
    else if (!file_exists("../data/other")) { echo "Sorry, I couldn't find your /data/other directory"; }
    else if (!file_exists("../data/other/google-veri.cfg")) { touch("../data/other/google-veri.cfg"); }
    if (file_exists("../data/other/google-veri.cfg")) {
        if (isset($_POST['save_veri'])) {
            if (!file_put_contents("../data/other/google-veri.cfg",$_POST['veri_code'])) {
                $open = fopen("../data/other/google-veri.cfg","w");
                fwrite($open,$_POST['veri_code']);
                fclose($open); }}
    ?>
<form method='post' action='load.php?id=verification'>
If you don't use Google Verification (such as via Webmaster Tools) leave<br>
the field blank. Otherwise enter the content component of the meta tag as<br>
it appears in the details instructed to you Google Webmaster Tools<br><br>
<span style='color: #666666;'><i>&lt;meta name=&quot;google-site-verification&quot; content=&quot;&nbsp;</i></span>
<input type='text' name='veri_code' value='<?php echo file_get_contents("../data/other/google-veri.cfg"); ?>'>
<span style='color: #666666;'><i>&nbsp;&quot; /&gt;</i></span><br><br>
<input type='submit' name='save_veri' value='Update Details'>
</form>
<?php } else {
    echo "Sorry, I failed to create the google-veri.cfg config file.<br>
        Make sure you hae write permissions on the data directories."; }} ?>

PS: I marked the code as CODE, so it will be better to identify, Connie