### for ubb6 ONLY !!! ### DO NOT USE for UBB 5 series !! ####
#IP icon and HOSTname resolve from ip address.
#
#this hack only allow ONLY gifs for ip wording. no wordlets involved.
#
#this hack removes wordlets for ip logging routine. it is your choice to use this hack.
#
#made by
#ELY M.
#
#
#
Do CP hack first for IP icon.. let you choose any icons for any forums...
### open up cp_styles.cgi (CGI_BIN File)
find this line
print FILE qq!mailgif => q^$in{mailgif}^,n!;
copy and paste this right under ^^^^^
print FILE qq!ipicon => q^$in{ipicon}^,n!;
** DO this TWICE !!!!! ***
There are two print FILE qq!mailgif => q^$in{mailgif}^,n!; in this script
####
If you want to make this ipicon required to fill in your CP
just add "ipicon" to your
#validate
my @ValidateArray = ("BGColor", "TextColor", "LinkColor", "ActiveLinkColor", "VisitedLinkColor", "TableStripTextColor", "TableColorStrip", "TimeColor", "AltColumnColor1", "AltColumnColor2", "CategoryStripColor", "CategoryStripTextColor", "CopyrightTextColor", "BBTitleFontColor", "FontFace", "TableWidth", "TextSize", "FDTextSize", "BBTitle", "BBTopic", "BBReply", "profilegif", "mailgif", "edit_icon", "reply_with_quote_icon", "homepage_icon", "forum_summ_on", "forum_summ_off", "TemplateName", "new_topic_folder", "old_topic_folder", "hot_new_topic_folder", "hot_old_topic_folder", "ubb_friend", "old_locked_folder", "hr_color", "TableBorderColor", "table_border_display", "new_locked_folder", "open_topic", "close_topic", "ubb_friend_mini", "move_topic", "delete_topic", "prev_topic", "next_topic", "search_graphic", "priv_message", "ipicon");
&Validate(@ValidateArray);
just optinal thing to do..
just do this twice if you want to.
##########################
###open up cp_vars_style.pl (TEMPLATE file)
find this line
&RegField (qq!Author Rating - 5
<IMG SRC="$vars_config{NonCGIURL}/$vars_style{user_ratings_5}" BORDER="0">
!, "user_ratings_5", "yes", "30", "60", "", "$vars_style{user_ratings_5}");
PASTE THIS AFTER ^^^^^^^
&RegField (qq!IP ICON
<IMG SRC="$vars_config{NonCGIURL}/$vars_style{ipicon}" BORDER=0>
!, "ipicon", "", "30", "60", "", "$vars_style{ipicon}");
################################ done with CP hack for ip icon #####
open up ubb_lib_posting.cgi (cgi-bin)
find those code
# IP
$ip_number = $thisline[7]; chomp($ip_number);
if (($vars_display{AuthorColumn} eq 'Minimum') || ($thisline[8] eq 'unreg')) {
$ip_divider = '';
} else {
$ip_divider = ' | ';
}
if (($ip_number ne '') && ($vars_misc{IP} eq 'ON')) {
$ip_wording = "$ip_divider $vars_wordlets{ip_logged}: $ip_number";
}
elsif ( ($ip_number ne '') && ($vars_misc{IP} eq 'LOGONLY')) {
$ip_wording = qq($ip_divider $vars_wordlets{ip}: <A HREF="$vars_config{CGIURL}/ultimatebb.cgi?ubb=get_ip&f=$forum_number&t=$topic_number&reply_num=$thisline[1]">$vars_wordlets{ip_logged}</A>);
} else {
$ip_wording = '';
}
replace the ip adddress routine with this
# IP
$ip_number = $thisline[7]; chomp($ip_number);
if (($vars_display{AuthorColumn} eq 'Minimum') || ($thisline[8] eq 'unreg')) {
$ip_divider = '';
} else {
$ip_divider = ' | ';
}
@digits = split (/./, $ip_number);
$address = pack ("C4", @digits);
$ThisDomain = gethostbyaddr ($address, 2);
if (($ip_number ne '') && ($vars_misc{IP} eq 'ON')) {
$ip_wording = "<img src=$vars_config{NonCGIURL}/$vars_style{ipicon} border=0 alt="IP: $ip_number ( $ThisDomain )">";
}
elsif ( ($ip_number ne '') && ($vars_misc{IP} eq 'LOGONLY')) {
$ip_wording = "<A HREF=$vars_config{CGIURL}/ultimatebb.cgi?ubb=get_ip&f=$forum_number&t=$topic_number&reply_num=$thisline[1]><img src=$vars_config{NonCGIURL}/$vars_style{ipicon} border=0></A>";
} else {
$ip_wording = '';
}
###########################################
open public_show_ip.pl (TEMPLATE file)))
PAste this under # UBB SHOW IP
@digits = split (/./, $ip_number);
$address = pack ("C4", @digits);
$ThisDomain = gethostbyaddr ($address, 2);
##
find $ip_number
then put ( $ThisDomain ) by $ip_number
like this
<TD>
<B><FONT FACE="$vars_style{FontFace}" SIZE="$vars_style{TextSize}">$ip_number ( $ThisDomain ) </FONT></B>
</td></tr>
#######
that is it !!! you should see nice gifs for Ip's logged stuff after you set up them in your CP.
### go in your CP and choose the gif for your ip icon ###
make sure the gif you have for ip icon is in noncgi or images directory.
go in style templates and choose style temple to view/edit
you have many choices in ubb_lib_posting.cgi
you could use ALT="IP: $ip_number ( $ThisDomain )"
in your img src and see the ip's easily. in the ubb_lib_posting.cgi
dirty work