php forum
php mysql forum
php mysql smarty
 
Topic Options
#291632 - 04/14/01 07:22 AM ip icon (change gifs in CP) and hostname hack for ubb v6
The Team Offline
Moderator

Registered: 08/11/00
Posts: 182
Loc: yes
### 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') &#0124;&#0124; ($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') &#0124;&#0124; ($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 smile

Code:
code:

Top


Who's Online
0 registered (), 27 Guests and 12 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Spell Check [beta]
by Bill B
Yesterday at 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
Yesterday at 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
Yesterday at 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
Yesterday at 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
Active Topics.
by AllenAyres
11/11/08 02:13 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
David DelMonte, nick1, Begbie, cenk, MATTO
13363 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks