Own IP on index

Mods, snippets and styles postet and supported by the users
Forum rules
As the forum title says this is for User Contributions
Post a support request in this forum and you will be banned!
Locked
ShocK
BBCoder II
BBCoder II
Posts: 10
Joined: 30 Nov 2011, 10:17
BBCodes: 20
Favourite MOD: Board3 Portal
Location: England
Contact:

Own IP on index

Post 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
User avatar
martin123456
BBCoder VI
BBCoder VI
Posts: 765
Joined: 25 Jul 2011, 13:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!
Contact:

Own IP on index

Post by martin123456 »

Nice work but you do know you can do it with less code ;)

Here is an example
ip.png
ShocK
BBCoder II
BBCoder II
Posts: 10
Joined: 30 Nov 2011, 10:17
BBCodes: 20
Favourite MOD: Board3 Portal
Location: England
Contact:

Own IP on index

Post 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:
User avatar
mikef35
BBCoder III
BBCoder III
Posts: 147
Joined: 23 Feb 2012, 21:45

Own IP on index

Post 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?
Last edited by mikef35 on 15 Aug 2012, 00:35, edited 3 times in total.
ShocK
BBCoder II
BBCoder II
Posts: 10
Joined: 30 Nov 2011, 10:17
BBCodes: 20
Favourite MOD: Board3 Portal
Location: England
Contact:

Own IP on index

Post 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"?
User avatar
martin123456
BBCoder VI
BBCoder VI
Posts: 765
Joined: 25 Jul 2011, 13:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!
Contact:

Own IP on index

Post 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 :|
Locked