Skip to content
Extraits de code Groupes Projets
Valider dfbddacc rédigé par mattpiwik's avatar mattpiwik
Parcourir les fichiers

Refs #100 Click on Rank or press enter now submit forms + adding JS

git-svn-id: http://dev.piwik.org/svn/trunk@2401 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent 8daae01d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -98,15 +98,12 @@ class Piwik_SEO_RankChecker
$url = "http://www.who.is/whois-com/ip-address/$url";
$data = $this->getPage($url);
preg_match('#Creation Date: ([a-z0-9-]+)#si', $data, $p);
if(isset($p[1]))
if(!isset($p[1]))
{
$value = time() - strtotime($p[1]);
$value = Piwik::getPrettyTimeFromSeconds($value);
}
else
{
$value = false;
}
return null;
}
$value = time() - strtotime($p[1]);
$value = Piwik::getPrettyTimeFromSeconds($value);
return $value;
}
......
......@@ -4,7 +4,7 @@
<form method="post" style="padding: 8px;" >
<div align="left" class="mediumtext">
{'Installation_SetupWebSiteURL'|translate|ucfirst}
<input type="text" id="url" size="40" value="{$urlToRank}" class="textbox" />
<input type="text" id="seoUrl" size="40" value="{$urlToRank}" class="textbox" />
<span style="padding-left:2px;">
<input type="submit" id ="rankbutton" value="{'SEO_Rank'|translate}" />
</span>
......
......@@ -15,7 +15,7 @@ $(document).ready(function() {
data: {
module: 'SEO',
action :'getRank',
url: encodeURIComponent( $('#url').val() ),
url: encodeURIComponent( $('#seoUrl').val() ),
idSite: piwik.idSite
}
};
......@@ -27,4 +27,5 @@ $(document).ready(function() {
getRank();
return false ;
});
});
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter