Titlebox não carregando criador do tópico Ter 8 Jul 2014 - 16:13
Minha questão:
Endereço do meu fórum:
[Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
Versão:
PunBB
[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
[infos=]Está é a parte do titlebox que está aplicada no fórum, mas a mesma não carrega o criador do tópico.[/infos]
- Código:
<!-- #region TitleBox_Viewtopic_body -->
<!-- BEGIN switch_user_logged_in -->
<!-- BEGIN watchtopic -->
<div class="ipbfs_titlebox">
<div class="__like right" id="watchtopic" data-isfave="" data-relid="" data-area="topics" data-app="forums">
<span data-tooltip="0 membro(s) segue(m) este tópico" class="ipsButton_extra right _fmore clickable" data-title="0 membro(s) segue(m) este tópico">
<img src="http://i78.servimg.com/u/f78/18/17/62/92/icon_u10.png"> <strong>0</strong>
</span>
<iframe name="iframe_watchtopic" height="0px" width="0px" frameborder="0"></iframe>
<a class="ftoggle ipsButton_secondary" title="" href="" target="iframe_watchtopic" onclick="watchtopic();window.location.reload();"></a>
</div>
<!-- END watchtopic -->
<!-- END switch_user_logged_in -->
<a class="ipsUserPhotoLink left" href="#">
<img class="ipsUserPhoto ipsUserPhoto_medium" alt="Foto" src="http://r26.imgfast.net/users/2617/31/90/74/avatars/1-40.png">
</a>
<div class="ipsBox_withphoto" itemtype="http://schema.org/Article" itemscope="">
<!-- BEGIN switch_user_logged_in -->
<!-- END switch_user_logged_in -->
<h1 class="ipsType_pagetitle" itemprop="name">{TOPIC_TITLE}</h1>
<div class="desc lighter blend_links">
Criado por <span itemprop="creator"><a title="" href="" class="url fn name"><span itemprop="name"></span></a></span>, <span itemprop="dateCreated"> </span>
</div>
<span id="tags_search"></span>
<br>
<meta content="UserComments:3" itemprop="interactionCount">
</div> </div>
<br>
<script type="text/javascript">
//<![CDATA[
jQuery(document).ready(function(){
var target = $('.post:first');
var imgdata = target.find('div.user-basic-info');
var autor_dat = target.find('div.author');
var autor_url = autor_dat.attr('href');
var autor_txt = autor_dat.text();
var date = target.find('span.data-post').html();
var topic_title = '{TOPIC_TITLE}';
var tags = topic_title.split(' ');
var follow = '{S_WATCH_TOPIC}';
$('.ipsUserPhotoLink.left').attr('href', imgdata.find('a').attr('href'));
$('.ipsUserPhoto.ipsUserPhoto_medium').attr('src', imgdata.find('img').attr('src'));
$('span[itemprop="creator"]').find('a').attr('title', autor_txt).attr('href', autor_url);
$('span[itemprop="name"]').text(autor_txt);
$('span[itemprop="dateCreated"]').html(date);
/* Remove duplicates values in array!
-> If you find something better than this, telme please. */
tags = tags.filter(
function(a){
if (!this[a]) {
this[a] = 1;
return a;
}
}
);
/* Sets tag search... */
$.each(tags, function(index, data) {
if(data.length > 5) {
$('#tags_search').append(
'<a id="tag_search_' + index + '" class="ipsTag" title="Localizar mais conteúdo com tag ' + data + '" href="/search?search_keywords=' + data + '">' +
' <span>' + data + '</span>' +
'</a>'
);
}
});
/* Whatch topic */
<!-- BEGIN switch_user_logged_in -->
<!-- BEGIN watchtopic -->
watchtopic();
function watchtopic() {
var target = $('#watchtopic').find('a.ftoggle.ipsButton_secondary');
if (follow.indexOf("?watch=") != -1) {
target.attr('title', 'Seguir este tópico e receber notificações de atualizações');
target.attr('href', '{TOPIC_URL}?watch=topic');
target.text('Seguir este tópico');
} else {
target.attr('title', 'Não seguir este tópico e não receber notificações de atualizações');
target.attr('href', '{TOPIC_URL}?unwatch=topic');
target.text('Não seguir este tópico');
}
}
<!-- END watchtopic -->
<!-- END switch_user_logged_in -->
});
//]]>
</script>
Endereço do meu fórum:
[Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
Versão:
PunBB