Résolution du bug #2930921 : le titre de la page n'était pas mis à jour avec l'AJAX
Ajout de la fonctionnalité #2930930 : l'url permanente du strip est maintenant indiquée
This commit is contained in:
parent
67a61874f1
commit
e7d737af1b
9 changed files with 31 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ abstract class AbstractLang
|
||||||
protected $contact = "Contact";
|
protected $contact = "Contact";
|
||||||
protected $rss = "RSS";
|
protected $rss = "RSS";
|
||||||
protected $licence = "Licence";
|
protected $licence = "Licence";
|
||||||
|
protected $permanent_link = "Lien permanent";
|
||||||
protected $boutique = "Boutique";
|
protected $boutique = "Boutique";
|
||||||
protected $teeshirt = "(t-shirts & cadeaux)";
|
protected $teeshirt = "(t-shirts & cadeaux)";
|
||||||
protected $propulse = "Propulsé par";
|
protected $propulse = "Propulsé par";
|
||||||
|
|
@ -58,6 +59,7 @@ abstract class AbstractLang
|
||||||
public function getContact() { return $this->contact; }
|
public function getContact() { return $this->contact; }
|
||||||
public function getRss() { return $this->rss; }
|
public function getRss() { return $this->rss; }
|
||||||
public function getLicence() { return $this->licence; }
|
public function getLicence() { return $this->licence; }
|
||||||
|
public function getPermanentLink() { return $this->permanent_link; }
|
||||||
public function getBoutique() { return $this->boutique; }
|
public function getBoutique() { return $this->boutique; }
|
||||||
public function getTeeshirt() { return $this->teeshirt; }
|
public function getTeeshirt() { return $this->teeshirt; }
|
||||||
public function getPropulse() { return $this->propulse; }
|
public function getPropulse() { return $this->propulse; }
|
||||||
|
|
|
||||||
|
|
@ -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
|
* Return an array with all navigation link
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ class Lang extends AbstractLang
|
||||||
$this->contact = "Contact";
|
$this->contact = "Contact";
|
||||||
$this->rss = "RSS";
|
$this->rss = "RSS";
|
||||||
$this->licence = "License";
|
$this->licence = "License";
|
||||||
|
$this->permanent_link = "Permanent link";
|
||||||
$this->boutique = "Shop";
|
$this->boutique = "Shop";
|
||||||
$this->teeshirt = "(t-shirts & gifts)";
|
$this->teeshirt = "(t-shirts & gifts)";
|
||||||
$this->propulse = "Powered by";
|
$this->propulse = "Powered by";
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ class Lang extends AbstractLang
|
||||||
$this->contact = "Contact";
|
$this->contact = "Contact";
|
||||||
$this->rss = "RSS";
|
$this->rss = "RSS";
|
||||||
$this->licence = "Licence";
|
$this->licence = "Licence";
|
||||||
|
$this->permanent_link = "Lien permanent";
|
||||||
$this->boutique = "Boutique";
|
$this->boutique = "Boutique";
|
||||||
$this->teeshirt = "(t-shirts & cadeaux)";
|
$this->teeshirt = "(t-shirts & cadeaux)";
|
||||||
$this->propulse = "Propulsé par";
|
$this->propulse = "Propulsé par";
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@
|
||||||
<p id="description"><?php echo $strip->getDescription() ?></p>
|
<p id="description"><?php echo $strip->getDescription() ?></p>
|
||||||
<p><span id="author">© <?php echo $strip->getAuthor() ?></span> : <span id="date"><?php echo $strip->getDate() ?></span> : <a id="link_source" href="<?php echo $strip->getFilenameSrc() ?>"><?php echo $lang->getSource() ?></a></p>
|
<p><span id="author">© <?php echo $strip->getAuthor() ?></span> : <span id="date"><?php echo $strip->getDate() ?></span> : <a id="link_source" href="<?php echo $strip->getFilenameSrc() ?>"><?php echo $lang->getSource() ?></a></p>
|
||||||
<p id="license"><?php echo $lang->getLicence() ?> : <a id="link_license" href="<?php echo $strip->getLicense() ?>"><?php echo $strip->getLicense() ?></a></p>
|
<p id="license"><?php echo $lang->getLicence() ?> : <a id="link_license" href="<?php echo $strip->getLicense() ?>"><?php echo $strip->getLicense() ?></a></p>
|
||||||
|
<p><?php echo $lang->getPermanentLink() ?> : <span id="permanent"><?php echo $permanent_link ?></span></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ function getStrip(link)
|
||||||
break;
|
break;
|
||||||
case 'title':
|
case 'title':
|
||||||
if (idExist('title')) document.getElementById('title').innerHTML = '« ' + value + ' »';
|
if (idExist('title')) document.getElementById('title').innerHTML = '« ' + value + ' »';
|
||||||
|
document.title = value;
|
||||||
break;
|
break;
|
||||||
case 'description':
|
case 'description':
|
||||||
if (idExist('description')) document.getElementById('description').innerHTML = value;
|
if (idExist('description')) document.getElementById('description').innerHTML = value;
|
||||||
|
|
@ -100,6 +101,9 @@ function getStrip(link)
|
||||||
case 'nav_forum_view':
|
case 'nav_forum_view':
|
||||||
if (idExist('nav_forum_view')) document.getElementById('nav_forum_view').href = value;
|
if (idExist('nav_forum_view')) document.getElementById('nav_forum_view').href = value;
|
||||||
break;
|
break;
|
||||||
|
case 'permanent':
|
||||||
|
if (idExist('permanent')) document.getElementById('permanent').innerHTML = value;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@
|
||||||
<p id="date"><?php echo $strip->getDate() ?></p>
|
<p id="date"><?php echo $strip->getDate() ?></p>
|
||||||
<p id="source"><a id="link_source" href="<?php echo $strip->getFilenameSrc() ?>"><?php echo $lang->getSource() ?></a></p>
|
<p id="source"><a id="link_source" href="<?php echo $strip->getFilenameSrc() ?>"><?php echo $lang->getSource() ?></a></p>
|
||||||
<p id="license"><?php echo $lang->getLicence() ?> : <a id="link_license" href="<?php echo $strip->getLicense() ?>"><?php echo $strip->getLicense() ?></a></p>
|
<p id="license"><?php echo $lang->getLicence() ?> : <a id="link_license" href="<?php echo $strip->getLicense() ?>"><?php echo $strip->getLicense() ?></a></p>
|
||||||
|
<p><?php echo $lang->getPermanentLink() ?> : <span id="permanent"><?php echo $permanent_link ?></span></p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,5 @@
|
||||||
<item id="navgallery"><![CDATA[<?php echo $nav_gallery ?>]]></item>
|
<item id="navgallery"><![CDATA[<?php echo $nav_gallery ?>]]></item>
|
||||||
<item id="nav_forum_post"><![CDATA[<?php echo $nav_forum_post ?>]]></item>
|
<item id="nav_forum_post"><![CDATA[<?php echo $nav_forum_post ?>]]></item>
|
||||||
<item id="nav_forum_view"><![CDATA[<?php echo $nav_forum_view ?>]]></item>
|
<item id="nav_forum_view"><![CDATA[<?php echo $nav_forum_view ?>]]></item>
|
||||||
|
<item id="permanent"><![CDATA[<?php echo $permanent_link ?>]]></item>
|
||||||
</root>
|
</root>
|
||||||
|
|
@ -55,6 +55,7 @@ $lang = getLang($lang);
|
||||||
list($nav_first, $nav_last, $nav_prev, $nav_next, $nav_gallery) = getNavigation($id, $last, $lang);
|
list($nav_first, $nav_last, $nav_prev, $nav_next, $nav_gallery) = getNavigation($id, $last, $lang);
|
||||||
$nav_forum_post = Config::getFluxbbForum().'/post.php?ttitle='.urlencode($strip->getTitle()).'&fid='.Config::getFluxbbForumId();
|
$nav_forum_post = Config::getFluxbbForum().'/post.php?ttitle='.urlencode($strip->getTitle()).'&fid='.Config::getFluxbbForumId();
|
||||||
$nav_forum_view = Config::getFluxbbForum().'/redirect_stripit.php?ttitle='.urlencode($strip->getTitle());
|
$nav_forum_view = Config::getFluxbbForum().'/redirect_stripit.php?ttitle='.urlencode($strip->getTitle());
|
||||||
|
$permanent_link = htmlentities(getPermanentLink($id, $lang));
|
||||||
|
|
||||||
// If necessary, obtain the forum data
|
// If necessary, obtain the forum data
|
||||||
$comments = '';
|
$comments = '';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue