Page 1 of 1

Own IP on index

Posted: 14 Aug 2012, 09:59
by ShocK
Shows your own IP on the index page, can be useful for say a gaming forum where easy access to your own IP is sometimes handy.
Codes used are from Patschi and RMcGirr83

find in index.php

Code: Select all

// Assign index specific vars
$template->assign_vars(array(
   'TOTAL_POSTS'   => sprintf($user->lang[$l_total_post_s], $total_posts),
   'TOTAL_TOPICS'   => sprintf($user->lang[$l_total_topic_s], $total_topics),
Add after

Code: Select all

'USER_IP' => $user->ip,
The snippet used in index_body.html is {USER_IP}

I use it in stats and also as a link to UCP (If there isn't one near the bottom of the forum it saves scrolling up)

Code: Select all

<!-- IF not S_IS_BOT --><!-- IF S_USER_LOGGED_IN --><a href="{U_PROFILE}">{USER_IP}</a><!-- ENDIF --><!-- ENDIF -->
Image

Own IP on index

Posted: 14 Aug 2012, 11:25
by martin123456
Nice work but you do know you can do it with less code ;)

Here is an example
ip.png

Own IP on index

Posted: 14 Aug 2012, 11:53
by ShocK
Thanks but it's not my work, I've just sort of modged it together :)
Yeah I know this stuffs about - still find though that I have to move it all around to get it how I want - sort of modding the mods if you will.
Like this:
http://img29.imageshack.us/img29/2510/subnavp.png
http://img405.imageshack.us/img405/5576/statszq.png
Must say I'm impresed with that start date format you have there though :thumb:

Own IP on index

Posted: 14 Aug 2012, 12:01
by mikef35
Bl4d3 x wrote:Nice work but you do know you can do it with less code ;)

Here is an example
ip.png
Instead of posting a picture and using it to belittle him and his snippet, you should just show him your G-14 classified way of doing it. And if you nabbed it from a donator section then just state that so he knows at least where he can go find it. What good is just posting a picture from your board and saying it is better with no explanation?

Own IP on index

Posted: 14 Aug 2012, 12:17
by ShocK
I don't feel belittled and it's not really my snippet, but there may be a use for it for someone somewhere so.....there it is.
What's a " G-14 classified way"?

Own IP on index

Posted: 14 Aug 2012, 12:28
by martin123456
This post was made by mikef35 who is currently on your ignore list. Display this post.


Yeah i know shock i see the post on phpbb if you was a donator here you could also get another and much more simple way to do it ;) infact there is a few ways it can be done.

either way it works so good on you.

Edit and after looking at mikes post im not in the habit of posting any of stokers or rich's bits of snippets from the donator section ;)

other wise i would have give it.

edit i see the numb nuts edited his post about donator snipps :|