• [Mod] Avatar v2.01 5 0 5 1
Currently:  

Author Topic: [Mod] Avatar v2.01  (Read 537984 times)

0 Members and 2 Guests are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Avatar v2.01
« Reply #90 on: March 16, 2005, 02:33:47 PM »
to fix double "custom" items in the list, redo step 1.4 I just updated it.
the tags are shown only on 4images v1.7.1 and the fix is lost after the hack...we'r working on restoring it.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Avatar v2.01
« Reply #91 on: March 16, 2005, 02:48:46 PM »
made a misstake in step 3.x ?

I havent check this mod after the hack, it might have some bugs...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Avatar v2.01
« Reply #92 on: March 16, 2005, 02:55:33 PM »
the tags are shown only on 4images v1.7.1 and the fix is lost after the hack...we'r working on restoring it.
there u go:
http://www.4homepages.de/forum/index.php?topic=6806.0
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline oswald

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: [Mod] Avatar v2.01
« Reply #93 on: March 16, 2005, 03:05:57 PM »
Great, thanx! :)

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [Mod] Avatar v2.01
« Reply #94 on: April 05, 2005, 08:56:16 PM »
Hi V@no why I don't see the avatar on the coments

This is my comment_bits.html
Code: [Select]
<tr>
  <td class="commentrow{row_bg_number}" valign="top" nowrap="nowrap">
    <b>{comment_user_name}</b><br>{user_avatar_current}<br>
{endif user_avatar_current}<br>{if comment_user_ip}<br/>
{comment_user_info}
{if user_avatar_current} <br /><br /><b>IP:</b> {comment_user_ip}{endif comment_user_ip}
  </td>
  <td width="100%" class="commentrow{row_bg_number}" valign="top">
    </p>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td valign="top"><b>{comment_headline}</b></td>
        <td valign="top" align="right">{if admin_links}{admin_links}{endif admin_links}</td>
      </tr>
    </table>
    <hr size="1" />
    {comment_text}
  </td>
</tr>
<tr>
  <td nowrap="nowrap" bgcolor="#D3DCEB">
    <span class="smalltext">{comment_date}</span>
  </td>
  <td bgcolor="#D3DCEB">
    {comment_user_status_img}
    {comment_user_profile_button}
    {comment_user_email_button}
    {comment_user_homepage_button}
    {comment_user_icq_button}
  </td>
</tr>
<tr>
  <td colspan="2" class="commentspacerrow"><img src="{template_url}/images/spacer.gif" width="1" height="1" alt="" /></td>
</tr>

And I also want to show the avatar in the member list how can i do that?

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [Mod] Avatar v2.01
« Reply #95 on: April 06, 2005, 04:29:20 AM »
Hi V@no How can I put this in the register_form.html
 
Code: [Select]
<TD colspan="2" class="head1">{lang_avatar}</TD>
         </TR>

<TR>
<TD class="row2" valign="top" width="35%">
{if user_avatar_file}
<B>{lang_avatar_file}</B><BR />
<SPAN class="smalltext">
<B>{lang_avatar_dim}</B>
</SPAN>
<BR>
<b>{lang_or}</b><BR>
{endif user_avatar_file}
<B>
{lang_avatar_select}
</B>
</TD>
           <TD class="row2" width="64%">
{if user_avatar_file}
{lang_upload}
             <INPUT type="file" name="avatar_file"  size="30" class="input" />
<p>&nbsp;</p>
<table border="0" width="100%">
<tr>
<td width="50%">{endif user_avatar_file}
<SELECT name="user_avatar" size="6" onkeypress="if(window.event.keyCode==13){ this.form.submit(); }" onChange="document.images.icons.src='{template_url}/avatars/'+document.creator.user_avatar.options[document.creator.user_avatar.selectedIndex].value;">{user_avatar_images}</SELECT>
</td>
<td>&nbsp;<TABLE width="100%" height="100" border="0">
<TR>
<TD align="center">
{user_avatar_current}
</TD>
</TR>
</TABLE>
<p>&nbsp;</td>
</tr>
</table>
</TD>

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Avatar v2.01
« Reply #96 on: April 06, 2005, 05:12:52 AM »
sorry, u cant without modifying register.php
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [Mod] Avatar v2.01
« Reply #97 on: April 07, 2005, 12:41:27 AM »
Avatars in Register Form

What this do is to allow the new users selet the avatar they want when they register.

 :arrow: What u have to do is this:

Open register.php:

Find the last:
Code: [Select]
$site_template->register_vars(array(
Replace:
Code: [Select]
//-----------------------

//------ Avatar ---------

//-----------------------

if ($config['avatar_use']){

$images = "";

$checked = ($user_avatar == "blank.gif" || $user_avatar == "") ? " selected" : "";

$images .= "\n<option value=\"blank.gif\"$checked>none</option>\n";

$dir = opendir(TEMPLATE_PATH."/avatars/users/");

while ($contents[] = readdir($dir)){;}

closedir($dir);

natcasesort ($contents);

foreach ($contents as $line){

$filename = substr($line,0,(strlen($line)-strlen(strrchr($line,"."))));

if ($filename == $user_info['user_id']) {

$checked = (stristr($user_avatar, "users/")) ? " selected" : "";

$images .= "\n<option value=\"users/$line\"$checked>".$lang['custom']."</option>\n";

}

}

$dir = opendir(TEMPLATE_PATH."/avatars/");

$contents = array();

while ($contents[] = readdir($dir)){;}

closedir($dir);

natcasesort ($contents);

$checked = "";

foreach ($contents as $line){

$filename = substr($line,0,(strlen($line)-strlen(strrchr($line,"."))));

$extension = substr(strrchr($line,"."), 1);

$checked = "";

if ($line == $user_avatar) { $checked = " selected"; }

if (strcasecmp($extension,"gif")==0 || strcasecmp($extension,"jpg")==0 || strcasecmp($extension,"jpeg")==0 || strcasecmp($extension,"png")==0 ){

if ($line != "blank.gif") {

$filename = str_replace("_", " ", $filename);

$images .= "<option value=\"$line\"$checked>$filename</option>\n";

}

}

}

}

//----------------------

//----- End Avatar -----

//----------------------

$site_template->register_vars(array(

"lang_avatar" => $lang['avatar'],

"lang_avatar_file" => $lang['avatar_file'],

"lang_avatar_dim" => $lang['avatar_max_dim']." ".$config['avatar_width']."x".$config['avatar_height'].$lang['px'],

"lang_avatar_select" => $lang['avatar_select'],

"user_avatar_images" => $images,

"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_avatar == "") ? "blank.gif" : $user_avatar)."\" name=\"icons\" border=\"0\" alt=\"\">" : "",

"lang_or" => $lang['or'],

"user_avatar_file" => $config['avatar_user_custom'],

Save changes.

Open templates/<your_templates>/register_form.html:

Include:

Code: [Select]
<td colspan="3">{if user_avatar_images}
              <tr>
                <td class="row2" valign="top" colspan="3">{if user_avatar_file} <b>{lang_avatar_file}&nbsp;&nbsp;&nbsp;
                  </b><span class="smalltext"><b>(</b>{lang_avatar_dim}<b>)</b></span>
                </td>
                <td class="row2">{if user_avatar_file} {lang_upload} <input type="file" name="avatar_file" size="30" class="input" />
                 
                </td>
              </tr>
              <tr>
                <td class="row1" colspan="3" >
                  <b><font color="#5CE960">O bien</font></b>  , {endif
                  user_avatar_file} <b>{lang_avatar_select}&nbsp;&nbsp;&nbsp;&nbsp;
                  </b>{endif user_avatar_file} <select name="user_avatar"  onkeypress="if(window.event.keyCode==13){ this.form.submit(); }" onChange="document.images.icons.src='{template_url}/avatars/'+document.creator.user_avatar.options[document.creator.user_avatar.selectedIndex].value;">
                 
                 
                  {user_avatar_images}
                  </select></td>
                <td class="row1">{user_avatar_current}
                 
                </td>
              </tr>
              <tr>
                <td colspan="3">{endif user_avatar_images}
               </td>

If you see some errors tell me. But it does work :) I hope this helpin the future

Offline leedzinh

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: [Mod] Avatar v2.01
« Reply #98 on: May 05, 2005, 08:01:23 PM »
great mod but i have a problem when
Allow users use their own avatars is "no"
member can upload avatar i dont know why
please help me
thanks

Offline leedzinh

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: [Mod] Avatar v2.01
« Reply #99 on: May 07, 2005, 09:14:06 AM »
help me please

Offline universal

  • Full Member
  • ***
  • Posts: 213
    • View Profile
    • http://www.funny.lt
Re: [Mod] Avatar v2.01
« Reply #100 on: May 07, 2005, 09:17:30 AM »
is these in the place?

Code: [Select]
{if user_avatar_images}

...

{endif user_avatar_images}

I can`t imagine how they can upload...
Again this addres?!
http://www.funny.lt

Offline Joshi

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: [Mod] Avatar v2.01
« Reply #101 on: June 06, 2005, 07:48:16 PM »
Hi!

Long time since I've been here, didn't really understand wheter there is a way to show the person who is logged in on the front page with an avatar. Next to the user name. Example:

Logged in as: Pete
(image of pete)

anyway to achieve this?

J

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline knuffi

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: [Mod] Avatar v2.01
« Reply #103 on: June 13, 2005, 09:58:11 PM »
Hallo
Habe alles so installiert.... Es funktioniert soweit auch aber es zeigt mir folgendes an

{if user_avatar_file} Upload avatar:
Max. allowed 50x50px
ODER
{endif user_avatar_file} Select from the list:  {if user_avatar_file} 

{endif user_avatar_file} 

Ich bringe diese  ({if user_avatar_file} und {endif user_avatar_file}) nicht weg ohne dass der Upload nicht mehr funktioniert...
Diese erscheinen gleich 2 mal auf der Seite wo man die Avatar uploaden kann.

Wer weis rat

Danke

Hans-Ruedi

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Avatar v2.01
« Reply #104 on: June 14, 2005, 12:05:48 AM »
its in bug fixes
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)