Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
### 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:

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)