Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Chaos Dragon on September 15, 2008, 11:55:26 PM

Title: location on post
Post by: Chaos Dragon on September 15, 2008, 11:55:26 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1404)

This mod will display a member's Location next to their posts

if you theme has its own  display.template.php


find

// Show the member's gender icon?
if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '')
echo '
', $txt[231], ': ', $message['member']['gender']['image'], '<br />';


after add

// Begin modification Location on posts
// Show the member's location
if ($message['member']['location'] != '')
echo '
', $txt[227], ': ', $message['member']['location'], '<br />';
// End modification
Title: Re: location on post
Post by: matasanos on September 18, 2008, 07:09:46 AM
good work!!

Title: Re: location on post
Post by: C.Jack on November 24, 2008, 12:43:08 PM
Thanks  :)

I edited <li location: to <li Location: so that it matched your Last Login in Post Mod. They're both great additions to the avatar area.
Title: Re: location on post
Post by: ModelBoatMayhem on January 22, 2009, 08:50:54 AM
Works for me too!
Nice and simple, thanks wdm2005

Martin - England.
Title: Re: location on post
Post by: SA™ on January 22, 2009, 04:08:48 PM
 :) thanks
Title: Re: location on post
Post by: Garry1953 on January 22, 2009, 06:25:43 PM
Works great
thanks
Title: Re: location on post
Post by: Cheese Head on February 15, 2009, 11:01:11 PM
Very nice Mod, installed on my SMF 2.0 RC1 as I have members from all around the world, works great.

One small question, on mine it shows as "location: etc" why isn't location spelt with a capital L as in Location?

Thanks again!
Title: Re: location on post
Post by: wmcintosh on February 16, 2009, 12:25:11 AM
I have this and reg date, both work great. Thanks.

Altered mine a bit, easy to do also, example (http://www.wmcintosh.com/forum/index.php?topic=51.0).
Title: Re: location on post
Post by: SA™ on February 17, 2009, 06:07:02 AM
@cheese head  idk dislexia maybe :P


@wmcintosh  your welcome
Title: Re: location on post
Post by: Cheese Head on February 17, 2009, 09:01:41 PM
@wmcintosh thanks for idea, I believe you added the Mod called date registerd in post.

@wdm2005, OK, so you had dislexia that day ;), I found where to edit it online in my display.template.php file.
Title: Re: location on post
Post by: wmcintosh on February 19, 2009, 12:00:51 AM
Quote from: Cheese Head on February 17, 2009, 09:01:41 PM
@wmcintosh thanks for idea, I believe you added the Mod called date registerd in post.

Correct, from same author (http://custom.simplemachines.org/mods/index.php?mod=1405).

Oops, didn't mean to go off-topic.
Title: Re: location on post
Post by: TDNY on May 21, 2009, 05:33:23 PM
This came just in time, thanks. I upgraded to 1.1.9 today and the last Location on post mod created by another member had to be removed.  Works great.
When is the new Affiliates coming for 1.1.9 :o
TD
Title: Re: location on post
Post by: noelchiew on May 26, 2009, 03:42:04 PM
Members with long location text entered causes the left section where the nick/avatar/no of posts are to be stretched to the right and the post section is hence narrowed. Anyway to prevent this? Can long locations be separated into 2 lines instead of 1?
Title: Re: location on post
Post by: SA™ on May 26, 2009, 08:28:40 PM
ill look into it
Title: Re: location on post
Post by: MCK on July 11, 2009, 01:58:13 AM
Hi, great mod. Thanks for the effort. On my RC 1-1 install somehow Location is displayed twice. Any ideas why?
Title: Re: location on post
Post by: SA™ on July 11, 2009, 06:30:08 PM
it was installed twice some how can you post up your display.template.php please?
Title: Re: location on post
Post by: MCK on July 11, 2009, 07:03:15 PM
Thanks. Problem solved. Removed it and reinstalled it and all is well. Great job!
Title: Re: location on post
Post by: teh_Krall on August 22, 2009, 05:45:35 PM
It would be really cool if you could use flags to represent users location instead of text.

Great mod otherwise :)
Title: Re: location on post
Post by: Chaos Dragon on August 22, 2009, 05:48:55 PM
Quote from: teh_Krall on August 22, 2009, 05:45:35 PM
It would be really cool if you could use flags to represent users location instead of text.

Great mod otherwise :)

I will be doing that after I get the bugs fixed on my new Mood System.
Title: Re: location on post
Post by: Eclipse16V on November 24, 2009, 07:36:21 AM
Is there any Update for SMF 2.0 RC2 ?
Thx
Title: Re: location on post
Post by: Chaos Dragon on November 25, 2009, 04:03:15 AM
I will try to have an update out by the end of the week.
Title: Re: location on post
Post by: SN on January 16, 2010, 11:30:14 AM
any update for this yet ?
Title: Re: location on post
Post by: Eclipse16V on January 22, 2010, 02:25:43 AM
Any news?
Title: Re: location on post
Post by: SA™ on January 22, 2010, 03:25:00 PM
it can be achived with one edit to display.template.php

find

[if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '' && !isset($context['disabled_fields']['gender']))
echo '
<li>', $txt['gender'], ': ', $message['member']['gender']['image'], '</li>';



aftert add

if ($message['member']['location'] != '')
echo '
<li>location: ', $message['member']['location'], '</li>';
Title: Re: location on post
Post by: Eclipse16V on March 15, 2010, 02:19:42 AM
Nice Mod

Please update it for SMF 2.0RC3  ;)

Thanks
Title: Re: location on post
Post by: nightyyx on October 12, 2010, 09:57:59 PM
it works for smf 1.1.11?
because it isnt reffered ...
Title: Re: location on post
Post by: NiceCarvings on June 28, 2012, 05:48:56 PM
Any way to get rid of the of this colon?  :

It displays before members location. I tried deleting it in the display.template.php and it took the whole site down.
Title: Re: location on post
Post by: ModelBoatMayhem on October 29, 2012, 10:25:10 AM
Does this Mod work on 2.0.2?


Title: Re: location on post
Post by: DSystem on May 22, 2013, 09:54:53 PM
Does this Mod work on 2.0.4?
Title: Re: location on post
Post by: Arantor on May 22, 2013, 09:56:05 PM
It hasn't been updated in 4 years, the answer is extremely unlikely.

Of course, if you were to disable the standard location field and create your own with the custom profile fields option, you could just add it anyway to the left area...
Title: Re: location on post
Post by: CheeseHead05 on May 23, 2013, 09:40:31 AM
Quote from: dsystem on May 22, 2013, 09:54:53 PM
Does this Mod work on 2.0.4?

dsystem,

Have you tried to emulate another smf version to get the mod to work?
Also, there is a Last Post and Location Mod that you can use and you can disable the Last Post part so that only the Location will show up in the forum profile.
Title: Re: location on post
Post by: Arantor on May 23, 2013, 09:54:44 AM
Or you could read my previous post and understand how to add it without having to use a mod at all...
Title: Re: location on post
Post by: DSystem on May 23, 2013, 07:34:57 PM
CheeseHead05. Compatibility mode doesn't work. But with a small change in the Mod to install. Posted here just to see if the author gave sign of life.

Now that the Arantor gave a great tip. Had not yet used the SMF custom fields. To implement this feature without the need to install any MOD.

How do I use the location field from when I created the Forum. Go to run a Mysql command to copy the contents of the field location for the new field. Next weekend I should be putting into practice Arantor's tip.

I saw that today the Arantor reached 51,000 posts today. I think soon it will go pro Guinness book. ;D

A year ago when I created my forum and I registered in SMF amazed me with your number of posts here, and even commented on my forum-> http://eletronicabr.com/eletrotreco/19/quem-e-este-membro-com-44-233-mensagens/610/
Title: Re: location on post
Post by: megaaxel2 on December 17, 2013, 11:27:26 AM
for smf 2.0.6 default theme (Curve), find
if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '' && !isset($context['disabled_fields']['gender']))
echo '
<li class="gender">', $txt['gender'], ': ', $message['member']['gender']['image'], '</li>';


and add after:

// Show the member's location
if ($message['member']['location'] != '')
echo '
<li>', $txt['location'], ': ', $message['member']['location'], '</li>';


word "location" will be replaced for your language, in sample, "Расположение" for russian.