Google+

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rezolvat Last Poster Avatar on Forumlist and Threadlist
#1
Vreau sa instalez acest plugin dar avatarele nu sunt asezate corespunzator.Avatarele sunt mai sus decat textul si se lateste forumul,categoria.
Puteti sa va dati seama din imaginea de mai jos.

[Image: et5wnm.jpg]

Si nu imi apar ca aici:

[Image: 51493-1322937305-forumlist.png]

Donwload plugin:

http://mods.mybb.com/view/last-poster-av...threadlist
#2
up........
#3
Ma ajutati va rog?
#4
Activează pluginul să vedem ce trebuie modificat pentru a se afişa în linie cu textul de la last post.
#5
L-am activat!

http://www.koreafan.eu

Dar nu imi apare si pe prima pagina avatarele...si doar am setat sa apara.
#6
Intră în şablonul forumdisplay_thread şi găseşte următoarea linie:

Code:
{$tal_useravatar}

Înlocuieşte-o cu aceasta:

Code:
<span style="float: left;">{$tal_useravatar}</span>

#7
Merge..Multumesc
Si cum fac sa apara si pe prima pagina la categorii?
Ca la plugin eu am bifat sa apara si pe prima pagina dar nu apare...
#8
Dacă ai citit instrucţiunile de instalare, ai fi văzut că trebuie să faci nişte modificări în functions_forumlist.php.
Pentru a apărea şi pe index, caută următoarele linii în acel fişier:

PHP Code:
1
2
3
4
5
6
if(my_strlen($lastpost_subject) > 25)
{
	$lastpost_subject = my_substr($lastpost_subject, 0, 25)."...";
}
$lastpost_subject = htmlspecialchars_uni($lastpost_subject);
$full_lastpost_subject = htmlspecialchars_uni($full_lastpost_subject);

Adaugă următoarele linii în faţa celei de mai sus:

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
    // Bring me the avatar for index (forumlist)
    $lang->load("avatarep", false, true);
    $id = '';
    $usuario = '';
    $forum['lastposter_avatar'] = '';
    
    //Revizamos la opcion activa
    if($mybb->settings['avatarep_active'] == '0' || $mybb->settings['avatarep_foros'] == '0')
    {
        return False;
    }    
               
    $id = '';
    $usuario = '';
    $forum['lastposter_avatar'] = '';  
 
    if($forum['lastposteruid'] != 0) 
    { 	
                    $query = $db->query("SELECT u.*, ug.namestyle FROM
                    " . TABLE_PREFIX . "users u
                    LEFT JOIN " . TABLE_PREFIX . "usergroups ug
                    ON ug.gid=u.usergroup
                    WHERE uid='{$lastpost_data['lastposteruid']}' LIMIT 1");  
    //Traemos los datos de nuestra consulta y  los asociamos con la id de usuario...
                        while($result=$db->fetch_array($query))
                           {
                                $id=$result['uid'];
                                $usuario=$result['username'];
                                $forum['lastposter_avatar']=$result['avatar'];
                                $forum['gid']=$result['usergroup'];
            			        $forum['uweb'] = $result['website'];
                                $forum['avatar']=$result['avatar'];
                                $forum['grupo']=$result['namestyle'];
                                $forum['lastposter_avatar']=$result['avatar'];
                           }

                           $fondo = $mybb->settings['avatarep_fondo'];
                           $marco = $mybb->settings['avatarep_marco'];
                           $ancho = $mybb->settings['avatarep_ancho'];
                           $alto = $mybb->settings['avatarep_alto'];

                           $lastpost_profilelink="<a href=\"member.php?action=profile&amp;uid=". $id. "\" id =\"miembro_".$forum['fid']."\">" . format_name($usuario, $forum['grupo'], $forum['gid']) . "</a>";
                          
   	// Si el usuario esta en un subforo, entonces...
   	if($forum['lastposter_avatar'] != '' && $usuario != '') {
	   $forum['lastposter_avatar'] = "<a href=\"member.php?action=profile&amp;uid=". $id. "\" id =\"member1_".$forum['fid']."\"><img src=\"{$forum['lastposter_avatar']}\" alt=\"Avatar\" title=\"".$lang->avatarep_user_before."{$usuario}".$lang->avatarep_user_after."\" style=\"width: {$ancho}; height: {$alto}; border-style: double; color: {$marco}; padding: 2px; background-color: {$fondo}; -moz-border-radius: 4px; webkit-border-radius: 4px;\" /></a>
<ul id=\"member1_".$forum['fid']."_popup\" style=\"width: 160px; background: #EFF2EE; box-shadow: 0px 4px 7px #777777; -moz-box-shadow: 0px 4px 7px #777777; -ms-box-shadow: 0px 4px 7px #777777; -webkit-box-shadow: 0px 4px 7px #777777; border-radius: 5px; -moz-border-radius: 5px; -ms-border-radius: 5px; -webkit-border-radius: 5px; display: none;\">

<li style=\"float: right; clear: right; list-style: none; margin-top: -18px; margin-right: 5px;\">
<a href=\"member.php?action=profile&amp;uid=". $id."\">
<img src=\"{$forum['lastposter_avatar']}\" alt=\"Avatar\" title=\"".$lang->avatarep_user_before."{$usuario}".$lang->avatarep_user_after."\" style=\"width: {$ancho}; height: {$alto}; border-style: double; color: {$marco}; padding: 2px; background-color: {$fondo}; -moz-border-radius: 4px; webkit-border-radius: 4px;\" />
</a>
</li>

<li style=\"float: left; clear: left; list-style: circle; text-decoration: none;\">
<img src=\"images/site_icons/profile.png\" alt=\"Pefil de Usuario\" />
<a href=\"member.php?action=profile&amp;uid=". $id."\">
<span style=\"color: #000000; font-size: 8pt; font-family:verdana;\">".$lang->avatarep_user_profile."</span>
</a>
</li>

<li style=\"float: left; clear: left; list-style: circle; text-decoration: none;\">
<img src=\"images/site_icons/blog.png\" alt=\"Mensajes de Usuario\" />
<a href=\"search.php?action=finduser&amp;uid=". $id."\" rel=\"nofollow\">
<span style=\"color: #000000; font-size: 8pt; font-family:verdana;\">".$lang->avatarep_user_messages."</span>
</a>
</li>

<li style=\"float: left; clear: left; list-style: circle; text-decoration: none;\">
<img src=\"images/site_icons/article.png\" alt=\"Enviar Mensaje Privado\" />
<a href=\"private.php?action=send&amp;uid=". $id."\" rel=\"nofollow\">
<span style=\"color: #000000; font-size: 8pt; font-family:verdana;\">".$lang->avatarep_user_sendpm."</span>
</a>
</li>

<li style=\"float: left; clear: left; list-style: circle; text-decoration: none;\">
<img src=\"images/site_icons/message.png\" alt=\"Enviar Correo\" />
<a href=\"member.php?action=emailuser&amp;uid=". $id."\" rel=\"nofollow\">
<span style=\"color: #000000; font-size: 8pt; font-family:verdana;\">".$lang->avatarep_user_sendemail."</span>
</a>
</li>

<li style=\"float: left; clear: left; list-style: circle; text-decoration: none;\">
<img src=\"images/site_icons/forum.png\" alt=\"Temas del Usuario\" />
<a href=\"search.php?action=finduserthreads&amp;uid=". $id."\" rel=\"nofollow\">
<span style=\"color: #000000; font-size: 8pt; font-family:verdana;\">".$lang->avatarep_user_threads."</span>
</a>
</li>

<li style=\"float: left; clear: left; list-style: circle; text-decoration: none;\">
<img src=\"images/site_icons/homepage.png\" alt=\"Sitio Web\" />
<a href=\"".$web."\" rel=\"nofollow\">
<span style=\"color: #000000; font-size: 8pt; font-family:verdana;\">".$lang->avatarep_user_web."</span>
</a>
</li>

</ul>
<script type=\"text/javascript\">if(use_xmlhttprequest == \"1\"){new PopupMenu(\"member1_".$forum['fid']."\");}</script>";
      }
  else{
 	   $forum['lastposter_avatar'] = "<a href=\"member.php?action=profile&amp;uid=". $id. "\" id =\"member1_".$forum['fid']."\"><img src=\"images/default_avatar.gif\" alt=\"Avatar\" title=\"".$lang->avatarep_user_before."{$usuario}".$lang->avatarep_user_after."\" style=\"width: {$ancho}; height: {$alto}; border-style: double; color: {$marco}; padding: 2px; background-color: {$fondo}; -moz-border-radius: 4px; webkit-border-radius: 4px;\" /></a>
<ul id=\"member1_".$forum['fid']."_popup\" style=\"width: 160px; background: #EFF2EE; box-shadow: 0px 4px 7px #777777; -moz-box-shadow: 0px 4px 7px #777777; -ms-box-shadow: 0px 4px 7px #777777; -webkit-box-shadow: 0px 4px 7px #777777; border-radius: 5px; -moz-border-radius: 5px; -ms-border-radius: 5px; -webkit-border-radius: 5px; display: none;\">

<li style=\"float: right; clear: right; list-style: none; margin-top: -18px; margin-right: 5px;\">
<a href=\"member.php?action=profile&amp;uid=". $id."\">
<img src=\"images/default_avatar.gif\" alt=\"Avatar\" title=\"".$lang->avatarep_user_before."{$usuario}".$lang->avatarep_user_after."\" style=\"width: {$ancho}; height: {$alto}; border-style: double; color: {$marco}; padding: 2px; background-color: {$fondo}; -moz-border-radius: 4px; webkit-border-radius: 4px;\" />
</a>
</li>

<li style=\"float: left; clear: left; list-style: none; text-decoration: none;\">
<img src=\"images/site_icons/profile.png\" alt=\"Pefil de Usuario\" />
<a href=\"member.php?action=profile&amp;uid=". $id."\">
<span style=\"color: #000000; font-size: 8pt; font-family:verdana;\">".$lang->avatarep_user_profile."</span>
</a>
</li>

<li style=\"float: left; clear: left; list-style: none; text-decoration: none;\">
<img src=\"images/site_icons/blog.png\" alt=\"Mensajes de Usuario\" />
<a href=\"search.php?action=finduser&amp;uid=". $id."\" rel=\"nofollow\">
<span style=\"color: #000000; font-size: 8pt; font-family:verdana;\">".$lang->avatarep_user_messages."</span>
</a>
</li>

<li style=\"float: left; clear: left; list-style: none; text-decoration: none;\">
<img src=\"images/site_icons/article.png\" alt=\"Enviar Mensaje Privado\" />
<a href=\"private.php?action=send&amp;uid=". $id."\" rel=\"nofollow\">
<span style=\"color: #000000; font-size: 8pt; font-family:verdana;\">".$lang->avatarep_user_sendpm."</span>
</a>
</li>

<li style=\"float: left; clear: left; list-style: none; text-decoration: none;\">
<img src=\"images/site_icons/message.png\" alt=\"Enviar Correo\" />
<a href=\"member.php?action=emailuser&amp;uid=". $id."\" rel=\"nofollow\">
<span style=\"color: #000000; font-size: 8pt; font-family:verdana;\">".$lang->avatarep_user_sendemail."</span>
</a>
</li>

<li style=\"float: left; clear: left; list-style: none; text-decoration: none;\">
<img src=\"images/site_icons/forum.png\" alt=\"Temas del Usuario\" />
<a href=\"search.php?action=finduserthreads&amp;uid=". $id."\" rel=\"nofollow\">
<span style=\"color: #000000; font-size: 8pt; font-family:verdana;\">".$lang->avatarep_user_threads."</span>
</a>
</li>

<li style=\"float: left; clear: left; list-style: none; text-decoration: none;\">
<img src=\"images/site_icons/homepage.png\" alt=\"Sitio Web\" />
<a href=\"".$web."\" rel=\"nofollow\">
<span style=\"color: #000000; font-size: 8pt; font-family:verdana;\">".$lang->avatarep_user_web."</span>
</a>
</li>

</ul>
<script type=\"text/javascript\">if(use_xmlhttprequest == \"1\"){new PopupMenu(\"member1_".$forum['fid']."\");}</script>";
    }    
  }

După ce ai făcut asta, salvează fişierul şi ai să vezi că a apărut şi pe index.

#9
am facut ce mi ai spus si mi a dat fatal eror...Am stat ceva sa il sterg sa mi mearga din nou.

Asa am facut...am adugat codul acela mai sus de primul
#10
Înlocuieşte acel fişier cu cel din ataşament. Am adăugat eu codul.
Nu uita să faci backup înainte!


Attached Files
.php   functions_forumlist.php (Size: 25.27 KB / Downloads: 25)


Forum Jump:


Users browsing this thread: 1 Guest(s)