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
IP address?
-
- 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?
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.
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!
Kein Support per PN / No support via PM!
-
Topic author - Active Member
- Posts: 31
- Joined: 19. December 2008 05:08
- phpBB.com User: dudenell
- Location: NY state
- Contact:
Re: IP address?
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
after add:
save the file and upload
Then open *your directory*/styles/subsilver2/template/portal/block/main_menu.html
find
after add
clear the cache and you should have a display.
open portal.php
Find
Code: Select all
$load_center = true;
Code: Select all
$template->assign_vars(array('USERIP' => $_SERVER['REMOTE_ADDR']));
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>
Code: Select all
<tr class="row1">
<td>
Your IP: {USERIP}</a>
</td>
</tr>