Aggiungere Bottone Mi Piace ai Post
3 partecipanti
Forum dei Forum: Aiuto per Forumattivo :: Assistenza a problemi e richieste :: Problemi con uno script o codici :: I problemi risolti con i codici
Pagina 2 di 3 • Condividi
Pagina 2 di 3 • 1, 2, 3
Aggiungere Bottone Mi Piace ai Post
Promemoria primo messaggio :
Ciao ragazzi, io vorrei aggiungere un bottone Mi piace ad ogni post.... Cioè, non un bottone che metti mi piace tramite Facebook, ma bensì tramite il forum... Cioè tu schiaccio il bottone e ti mette nell'elenco degli utenti che hanno inserito il Like...
Esempio:
e qua, dove c'è, Questo ti piace, se ci sono altri Utenti c'è scritto: Piace a te, utente1, utente 2, e così vi a, se sono tanti Utenti: Piace a te, Utente 1, Utente2 e Visualizza tutti gli Utenti... o una cosa del genere...
oppure, sotto una tabellina che indichi a chi piace, così:
è possibile? se si, come farlo?
@Niko taggo te perchè sono sicuro che sei l'unico che puoi aiutarmi, ma se c'è qualcun altro, ben venga
Ciao ragazzi, io vorrei aggiungere un bottone Mi piace ad ogni post.... Cioè, non un bottone che metti mi piace tramite Facebook, ma bensì tramite il forum... Cioè tu schiaccio il bottone e ti mette nell'elenco degli utenti che hanno inserito il Like...
Esempio:
e qua, dove c'è, Questo ti piace, se ci sono altri Utenti c'è scritto: Piace a te, utente1, utente 2, e così vi a, se sono tanti Utenti: Piace a te, Utente 1, Utente2 e Visualizza tutti gli Utenti... o una cosa del genere...
oppure, sotto una tabellina che indichi a chi piace, così:
è possibile? se si, come farlo?
@Niko taggo te perchè sono sicuro che sei l'unico che puoi aiutarmi, ma se c'è qualcun altro, ben venga
Ultima modifica di Alex2000 il Lun 3 Ago 2015 - 11:32 - modificato 1 volta.
Re: Aggiungere Bottone Mi Piace ai Post
ehi, qualcuno potrebbe aiutarmi? poi i bottoni non si vedono molto dritti, stanno attaccati sopra la barra in cui dovrebbero stare.....
Re: Aggiungere Bottone Mi Piace ai Post
ciao @MartinoPio ora il mio forum è invision, e non so più dove devo mettere questo codice:
- Codice:
<!-- BEGIN switch_vote_active -->
<div class="vote gensmall">
<!-- BEGIN switch_vote -->
<div class="vote-button" id="votazione"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}"><img src="http://i.imgur.com/FtFNWdt.png" title="Dopo aver messo Mi Piace non potrai annullare il voto. Se sei sicuro Clicca per continuare." /></a></div>
<!-- END switch_vote -->
<!-- BEGIN switch_bar -->
<div class="vote-bar" title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}">
<!-- BEGIN switch_vote_plus -->
<div class="vote-bar-plus" style="height:{postrow.displayed.switch_vote_active.switch_bar.switch_vote_plus.HEIGHT_PLUS}px;"></div>
<!-- END switch_vote_plus -->
<!-- BEGIN switch_vote_minus -->
<div class="vote-bar-minus" style="height:{postrow.displayed.switch_vote_active.switch_bar.switch_vote_minus.HEIGHT_MINUS}px;"></div>
<!-- END switch_vote_minus -->
</div>
<!-- END switch_bar -->
<!-- BEGIN switch_no_bar -->
<div title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}" class="vote-no-bar"></div>
<!-- END switch_no_bar -->
<!-- BEGIN switch_vote -->
<div class="vote-button" id="votazione"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}"><img src="http://i.imgur.com/kuCAtha.png" title="Dopo aver messo Non Mi Piace non potrai annullare il voto. Se sei sicuro Clicca per continuare." /></a></div>
<!-- END switch_vote -->
</div>
<!-- END switch_vote_active -->
Re: Aggiungere Bottone Mi Piace ai Post
Ciao @Alex2000
Non sto seguendo molto questa richiesta volevo solo avvisarti che abbiamo in archivio un nuovo tutorial riguardante questo tipo di richiesta.
Anche se non è ancora pubblico, te lo incollo qui di seguito:
Fammi sapere
Non sto seguendo molto questa richiesta volevo solo avvisarti che abbiamo in archivio un nuovo tutorial riguardante questo tipo di richiesta.
Anche se non è ancora pubblico, te lo incollo qui di seguito:
- Spoiler:
- Buongiorno! Con questo tutorial vedremo come inserire un sistema di voto nei messaggi del proprio forum. Come prima cosa, come sempre, bisognerà aggiungere un codice CSS nel foglio di stile del proprio forum.
Pannello di amministrazione Visualizzazione Colori "Foglio di stile CSS" - Codice:
#rep_post .reput_vote {
background-color: #daedfb;
color: #666;
-khtml-user-select: none;
-moz-transition: all,0.15s;
-moz-user-select: none;
-ms-user-select: none;
-o-transition: all,0.15s;
-webkit-touch-callout: none;
-webkit-transition: all,0.15s;
-webkit-user-select: none;
background: #f0f0f0 url(https://cdn1.iconfinder.com/data/icons/social-media-13/24/Like-16.png) no-repeat 6px center;
background-size: 12px;
clear: both;
color: #666;
cursor: pointer;
display: table;
font-size: 11px;
font-weight: 400;
line-height: 18px;
margin: 5px;
padding: 3px 5px 3px 25px;
text-align: right;
transition: all,0.15s;
}
.reput_vote.zero {
background-color: #6a6a6a;
}
.BS_like:hover {
background-color: #daedfb;
color: #666;
}
.BS_like {
-khtml-user-select: none;
-moz-transition: all,0.15s;
-moz-user-select: none;
-ms-user-select: none;
-o-transition: all,0.15s;
-webkit-touch-callout: none;
-webkit-transition: all,0.15s;
-webkit-user-select: none;
background: #f0f0f0 url(https://cdn1.iconfinder.com/data/icons/social-media-13/24/Like-16.png) no-repeat 6px center;
background-size: 12px;
clear: both;
color: #666;
cursor: pointer;
display: table;
font-size: 11px;
font-weight: 400;
line-height: 18px;
margin: 5px;
padding: 3px 5px 3px 25px;
text-align: right;
transition: all,0.15s;
user-select: none;
}
.BS_like:before {
content: "Mi piace!";
}
#rep_post .bs_inline {
list-style: none;
}
.BS_like:hover {
background-color: #daedfb;
color: #666;
}
#rep_post {white-space: nowrap;margin: 6px 4px;float: right;}
#rep_post .bs_inline {list-style: none;}
#rep_post .bs_inline > li {display: inline-block;margin: 0 3px;}
#rep_post .bs_inline > li:first-child {margin-left: 0;}
#rep_post .bs_inline img {display: none;}
#rep_post span img {cursor: pointer;}
.reput_vote.positive {background-color: #8db13e;}
.reput_vote.zero {background-color: #6a6a6a;}
#rep_post .reput_vote:before {
content: "Likes: ";
}
Ora, bisognerà aggiungere un nuovo codice javascript. Recati nella seguente pagina:Pannello di amministrazione Moduli Gestione del codice javascript
- Titolo: Quello che si vuole;
- Posizione: Gli argomenti;
- *Codice: (*Per tutte le versioni dei forum, tratte che per PunBB)- Codice:
function bestskins_ls() {
for(var x = $('.vote'), i = 0, vote; (vote = x[i++]); ) {
var count = 0,
qtd = 0,
barra = $('.vote-bar', vote)[0],
botao = $('.vote-button', vote)[0];
if (barra) {
var numbarra = barra.title.match(/\d+/g);
qtd = Math.round(parseInt( numbarra[1] ) * parseInt( numbarra[0] )) / 100;
}
//Imagem de reputação
var reputation_UP = 'http://www.agrotube.com.br/images/seta_baixo.png';
botao = botao ? '<li><span onclick="bestskinsVoto(\'' + botao.firstChild.href + '\',this);" class="BS_like"><img src="' + reputation_UP + '" alt="+" class="rep_up"></span></li>' : '<li style="display: none;"><img src="' + reputation_UP + '" alt="+" class="rep_up"></li>';
var numrep = '<li>' + (qtd == 0 ? '<span class="reput_vote zero">' + qtd + '</span>' : '<span class="reput_vote positive">' + qtd + '</span>') + '</li>';
var htmlFinal =
'<div class="rep_bar clearfix" id="rep_post">' +
' <ul class="bs_inline">' + botao + numrep + '</ul>' +
'</div>';
$('.postbody', vote.parentNode.parentNode.parentNode).append( htmlFinal );
}
x.remove();
};
function bestskinsVoto(b,a) {
a.onclick = '#';
$.get(b, function() {
a.parentNode.style.display = 'none';
var verify = a.parentNode.nextSibling.firstChild.innerHTML;
if(verify == 0) {
a.parentNode.nextSibling.firstChild.classList.remove('zero'),
a.parentNode.nextSibling.firstChild.classList.add('positive');
}
var c = a.parentNode.nextSibling.firstChild, b = parseInt(/\d+/.exec(c.innerHTML)[0])+1;
c.innerHTML = c.innerHTML.replace(/\d+/,b);
});
};
if (document.readyState === 'complete') {
bestskins_ls();
} else {
document.addEventListener('DOMContentLoaded', function() {
bestskins_ls();
});
}
- *Codice: (*Per i forum che hanno come versione PunBB)- Codice:
function bestskins_ls() {
for(var x = $('.vote'), i = 0, vote; (vote = x[i++]); ) {
var count = 0,
qtd = 0,
barra = $('.vote-bar', vote)[0],
botao = $('.vote-button', vote)[0];
if (barra) {
var numbarra = barra.title.match(/\d+/g);
qtd = Math.round(parseInt( numbarra[1] ) * parseInt( numbarra[0] )) / 100;
}
//Imagem de reputação
var reputation_UP = 'http://www.agrotube.com.br/images/seta_baixo.png';
botao = botao ? '<li><span onclick="bestskinsVoto(\'' + botao.firstChild.href + '\',this);" class="BS_like"><img src="' + reputation_UP + '" alt="+" class="rep_up"></span></li>' : '<li style="display: none;"><img src="' + reputation_UP + '" alt="+" class="rep_up"></li>';
var numrep = '<li>' + (qtd == 0 ? '<span class="reput_vote zero">' + qtd + '</span>' : '<span class="reput_vote positive">' + qtd + '</span>') + '</li>';
var htmlFinal =
'<div class="rep_bar clearfix" id="rep_post">' +
' <ul class="bs_inline">' + botao + numrep + '</ul>' +
'</div>';
$('.postfoot', vote.parentNode.parentNode.parentNode.parentNode).before( htmlFinal );
}
x.remove();
};
function bestskinsVoto(b,a) {
a.onclick = '#';
$.get(b, function() {
a.parentNode.style.display = 'none';
var verify = a.parentNode.nextSibling.firstChild.innerHTML;
if(verify == 0) {
a.parentNode.nextSibling.firstChild.classList.remove('zero'),
a.parentNode.nextSibling.firstChild.classList.add('positive');
}
var c = a.parentNode.nextSibling.firstChild, b = parseInt(/\d+/.exec(c.innerHTML)[0])+1;
c.innerHTML = c.innerHTML.replace(/\d+/,b);
});
};
if (document.readyState === 'complete') {
bestskins_ls();
} else {
document.addEventListener('DOMContentLoaded', function() {
bestskins_ls();
});
}
- Risultato:
Buona giornata!
Fammi sapere
Pagina 2 di 3 • 1, 2, 3
Argomenti simili
» Aggiungere tasti Mi piace e Non mi piace
» Aggiungere pulsante "mi piace" di FB
» Aggiungere un contenuto dopo il primo post
» Inserire nelle pagine dei post un tasto "Mi piace" (non Facebook) in Phpbb3
» MUSICA SUL FORUM **ARGOMENTO UNICO**
» Aggiungere pulsante "mi piace" di FB
» Aggiungere un contenuto dopo il primo post
» Inserire nelle pagine dei post un tasto "Mi piace" (non Facebook) in Phpbb3
» MUSICA SUL FORUM **ARGOMENTO UNICO**
Forum dei Forum: Aiuto per Forumattivo :: Assistenza a problemi e richieste :: Problemi con uno script o codici :: I problemi risolti con i codici
Pagina 2 di 3
Permessi in questa sezione del forum:
Non puoi rispondere agli argomenti in questo forum.