diff --git a/inc/class/abstractlang.class.php b/inc/class/abstractlang.class.php index 6dab91f..f1b56c4 100644 --- a/inc/class/abstractlang.class.php +++ b/inc/class/abstractlang.class.php @@ -25,6 +25,7 @@ abstract class AbstractLang protected $contact = "Contact"; protected $rss = "RSS"; protected $licence = "Licence"; + protected $permanent_link = "Lien permanent"; protected $boutique = "Boutique"; protected $teeshirt = "(t-shirts & cadeaux)"; protected $propulse = "Propulsé par"; @@ -58,6 +59,7 @@ abstract class AbstractLang public function getContact() { return $this->contact; } public function getRss() { return $this->rss; } public function getLicence() { return $this->licence; } + public function getPermanentLink() { return $this->permanent_link; } public function getBoutique() { return $this->boutique; } public function getTeeshirt() { return $this->teeshirt; } public function getPropulse() { return $this->propulse; } diff --git a/inc/functions.php b/inc/functions.php index 05ab0e4..bf3fe49 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -81,6 +81,25 @@ function getNavigation($id, $last, Lang $lang) } +/** + * Return the permanent link for the strip + * + * @param integer $id The id of the actual strip + * @param Lang $lang The Lang object use for the actual user + * @return string The permanent link for the actual strip + */ +function getPermanentLink($id, Lang $lang) +{ + $url = Config::getUrl().'/'.Config::getIndex().'?id='; + $nav_lang = ''; + if (isset($_GET['lang'])) { + $nav_lang = '&lang='.$lang; + } + + return $url.$id.$nav_lang; +} + + /** * Return an array with all navigation link * diff --git a/inc/lang/en-EN.php b/inc/lang/en-EN.php index c95eaf7..5539ca4 100644 --- a/inc/lang/en-EN.php +++ b/inc/lang/en-EN.php @@ -26,6 +26,7 @@ class Lang extends AbstractLang $this->contact = "Contact"; $this->rss = "RSS"; $this->licence = "License"; + $this->permanent_link = "Permanent link"; $this->boutique = "Shop"; $this->teeshirt = "(t-shirts & gifts)"; $this->propulse = "Powered by"; diff --git a/inc/lang/fr-FR.php b/inc/lang/fr-FR.php index a82ec80..ae440d6 100644 --- a/inc/lang/fr-FR.php +++ b/inc/lang/fr-FR.php @@ -26,6 +26,7 @@ class Lang extends AbstractLang $this->contact = "Contact"; $this->rss = "RSS"; $this->licence = "Licence"; + $this->permanent_link = "Lien permanent"; $this->boutique = "Boutique"; $this->teeshirt = "(t-shirts & cadeaux)"; $this->propulse = "Propulsé par"; diff --git a/inc/tpl/default/template.html b/inc/tpl/default/template.html index caed472..1c6589f 100644 --- a/inc/tpl/default/template.html +++ b/inc/tpl/default/template.html @@ -45,6 +45,7 @@
getDescription() ?>
: getDate() ?> : getSource() ?>
getLicence() ?> : getLicense() ?>
+getPermanentLink() ?> :
diff --git a/inc/tpl/functions.js b/inc/tpl/functions.js index bcb777b..8a199f6 100644 --- a/inc/tpl/functions.js +++ b/inc/tpl/functions.js @@ -52,6 +52,7 @@ function getStrip(link) break; case 'title': if (idExist('title')) document.getElementById('title').innerHTML = '« ' + value + ' »'; + document.title = value; break; case 'description': if (idExist('description')) document.getElementById('description').innerHTML = value; @@ -100,6 +101,9 @@ function getStrip(link) case 'nav_forum_view': if (idExist('nav_forum_view')) document.getElementById('nav_forum_view').href = value; break; + case 'permanent': + if (idExist('permanent')) document.getElementById('permanent').innerHTML = value; + break; } } } diff --git a/inc/tpl/lego/template.html b/inc/tpl/lego/template.html index 6bc2717..2f12c77 100644 --- a/inc/tpl/lego/template.html +++ b/inc/tpl/lego/template.html @@ -85,6 +85,7 @@getDate() ?>
getLicence() ?> : getLicense() ?>
+getPermanentLink() ?> :
diff --git a/inc/tpl/stripit.xml b/inc/tpl/stripit.xml index 2e3993a..9efb6a4 100644 --- a/inc/tpl/stripit.xml +++ b/inc/tpl/stripit.xml @@ -16,4 +16,5 @@ +