Results 1 to 6 of 6

Thread: [addon] Google Sitemap Generator

  1. #1
    Join Date
    Feb 2008
    Location
    Greece
    Posts
    235

    Default [addon] Google Sitemap Generator

    I have managed to put together a very simple sitemap Generator for a vShare-Powered Web Site.

    What it does:

    This Script will include in the sitemap all your ACTIVE and APPROVED Videos. (I didn't mind hiding "private" videos at the moment, because I won't be using them)

    It has been tested on two Websites (vShare 2.4 Installed) and so far it is working great. Many Videos are being indexed by Search Engines.

    You just need to

    1) Copy the following lines of code in a new page called "sitemap.php" (or whatever you like).

    2) Edit your Database connection details and YOUR SITE NAME in the Code.

    3) Then Upload the php page to your Website Root and feed it into Google, Yahoo and so on...

    Here's the code for you to grab:

    Code:
     <?php
        echo "<?xml version='1.0' encoding='iso-8859-1'?>";
        echo "<urlset xmlns='http://www.google.com/schemas/sitemap/0.84'>";
    
        //BEGIN EDIT - You will need to edit these details to reflect your own configuration
        // hostname on which MySQL is (usally localhost)
        $dbhost = "localhost";
        // Database name
        $dbname = "put_your_database_here";
        // Username
        $dbuser = "put_your_username_here";
        // Password
        $dbpass = "put_your_password_here";
        //END EDIT
    
        // mysql_connect() fnction
        $conn = mysql_connect($dbhost,$dbuser,$dbpass)
        or die("Unable to connect to MySQL.");
    
        // mysql_select_db() function
        mysql_select_db($dbname,$conn)
        or die("Unable to connect to Database $dbname");
    
        $sql = "Select  VID, title, adddate from video where approve=1 and active=1";
    
        // execute SQL Command
        $res = mysql_query($sql,$conn)
        or die( "Error: " . mysql_error() );
    
        // Retrieve Results
        while ($info = mysql_fetch_row($res)) {
        $SefUrl=strtolower(preg_replace("/[^a-zA-Z0-9]+/","-", $info[1]));
    
    
        //EDIT YOUR SITE NAME
        echo "<url><loc>http:/WWW.YOURSITE.COM/view/".$info[0]."/".$SefUrl.
        "/</loc><lastmod>".$info[2]."</lastmod><priority>1</priority></url>";
    
        }  
        echo "</urlset>";
    
        // mysql_close() function
        mysql_close($conn);
        ?>

  2. #2
    Join Date
    Sep 2007
    Posts
    8

    Default Re: [addon] Google Sitemap Generator

    hi your url code is not working i changed it to my own url but when google lists the urls none of them work and google just comes up with errors it should look like this http://www.worldsexmovietube.net/vie...ing-threesome/ but when google finds the urls they come up like this http://www.worldsexmovietube.net/vie...ing-threesome/ if you notice the /2238/ is not showing up so google counts it as an invalid link

  3. #3
    Join Date
    Feb 2008
    Location
    Greece
    Posts
    235

    Default Re: [addon] Google Sitemap Generator

    Yes i have those problems. I will fix this when i will have time. :(

  4. #4
    Join Date
    May 2007
    Posts
    394

    Default Re: [addon] Google Sitemap Generator

    Quote Originally Posted by worldsex
    hi your url code is not working i changed it to my own url but when google lists the urls none of them work and google just comes up with errors it should look like this http://www.worldsexmovietube.net/vie...ing-threesome/ but when google finds the urls they come up like this http://www.worldsexmovietube.net/vie...ing-threesome/ if you notice the /2238/ is not showing up so google counts it as an invalid link
    Chubby mature hoes pusshy shagging threesomes?

    That's quite a narrow niche....

  5. #5
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: [addon] Google Sitemap Generator

    :shock:

    Would google even actually index that?
    If it's not fun, stop doing it!

  6. #6
    Join Date
    Sep 2008
    Posts
    1,019

    Default Re: [addon] Google Sitemap Generator

    Quote Originally Posted by grynmoors
    Would google even actually index that?
    Yes. Google allows for adult sitemaps. You do, however, have to specify that the content is adult (it's one of the tags). Otherwise, it will not take it.
    vShare Solutions
    Custom vShare Modules and Services

    Now, your visitors can watch videos on your site using their mobile or tablet device with the Mobility Mod for vShare 2.8!

Similar Threads

  1. Google Sitemap v2.7
    By RAMMSTEIN in forum vShare Modifications
    Replies: 57
    Last Post: 11-12-2010, 12:56 AM
  2. [addon] Video Sitemap for VShare
    By RAMMSTEIN in forum Template Modifications
    Replies: 2
    Last Post: 01-08-2009, 01:02 AM
  3. Google Video Sitemap
    By CliftonH in forum Web Site Promotion
    Replies: 6
    Last Post: 08-10-2008, 10:20 PM
  4. New Google video sitemap !!!
    By chadon in forum Feature Requests
    Replies: 2
    Last Post: 12-21-2007, 06:48 PM
  5. Sitemap Generator for vShare
    By autodafe in forum General Discussions
    Replies: 14
    Last Post: 10-24-2007, 03:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •