osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Who's Online Enhancement

This is a discussion on Who's Online Enhancement within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; To avoid more conflicts with the FUNTION ALREADY DEFINED for old users, I have made a simply modification: From: Code: ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > New osCommerce Contributions

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 02-28-2007, 01:10 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 11,086
Thanks: 81
Thanked 348 Times in 327 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Post Who's Online Enhancement

To avoid more conflicts with the FUNTION ALREADY DEFINED for old users, I have made a simply modification:

From:

Code:
// Added by Erick Cedano aka Graphicore.

function tep_get_ip_address() {
     if (isset($_SERVER)) {
       if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
         $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
       } elseif (isset($_SERVER['HTTP_CLIENT_IP'])) {
         $ip = $_SERVER['HTTP_CLIENT_IP'];
       } else {
         $ip = $_SERVER['REMOTE_ADDR'];
       }
     } else {
       if (getenv('HTTP_X_FORWARDED_FOR')) {
         $ip = getenv('HTTP_X_FORWARDED_FOR');
       } elseif (getenv('HTTP_CLIENT_IP')) {
         $ip = getenv('HTTP_CLIENT_IP');
       } else {
         $ip = getenv('REMOTE_ADDR');
       }
     }
   }
to:


Code:
// Added by Erick Cedano aka Graphicore.

if (function_exists('tep_get_ip_address')) {
   // Funtion already exist
} else {
function tep_get_ip_address() {
     if (isset($_SERVER)) {
       if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
         $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
       } elseif (isset($_SERVER['HTTP_CLIENT_IP'])) {
         $ip = $_SERVER['HTTP_CLIENT_IP'];
       } else {
         $ip = $_SERVER['REMOTE_ADDR'];
       }
     } else {
       if (getenv('HTTP_X_FORWARDED_FOR')) {
         $ip = getenv('HTTP_X_FORWARDED_FOR');
       } elseif (getenv('HTTP_CLIENT_IP')) {
         $ip = getenv('HTTP_CLIENT_IP');
       } else {
         $ip = getenv('REMOTE_ADDR');
       }
     }
   }
}
Now I hope this keep everyone (old and New users) happy.


More...
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Who's Online Enhancement michael_s New osCommerce Contributions 0 02-26-2007 04:00 PM
Who's Online Enhancement michael_s New osCommerce Contributions 0 02-24-2007 12:02 AM
Who's Online Enhancement michael_s New osCommerce Contributions 0 02-22-2007 09:53 PM
Who's Online Enhancement michael_s New osCommerce Contributions 0 02-20-2007 08:03 AM
Who's Online Enhancement michael_s New osCommerce Contributions 0 02-13-2007 02:50 PM


All times are GMT -8. The time now is 01:18 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax