When you use user icons,You must add user icon one by one, But when you have 1000 icons, It's a troublesome matter. And when user Edit they Profile, It 's a too large page to display it.
I make some modification. You only input a file name into user_icon field Which list in my icon lists (HTML).
The modification is :
In user_profile_basic.html
change
<tr>
<td align=right valign=top>
<%body_font%>Icon:<%/body_font%>
</td>
<td>
<table border=0 cellspacing=0 cellpadding=5 width="100%">
<tr valign=middle align=center>
<%set icon_cols = 4%>
<%-- The first iteration of this loop is empty - it is used for a "none" option --%>
<%loop icons%>
<td>
<table border=0 cellspacing=0 cellpadding=0>
<tr valign=center align=left>
<td>
<%if first%> <%else%><img src="<%image_url%>/<%icon_filename%>" align=middle><%endif%>
</td>
<td>
<input type=radio name=user_icon value="<%if first%><%else%><%icon_filename%><%endif%>"<%if user_icon eq $icon_filename%> checked<%endif%>>
</td>
</tr>
<tr>
<td colspan=2 align=center>
<%body_font%><%if first%>None<%else%><%icon_name%><%endif%><%/body_font%>
</td>
</tr>
</table>
</td>
<% if not last and not row_num % $icon_cols%>
</tr>
<tr valign=middle align=center>
<% elsif last and row_num % $icon_cols%>
<td colspan="<%row_num ~ $icon_cols%>">
</td>
<% endif%>
<%endloop%>
</tr>
</table>
</td>
</tr>
--%>
to
<tr>
<td align=right valign=top>
<%body_font%>User Icon:<%/body_font%>
</td>
<td><%body_font%><%if user_icon%><img src="<%image_url%>/icons/<%user_icon%>" align=top><%else%>no icon£¬<%endif%> icon file name£º<input type=text size=20 name=user_icon value="<%user_icon%>" class="button">
(<a href=<%image_url%>/icons.htm target=_blank>Click here to watch all icon list</a>)<%/body_font%></td>
</tr>
in Gforum/user.pm
Find the lines and comment it like this:
# my $good;
# for (values %{$CFG->{user_icons}}) {
# $good = 1, last if $value eq $_;
# }
# next unless $good;
# }
All Done.
But in Admin Display ,when you modify user's profile ,it will clear the user icon. And I dont know how to modify it.
So I suggest to modify user icon to my way.
Thanks.
I make some modification. You only input a file name into user_icon field Which list in my icon lists (HTML).
The modification is :
In user_profile_basic.html
change
Code:
<%GForum::User::icons('with blank')%> <tr>
<td align=right valign=top>
<%body_font%>Icon:<%/body_font%>
</td>
<td>
<table border=0 cellspacing=0 cellpadding=5 width="100%">
<tr valign=middle align=center>
<%set icon_cols = 4%>
<%-- The first iteration of this loop is empty - it is used for a "none" option --%>
<%loop icons%>
<td>
<table border=0 cellspacing=0 cellpadding=0>
<tr valign=center align=left>
<td>
<%if first%> <%else%><img src="<%image_url%>/<%icon_filename%>" align=middle><%endif%>
</td>
<td>
<input type=radio name=user_icon value="<%if first%><%else%><%icon_filename%><%endif%>"<%if user_icon eq $icon_filename%> checked<%endif%>>
</td>
</tr>
<tr>
<td colspan=2 align=center>
<%body_font%><%if first%>None<%else%><%icon_name%><%endif%><%/body_font%>
</td>
</tr>
</table>
</td>
<% if not last and not row_num % $icon_cols%>
</tr>
<tr valign=middle align=center>
<% elsif last and row_num % $icon_cols%>
<td colspan="<%row_num ~ $icon_cols%>">
</td>
<% endif%>
<%endloop%>
</tr>
</table>
</td>
</tr>
--%>
to
Code:
<tr>
<td align=right valign=top>
<%body_font%>User Icon:<%/body_font%>
</td>
<td><%body_font%><%if user_icon%><img src="<%image_url%>/icons/<%user_icon%>" align=top><%else%>no icon£¬<%endif%> icon file name£º<input type=text size=20 name=user_icon value="<%user_icon%>" class="button">
(<a href=<%image_url%>/icons.htm target=_blank>Click here to watch all icon list</a>)<%/body_font%></td>
</tr>
in Gforum/user.pm
Find the lines and comment it like this:
Code:
# elsif ($_ eq 'user_icon') { # my $good;
# for (values %{$CFG->{user_icons}}) {
# $good = 1, last if $value eq $_;
# }
# next unless $good;
# }
All Done.
But in Admin Display ,when you modify user's profile ,it will clear the user icon. And I dont know how to modify it.
So I suggest to modify user icon to my way.
Thanks.