Bookmarkinng Javascript solution

When you need this you can get it from me. On IuliuManiu.ro I implement on my own simple bookmarking solution that includes some social networks very used - faceboog, delicios, digg, twitter, reddit. What is nice on my bookmaring solution it is 100% customizable, it is javascript that means 100% controls when is about the behaviour of a click there and you can mask anything there (see my LinkExchange link in the bookmarking solution and my YouTube link); Also, because I have such a good control, I place there and the link that before was "powered by ...."  or "developed by..." [last link, after that space].

In this picture you can see some links on "follow us" section, after that my bookmarking solution and in the end "powered by pan-internet".

 

Bookmarking from pan-internet

For more informations, the code is here! And if you need help, let my know.


Posted by: admin
Posted on: 2/9/2010 at 2:52 AM
Tags: , , , ,
Categories: blog | Code | Community | network | SEO | WWW
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

XML+XSLT = a beatifull couple that results in HTML; the core of PABA

PABA is composed by a database with our links. The problem is that on each site I have to include this links in a order that is specifically for that site (for example when is about a an auto site 1st links should be the links from the category auto and after that other categories links). Ok. In my database I have specified and the order of the links foreach category - something like categoryid - outputcategoryid (this is specifically to the site where the links will apear) - rank. This work is for SEO Cool and I hope that it will work.

So...how do I proceed: foreach category I generate an XML file (in this moment there are 10 categories); I have only one XSLT file. I know that in XSLT I can order (I didn't do this never because it wasn't necesary but is okay this option); anyway, each XML file contains the categories in a order specified in the database after the site category where the links will apear (in this way the xslt transformation will work faster). Using server technologies (ASP or PHP) I generate from this 2 files the html code. Here is the input:

 

XML:

<?xml version="1.0" encoding="utf-8"?>
<Feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Sections>
    <Section>
      <rank>1</rank>
      <id>2</id>
      <name>Internet</name>
      <name_cover>hnc</name_cover>
      <picture />
      <description>hd</description>
      <Links>
        <Link>
          <url>http://www.pan-internet.com/</url>
          <description>Internet Software services: ip to geolocation, proxy, internet speed test</description>
          <title>Internet Services</title>
          <title_cover>Internet Services Everything about the internet</title_cover>
          <image>http://www.pan-internet.com/ui/www.pan-internet.com.png</image>
          <modify>8/25/2009 10:41:03 PM</modify>
          <idsection>2</idsection>
          <id>2</id>
        </Link>
        <Link>
          <url>http://paba.pan-internet.com/</url>
          <description>Paba Network - Th best what you can get from the Internet</description>
          <title>Paba Network </title>
          <title_cover>Paba Network - Internet Networks</title_cover>
          <image>http://paba.pan-internet.com/pictures/internet.png</image>
          <modify>8/26/2009 6:19:01 AM</modify>
          <idsection>2</idsection>
          <id>7</id>
        </Link>
        <Link>
          <url>http://www.testnetspeed.net</url>
          <description>Test your Internet connection bandwidth to locations around the world with this interactive broadband speed test</description>
          <title>Global Broadband Speed Test</title>
          <title_cover>Global Broadband Speed Test</title_cover>
          <image />
          <modify>8/28/2009 3:43:19 PM</modify>
          <idsection>2</idsection>
          <id>16</id>
        </Link>
      </Links>
    </Section>
    <Section>
      <rank>1</rank>
      <id>4</id>
      <name>History/Culture/Religion</name>
      <name_cover>hnc</name_cover>
      <picture />
      <description>hd</description>
      <Links>
        <Link>
          <url>http://www.iuliumaniu.ro/</url>
          <description>Site dedicat memoriei lui Iuliu Maniu, sustinut de Biserica Greco-Catolica din Badacin, satul natal al lui Iuliu Maniu </description>
          <title>Iuliu Maniu, Badacinul </title>
          <title_cover>Iuliu Maniu si Badacinul </title_cover>
          <image>http://www.iuliumaniu.ro/pictures/banner.png</image>
          <modify>8/25/2009 11:35:38 PM</modify>
          <idsection>4</idsection>
          <id>3</id>
        </Link>
        <Link>
          <url>http://www.proverbs.iuliumaniu.ro/</url>
          <description>Proverbs, the ideea that was on this site startup is coming to help each of us with our (gran...gran-...)parents wisdom. All of us hear about chinese proverbs, indian proverbs, latin proverbs english proverbs; somehow proverbs meas a part of our live, our evolution; that is because we learn from proverbs, we evoluate thanks to th proverbs.! This is a new option on our site, to see quotes. How many time you see people that are invoking somebody else for a better understanding of his message? They use quotes. From Bible to Marilyn Manson, from Abraham Lincoln to Osama bin Laden, people invoke celebrities. The ideea behind a wuote is that you can use it, is free; the quote is somehow a representitive of the quoted men; Good or bad, They are the people that represents us; we just invoke him using the quotes!</description>
          <title>Proverbs &amp; Quotes</title>
          <title_cover>Proverbs, languages, regions, countries, free, reviews, rating</title_cover>
          <image />
          <modify>8/25/2009 11:37:12 PM</modify>
          <idsection>4</idsection>
          <id>4</id>
        </Link>
        <Link>
          <url>http://www.floridecrin.iuliumaniu.ro/</url>
          <description>Flori de Crin - revista de spiritualitate creştină editată de Vicariatul Silvaniei. Apare trimestrial ca supliment a revistei eparhiale Vestitorul</description>
          <title>Flori de Crin</title>
          <title_cover>Revista Flori De Crin</title_cover>
          <image>http://www.floridecrin.iuliumaniu.ro/pictures/crin_imperial.jpg</image>
          <modify>8/26/2009 6:15:19 AM</modify>
          <idsection>4</idsection>
          <id>5</id>
        </Link>
        <Link>
          <url>http://www.blog.iuliumaniu.ro/</url>
          <description>Iuliu Maniu, Bădăcin "… Pe mine nu reuşesc să mă intimideze, eu de la calea mea nu mă abat, eu hotărârile mele nu mi le schimb, eu ce cred că este bine pentru ţară şi pentru neam, asta fac."</description>
          <title>Iuliu Maniu, Bădăcin</title>
          <title_cover>Iuliu Maniu si Bădăcin</title_cover>
          <image>http://www.iuliumaniu.ro/pictures/banner.png</image>
          <modify>8/26/2009 6:17:02 AM</modify>
          <idsection>4</idsection>
          <id>6</id>
        </Link>
      </Links>
    </Section>
    <Section>
      <rank>2</rank>
      <id>3</id>
      <name>Yahoo, detectoare status,avatare,mesaje status</name>
      <name_cover>hnc</name_cover>
      <picture />
      <description>hd</description>
      <Links>
        <Link>
          <url>http://www.status-yahoo.ro</url>
          <description>Yahoo status invisible detector.Descopera yahoo status-ul prietenilor tai sau celor care se ascund de tine.Descarca status-uri text GRATUITE, avatare de toate tipurile si utilitare de care nici nu stiai ca exista .</description>
          <title>Yahoo status</title>
          <title_cover>Yahoo status,Hi5 Detector</title_cover>
          <image />
          <modify>8/28/2009 3:19:12 PM</modify>
          <idsection>3</idsection>
          <id>9</id>
        </Link>
        <Link>
          <url>http://www.yahoo-invisible.eu</url>
          <description>Yahoo status invisible detector.Descopera yahoo status-ul prietenilor tai sau celor care se ascund de tine.Descarca status-uri text GRATUITE, avatare de toate tipurile si utilitare de care nici nu stiai ca exista .</description>
          <title>Yahoo invisible</title>
          <title_cover>Yahoo invisible, Hi5 Detector</title_cover>
          <image />
          <modify>8/28/2009 3:19:00 PM</modify>
          <idsection>3</idsection>
          <id>10</id>
        </Link>
        <Link>
          <url>http://www.invisible-scanner.eu</url>
          <description>Invisible scanner.Descopera cine sta pe invisible si/sau are cont Hi5.Invisible scanner iti ofera potibilitatea de a detecta pe cei care se ascund de prieteni lor.Deasemenea it mai ofera si posibilitatea de a detecta contul Hi5 al acestui id in cazul in care acesta exista.Incearca invisible scanner</description>
          <title>Invisible scanner</title>
          <title_cover>Invisible scanner, Hi5 Detector</title_cover>
          <image />
          <modify>8/28/2009 3:21:11 PM</modify>
          <idsection>3</idsection>
          <id>11</id>
        </Link>
      </Links>
    </Section>
    <Section>
      <rank>2</rank>
      <id>7</id>
      <name>Blogs</name>
      <name_cover>hnc</name_cover>
      <picture />
      <description>hd</description>
      <Links>
        <Link>
          <url>http://popnadrian.pan-internet.com/</url>
          <description>Pop Adrian Nicolae Internet Blog</description>
          <title>Pop Adrian Nicolae</title>
          <title_cover>Pop Adrian Nicolae, IT Blog</title_cover>
          <image>http://paba.pan-internet.com/pictures/internet.png</image>
          <modify>8/26/2009 6:20:55 AM</modify>
          <idsection>7</idsection>
          <id>8</id>
        </Link>
      </Links>
    </Section>
    <Section>
      <rank>4</rank>
      <id>8</id>
      <name>Comunitati/Retele Sociale</name>
      <name_cover>Retele sociale</name_cover>
      <picture />
      <description>Prietenii</description>
      <Links>
        <Link>
          <url>http://www.status-yahoo.ro/buzzme</url>
          <description>BuzzMe - Comunitatea in care te regasesti cu prieteni tai</description>
          <title>Comunitatea buzzMe</title>
          <title_cover>Comunitatea buzzMe</title_cover>
          <image />
          <modify>8/28/2009 3:45:44 PM</modify>
          <idsection>8</idsection>
          <id>17</id>
        </Link>
      </Links>
    </Section>
    <Section>
      <rank>4</rank>
      <id>5</id>
      <name>Hotels/Resorts/Travel</name>
      <name_cover>Hotels/Resorts/Travel</name_cover>
      <picture />
      <description>Your travel guide</description>
      <Links>
        <Link>
          <url>http://www.worldlistofhotels.com</url>
          <description>World hotels - Find a hotel that suits your tastes - Reviews of vacations, hotels, resorts, and anything you want</description>
          <title>Hotels</title>
          <title_cover>Hotels all around the world</title_cover>
          <image />
          <modify>8/28/2009 3:34:12 PM</modify>
          <idsection>5</idsection>
          <id>15</id>
        </Link>
      </Links>
    </Section>
    <Section>
      <rank>4</rank>
      <id>6</id>
      <name>Auto/Moto/Velo</name>
      <name_cover>hnc</name_cover>
      <picture />
      <description>hd</description>
      <Links>
        <Link>
          <url>http://www.masini-second.net</url>
          <description>Masini second,masini de vanzare, postari anunturi masini second GRATUITE fara limita,cautari masini second de vanzare</description>
          <title>Masini second</title>
          <title_cover>Masini second, anunturi auto</title_cover>
          <image />
          <modify>8/28/2009 3:24:19 PM</modify>
          <idsection>6</idsection>
          <id>12</id>
        </Link>
        <Link>
          <url>http://www.anunturi-automobile.ro</url>
          <description>Anunturi auto,anunturi masini second insotite de poze, statistica preturi si oferte pentru anunturi auto-masini second hand</description>
          <title>Anunturi auto</title>
          <title_cover>Anunturi auto, Masini second</title_cover>
          <image />
          <modify>8/28/2009 3:27:02 PM</modify>
          <idsection>6</idsection>
          <id>13</id>
        </Link>
      </Links>
    </Section>
  </Sections>
</Feed>

 

XSLT:

<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="/">
    <div  class="sections" xsl:version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
     
        <xsl:for-each select="Feed/Sections/Section">
          <div class="section">
            <h2 class="title">
              <xsl:value-of select="name"/>
            </h2>
            <h3>
              <xsl:value-of select="description"/>
            </h3>
            <xsl:if test="picture!=''">
              <img>
                <xsl:attribute name="src">
                  <xsl:value-of select="picture"/>
                </xsl:attribute>
                <xsl:attribute name="title">
                  <xsl:value-of select="name_cover"/>
                </xsl:attribute>
              </img>
            </xsl:if>
            <div class="links">
              <xsl:for-each select="Links/Link">
              <div class="link">
                <a>
                  <xsl:attribute name="href">
                    <xsl:value-of select="url"/>
                  </xsl:attribute>
                  <xsl:attribute name="title">
                    <xsl:value-of select="title_cover"/>
                  </xsl:attribute>
                 
                    <xsl:value-of select="title"/>
                 
                </a>
                <xsl:if test="image!=''">
                  <img>
                    <xsl:attribute name="src">
                      <xsl:value-of select="image"/>
                    </xsl:attribute>
                    <xsl:attribute name="title">
                      <xsl:value-of select="title_cover"/>
                    </xsl:attribute>
                  </img>
                </xsl:if>
                <p>
                  <xsl:value-of select="description"/>
                </p>
                <p>             
                  <xsl:value-of select="modify"/>
                </p>
              </div>               
              </xsl:for-each>
            </div>
          </div>           
        </xsl:for-each>
     
    </div>
  </xsl:template>
</xsl:stylesheet>

The transformation are made server side; here are the code that helps me to execute the transformation:

ASP:

protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            string xmlPath = Server.MapPath("~\\output\\s-2.xml");
            string xslPath = Server.MapPath("~\\output\\paba.xslt");

            lbl_curentlinks.Text = XsltTransform(xmlPath, xslPath);
        }
        catch { }
    }

public static string XsltTransform(string xmlPath, string xslPath)
    {
        //Instantiate the XPathDocument Class
        string s = "";
        //if (System.IO.File.Exists(xmlPath))
        //{
        XPathDocument doc = new XPathDocument(xmlPath);

        //Instantiate the XslTransform Class
        XslTransform transform = new XslTransform();
        transform.Load(xslPath);

        //Custom format the indenting of the output document
        //by using an XmlTextWriter
        StringWriter wr = new StringWriter();
        XmlTextWriter writer = new XmlTextWriter(wr);



        writer.Formatting = Formatting.Indented;
        writer.Indentation = 4;
        transform.Transform(doc, null, writer);

        s = wr.ToString();

        wr.Close();
        writer.Close();
        //}

        return s;
    }

PHP:

<?php
$xml = new DomDocument();
$xml->load('s-2.xml');
                                                                               
$xsl = new DomDocument();
$xsl->load('paba.xslt');
                                                                               
$proc = new xsltprocessor();
$proc->importStyleSheet($xsl);
echo($proc->transformToXML($xml));
?>

And this is how PABA goes live; we hope that it will increase our site trafic incoming, our incomiing.


Posted by: admin
Posted on: 9/1/2009 at 4:45 PM
Tags: , , , , , , ,
Categories: ASP | Community | network | paba
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

FTP robot: broadcasting, inteligent acces multiple ftp servers


This is a project that in this moment is under development. I am the only developer and it is a very practical utility for PaBa network, a Internet web sites network founded and managed by me and Berce Alin, an old collegue. 1st what is PaBa; this is a network of web sites that contains a lot of sites with diferent services: Internet services (proxy, geolocation, band speed), travel and fun(hotels, travel blogs), Internet Imoral Utilities (this are from Boby - Yahoo Status, HI5 acount), Cultural and religious web sites (Historical personalities, churches, religion, history) and more will come from now on. Also we accept and other memebers in our network but we have to define some conditionsfor accesing and using our network, specially the performance and the quality of the candidate ofered services. So this is a big network. Will be, I hope that this will happen next week.
Big network require big chalenges. This means that we have to link this web sites into a network; this will happen using a page on each site, where will be link to each other sites from the network. So I try a lot of "simple" way to do this. We try to use a common database that should be accesed from all the sites; no way, one our hosting providers has blocked external requestest, of any kind (database request, http request, ftp request). That means that I cann't use XML Web Services, external XML web files, external requests of any kind. Other simple solution that was aborted afer one second from it aparition was to include this links into the client side; no way, very bad ideea: this link should help the network to increase. If this is only ar client side (using javascript, iframe or frame or other ways to include external content, on client side) this doesn't help the network specially when we speak about search engines. It should be generated by each site.
So what I sugest: using an xml file that will be uploaded on each site, over the ftp, helped by xslt technologies we generate on server side this pages. In this way the search engine will recognize our network and the users browser will get from each site server the list with the links, ordered by relevance.
For this, I create an ftp robot program; this means that a list of ftp connection settings (server, users, password, directory) will be stored somewhere in robot settings file; I keep the sites in a special database from where I generate the XML files. My robot takes this XML files and send this files to HTTP servers. From here each site publish the XML transformed using XSLT in HTML format and we get the wished result. Now I have to find something that can stop us (specially from hosting providers).
In this moment the ftp robot is under development (more exactly it is developed 30%). When it will be functional, even if is not finished, it will be published and anyone can download it. Untill then please wait (this should be finished in less than a week).
Thanks. I wait for your opinion.


Posted by: admin
Posted on: 8/21/2009 at 3:16 AM
Tags: , , , , , , ,
Categories: Community | ftp | paba | network
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed