Forum gratuit: forum de suport al utilizatorilor
Doriți să reacționați la acest mesaj? Creați un cont în câteva clickuri sau conectați-vă pentru a continua.

Problema marime avatar

Vezi subiectul anterior Vezi subiectul urmator In jos

Rezolvat Problema marime avatar

Mesaj Scris de andreyx Dum Iun 29, 2014 10:37 am

Cum fac sa am la mesaje avatarul mai mare si mai clar fara sa mareasca si alte imagini la mesaje?


Ultima editare efectuata de catre andreyx in Mier Iul 02, 2014 8:32 pm, editata de 1 ori
andreyx

andreyx
Membru Forumgratuit

Mesaje : 350
Varsta : 26
Data înscrierii : 07/07/2013
Mulțumiri : 1
Internet Explorer phpBB2

http://narutoworld-fanclub.forumulmeu.ro/forum
andreyx a fost mulțumit de autorul acestui subiect.

Rezolvat Re: Problema marime avatar

Mesaj Scris de TheSpeak Dum Iun 29, 2014 10:38 am

Prezentati Scriptul .
TheSpeak

TheSpeak
Membru Forumgratuit

Mesaje : 184
Varsta : 24
Data înscrierii : 16/06/2014
Mulțumiri : 2
Internet Explorer punBB

http://www.redgame.forum.st
TheSpeak a fost mulțumit de autorul acestui subiect.

Rezolvat Re: Problema marime avatar

Mesaj Scris de andreyx Dum Iun 29, 2014 10:55 am

am schimbat codul asta din viewtopic_body:
Cod:
{postrow.displayed.POSTER_AVATAR}
cu acesta
Cod:
<span style="opacity: 0.2;" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100" onmouseout="this.style.opacity=0.2;this.filters.alpha.opacity=15">{postrow.displayed.POSTER_AVATAR}</span>
andreyx

andreyx
Membru Forumgratuit

Mesaje : 350
Varsta : 26
Data înscrierii : 07/07/2013
Mulțumiri : 1
Internet Explorer phpBB2

http://narutoworld-fanclub.forumulmeu.ro/forum
andreyx a fost mulțumit de autorul acestui subiect.

Rezolvat Re: Problema marime avatar

Mesaj Scris de TheSpeak Dum Iun 29, 2014 11:23 am

Nu e bun scripul puteti sa-l restartati adaugati intr-un javascript acest cod


  • Titlu: Avatar la ultimul postator
  • Amplasare: Indexul forumului



Cod:
$(function(){
 
    if(!window.localStorage) return;
 
    // Avatar par défaut
    var default_avatar= 'http://2img.net/i/fa/invision/pp-blank-thumb.png';
 
    // Temps de cache, ici 24 h * 60 m * 60 s * 1000 ms donc un jour
    var caching_time= 24*60*60*1000;
 
    // Temps de cache d'une erreur, ici 60 s * 1000 ms donc une minute
    var caching_error= 60*1000;
 
    var set_avatar= function(id) {
        $('.mini_ava.member'+id).html('<img src="'+get_avatar(id)+'" />');
    };
 
    var get_avatar= function(id) {
 
       if(localStorage.getItem('t_ava'+id) < +new Date - caching_time
 || (localStorage.getItem('d_ava'+id)==default_avatar &&
localStorage.getItem('t_ava'+id) < +new Date - caching_error))
        {
            localStorage.setItem('d_ava'+id, default_avatar);
            $.get('/u'+id, function (d){
                localStorage.setItem('t_ava'+id,+new Date);
 
               localStorage.setItem('d_ava'+id,
$('#profile-advanced-right .module:first div img:first,.forumline
td.row1.gensmall:first > img, .frm-set.profile-view.left dd
img,dl.left-box.details:first dd img, .row1 b .gen:first img,
.real_avatar img',d).first().attr('src')||default_avatar);
                set_avatar(id);
            });
        }
        return localStorage.getItem('d_ava'+id);
    };
 
    var to_replace= {};
 
 
   $('dd.lastpost strong a.gensmall, .ipbtable tr td:last-child span
strong a.gensmall, .table td.tcr strong a.gensmall, .forumline
.row3.over strong a.gensmall').each(function(){
        to_replace[$(this).attr('href').substr(2)]= 1;
        $(this).closest('td,dd').prepend('<div class="mini_ava member'+$(this).attr('href').substr(2)+'"></div>');
    });
 
    for(i in to_replace)
    {
        set_avatar(i);
    };
 
});


Apoi va duceti in CSS Si adaugati



Cod:
.mini_ava {
  float: left;
}
.mini_ava img {
  width: 40px;
  height: 40px;
  margin: 0 5px;
  border-radius: 10px;
  transition: all 1s;
  -moz-transition: all 1s;
  -webkit-transition: all 1s;
  -o-transition: all 1s;
}
.mini_ava img:hover
{
  zoom: 130%;
}
TheSpeak

TheSpeak
Membru Forumgratuit

Mesaje : 184
Varsta : 24
Data înscrierii : 16/06/2014
Mulțumiri : 2
Internet Explorer punBB

http://www.redgame.forum.st
TheSpeak a fost mulțumit de autorul acestui subiect.

Rezolvat Re: Problema marime avatar

Mesaj Scris de andreyx Dum Iun 29, 2014 11:54 am

TheSpeak a scris:Nu e bun scripul puteti sa-l restartati adaugati intr-un javascript acest cod


  • Titlu: Avatar la ultimul postator
  • Amplasare: Indexul forumului


Cod:
$(function(){
 
    if(!window.localStorage) return;
 
    // Avatar par défaut
    var default_avatar= 'http://2img.net/i/fa/invision/pp-blank-thumb.png';
 
    // Temps de cache, ici 24 h * 60 m * 60 s * 1000 ms donc un jour
    var caching_time= 24*60*60*1000;
 
    // Temps de cache d'une erreur, ici 60 s * 1000 ms donc une minute
    var caching_error= 60*1000;
 
    var set_avatar= function(id) {
        $('.mini_ava.member'+id).html('<img src="'+get_avatar(id)+'" />');
    };
 
    var get_avatar= function(id) {
 
       if(localStorage.getItem('t_ava'+id) < +new Date - caching_time
 || (localStorage.getItem('d_ava'+id)==default_avatar &&
localStorage.getItem('t_ava'+id) < +new Date - caching_error))
        {
            localStorage.setItem('d_ava'+id, default_avatar);
            $.get('/u'+id, function (d){
                localStorage.setItem('t_ava'+id,+new Date);
 
               localStorage.setItem('d_ava'+id,
$('#profile-advanced-right .module:first div img:first,.forumline
td.row1.gensmall:first > img, .frm-set.profile-view.left dd
img,dl.left-box.details:first dd img, .row1 b .gen:first img,
.real_avatar img',d).first().attr('src')||default_avatar);
                set_avatar(id);
            });
        }
        return localStorage.getItem('d_ava'+id);
    };
 
    var to_replace= {};
 
 
   $('dd.lastpost strong a.gensmall, .ipbtable tr td:last-child span
strong a.gensmall, .table td.tcr strong a.gensmall, .forumline
.row3.over strong a.gensmall').each(function(){
        to_replace[$(this).attr('href').substr(2)]= 1;
        $(this).closest('td,dd').prepend('<div class="mini_ava member'+$(this).attr('href').substr(2)+'"></div>');
    });
 
    for(i in to_replace)
    {
        set_avatar(i);
    };
 
});


Apoi va duceti in CSS Si adaugati



Cod:
.mini_ava {
  float: left;
}
.mini_ava img {
  width: 40px;
  height: 40px;
  margin: 0 5px;
  border-radius: 10px;
  transition: all 1s;
  -moz-transition: all 1s;
  -webkit-transition: all 1s;
  -o-transition: all 1s;
}
.mini_ava img:hover
{
  zoom: 130%;
}
scuze,dar nu asta vroiam sa ma refer,vroiam sa ma refer la mesajele de la topicuri.
andreyx

andreyx
Membru Forumgratuit

Mesaje : 350
Varsta : 26
Data înscrierii : 07/07/2013
Mulțumiri : 1
Internet Explorer phpBB2

http://narutoworld-fanclub.forumulmeu.ro/forum
andreyx a fost mulțumit de autorul acestui subiect.

Rezolvat Re: Problema marime avatar

Mesaj Scris de andreyx Lun Iun 30, 2014 5:28 pm

up!
andreyx

andreyx
Membru Forumgratuit

Mesaje : 350
Varsta : 26
Data înscrierii : 07/07/2013
Mulțumiri : 1
Internet Explorer phpBB2

http://narutoworld-fanclub.forumulmeu.ro/forum
andreyx a fost mulțumit de autorul acestui subiect.

Rezolvat Re: Problema marime avatar

Mesaj Scris de andreyx Mier Iul 02, 2014 3:39 pm

up
andreyx

andreyx
Membru Forumgratuit

Mesaje : 350
Varsta : 26
Data înscrierii : 07/07/2013
Mulțumiri : 1
Internet Explorer phpBB2

http://narutoworld-fanclub.forumulmeu.ro/forum
andreyx a fost mulțumit de autorul acestui subiect.
  • 0

Rezolvat Re: Problema marime avatar

Mesaj Scris de Zeus Mier Iul 02, 2014 3:55 pm

Buna ziua,

Cautati in viewtopic_body:
Cod:
<span style="opacity: 0.2;" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100" onmouseout="this.style.opacity=0.2;this.filters.alpha.opacity=15">{postrow.displayed.POSTER_AVATAR}</span>

Inlocuiti cu:
Cod:
<div class="avt">{postrow.displayed.POSTER_AVATAR}</div>
Inregistrati si publicati template-ul.


In Panou=> Afisare => Imagini si culori => Culori => Foaie de stil css adaugati:
Cod:
.avt img {
width: 150px;
height: 200px;
opacity: 0.8;
}
.avt img:hover {
opacity: 1.0;
}

Explicatie cod:
min-width: 150px;  // reprezinta latimea minima avatarelor
min-height: 200px; // reprezinta inaltimea minima avatarelor
Zeus

Zeus
Membru onorific
Membru onorific

Mesaje : 4160
Varsta : 27
Localizare : Bucuresti, Romania
Data înscrierii : 19/02/2012
Mulțumiri : 644
Google Chrome phpBB3

https://github.com/zeusmaximus
Zeus a fost mulțumit de autorul acestui subiect.

Rezolvat Re: Problema marime avatar

Mesaj Scris de andreyx Mier Iul 02, 2014 8:33 pm

topic rezolvat!mersi Zeus
andreyx

andreyx
Membru Forumgratuit

Mesaje : 350
Varsta : 26
Data înscrierii : 07/07/2013
Mulțumiri : 1
Internet Explorer phpBB2

http://narutoworld-fanclub.forumulmeu.ro/forum
andreyx a fost mulțumit de autorul acestui subiect.

Rezolvat Re: Problema marime avatar

Mesaj Scris de Omu Mier Iul 02, 2014 8:51 pm

topic rezolvat
Omu

Omu
Membru onorific
Membru onorific

Mesaje : 6302
Varsta : 27
Data înscrierii : 04/11/2010
Mulțumiri : 154
Google Chrome punBB

http://techtitans.forumer.ro/
Omu a fost mulțumit de autorul acestui subiect.

Vezi subiectul anterior Vezi subiectul urmator Sus


Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum