Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
simple google and yahoo site verification plugins
#1
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...
Reply
#2
Thanks Onur
Reply
#3
it doesn't work. when i copy it to the plugins folder nothing loads in getsimple, all the pages are blank
Reply
#4
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
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#5
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
Reply




Users browsing this thread: 1 Guest(s)