IP address?

Post Reply

Topic author
dudenell
Active Member
Posts: 31
Joined: 19. December 2008 05:08
phpBB.com User: dudenell
Location: NY state
Contact:

IP address?

Post by dudenell »

I was hoping to put something on the front page (particularly in the menu if possible) that will display the users IP address. I can't seem to find a simple way to do this. It would just be
your IP is: 235.234.23.123
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: IP address?

Post by Kevin »

Code could be easily found with google. e.g. http://php.about.com/od/learnphp/p/what_my_ip.htm
Just search for "my ip script".
If you dont get along to implement it into the portal, just let me know.
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

Topic author
dudenell
Active Member
Posts: 31
Joined: 19. December 2008 05:08
phpBB.com User: dudenell
Location: NY state
Contact:

Re: IP address?

Post by dudenell »

alright well I had someone help me out with this, its for subsilver2, I'm sure it wont be hard to figure it out for prosilver

open portal.php
Find

Code: Select all

$load_center = true;
after add:

Code: Select all

$template->assign_vars(array('USERIP' => $_SERVER['REMOTE_ADDR']));
save the file and upload

Then open *your directory*/styles/subsilver2/template/portal/block/main_menu.html
find

Code: Select all

	<tr class="row1">
		<td>
			<a href="{U_TEAM}">{L_THE_TEAM}</a>
		</td>
	</tr>
after add

Code: Select all

	<tr class="row1">
		<td>
			Your IP: {USERIP}</a>
		</td>
	</tr>
clear the cache and you should have a display.
Post Reply

Return to “Modification Requests”