Country Flags by IP Address [Deleted]

Oh, hang on... :whistle: Perhaps I did. I vaguely remember something, but for the life of me can't remember what...

Which is the best button to click to sort this?
Resolve using parent version.

The edit you did was you removed the margin-right:10px; part from the template. You would have to do that again after resolving.
 
I can't duplicate the problem.

Have you tried leaving the country flags add-on enabled and disabling all other add-ons?

The county flags add-on does not access the 'allow_view_profile' field.

It does join the 'xf_user_privacy' table to the post query, but it does it in a fashion that keeps the parent joins intact.
 
You need to edit the 'message_user_info (Adds country flag below user name in posts)' template modification and put the image in a <div>.
I'm sorry but could you help me doing it? I'm not familiar with the codes. Here's the codes for, message_user_info
Code:
<xen:require css="message_user_info.css" />

<div class="messageUserInfo" itemscope="itemscope" itemtype="http://data-vocabulary.org/Person">   
<div class="messageUserBlock {xen:if $user.isOnline, online}">
    <xen:hook name="message_user_info_avatar" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
        <div class="avatarHolder">
            <span class="helper"></span>
            <xen:avatar user="$user" size="m" img="true" />
            <xen:if is="{$user.isOnline}"><span class="Tooltip onlineMarker" title="{xen:phrase online_now}" data-offsetX="-22" data-offsetY="-8"></span></xen:if>
            <!-- slot: message_user_info_avatar -->
        </div>
    </xen:hook>

<xen:if is="!{$isQuickReply}">
    <xen:hook name="message_user_info_text" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
        <h3 class="userText">
            <xen:username user="$user" itemprop="name" rich="true" />
            <xen:if hascontent="true"><em class="userTitle" itemprop="title"><xen:contentcheck>{xen:helper userTitle, $user, 1, 1}</xen:contentcheck></em></xen:if>
            {xen:helper userBanner, $user, 'wrapped'}
            <!-- slot: message_user_info_text -->
        </h3>
    </xen:hook>
       
    <xen:if hascontent="true">
        <div class="extraUserInfo">
            <xen:contentcheck>
            <xen:hook name="message_user_info_extra" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
                <xen:if is="@messageShowRegisterDate AND {$user.user_id}">
                    <dl class="pairsJustified">
                        <dt>{xen:phrase joined}:</dt>
                        <dd>{xen:date $user.register_date}</dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowMessageCount AND {$user.user_id}">
                    <dl class="pairsJustified">
                        <dt>{xen:phrase messages}:</dt>
                        <dd><a href="{xen:link search/member, '', 'user_id={$user.user_id}'}" class="concealed" rel="nofollow">{xen:number $user.message_count}</a></dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowTotalLikes AND {$user.user_id}">
                    <dl class="pairsJustified">
                        <dt>{xen:phrase likes_received}:</dt>
                        <dd>{xen:number $user.like_count}</dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowTrophyPoints AND {$user.user_id}">
                    <dl class="pairsJustified">
                        <dt>{xen:phrase trophy_points}:</dt>
                        <dd><a href="{xen:link 'members/trophies', $user}" class="OverlayTrigger concealed">{xen:number $user.trophy_points}</a></dd>
                    </dl>
                </xen:if>
           
                <xen:if is="@messageShowGender AND {$user.gender}">
                    <dl class="pairsJustified">
                        <dt>{xen:phrase gender}:</dt>
                        <dd itemprop="gender"><xen:if is="{$user.gender} == 'male'">{xen:phrase male}<xen:else />{xen:phrase female}</xen:if></dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowOccupation AND {$user.occupation}">
                    <dl class="pairsJustified">
                        <dt>{xen:phrase occupation}:</dt>
                        <dd itemprop="role">{xen:string censor, $user.occupation}</dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowLocation AND {$user.location}">
                    <dl class="pairsJustified">
                        <dt>{xen:phrase location}:</dt>
                        <dd><a href="{xen:link 'misc/location-info', '', 'location={xen:string censor, $user.location, '-'}'}" target="_blank" rel="nofollow" itemprop="address" class="concealed">{xen:string censor, $user.location}</a></dd>
                    </dl>
                </xen:if>
           
                <xen:if is="@messageShowHomepage AND {$user.homepage}">
                    <dl class="pairsJustified">
                        <dt>{xen:phrase home_page}:</dt>
                        <dd><a href="{xen:string censor, $user.homepage, '-'}" rel="nofollow" target="_blank" itemprop="url">{xen:string censor, $user.homepage}</a></dd>
                    </dl>
                </xen:if>
                           
            </xen:hook>           
            <xen:if is="@messageShowCustomFields AND {$user.customFields}">
            <xen:hook name="message_user_info_custom_fields" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
           
                <xen:foreach loop="$userFieldsInfo" key="$fieldId" value="$fieldInfo">
                    <xen:if is="{$fieldInfo.viewable_message} AND ({$fieldInfo.display_group} != 'contact' OR {$user.allow_view_identities} == 'everyone' OR ({$user.allow_view_identities} == 'members' AND {$visitor.user_id}))">
                        <xen:if hascontent="true">
                            <dl class="pairsJustified userField_{$fieldId}">
                                <dt>{xen:helper userFieldTitle, $fieldId}:</dt>
                                <dd><xen:contentcheck>{xen:helper userFieldValue, $fieldInfo, $user, {$user.customFields.{$fieldId}}}</xen:contentcheck></dd>
                            </dl>
                        </xen:if>
                    </xen:if>
                </xen:foreach>
               
            </xen:hook>
            </xen:if>
            </xen:contentcheck>
        </div>
    </xen:if>
       
</xen:if>

    <span class="arrow"><span></span></span>
</div>
</div>
 
Change what's in the Replace box to this...

Code:
<xen:if is="(((({$user.snog_flag_view} == 'members' && {$visitor.user_id} >= 1) || {$user.snog_flag_view} == 'everyone') && {xen:helper ismemberof, $visitor, $xenOptions.snog_countryflags_groups}) || {$visitor.is_admin} || ({$xenOptions.snog_countryflags_moderator} && {$visitor.is_moderator})) && {$xenOptions.snog_countryflags_below} && {$user.snog_flag}"> <div style="text-align:center;"><img class="userflagimage flag-{$user.snog_flag} Tooltip" style="margin-top:5px" src="data/countryflags/flags/clear.gif" alt="{xen:helper country,$user.snog_flag}" title="{xen:helper country,$user.snog_flag}" /></div></xen:if>
 
Change what's in the Replace box to this...

Code:
<xen:if is="(((({$user.snog_flag_view} == 'members' && {$visitor.user_id} >= 1) || {$user.snog_flag_view} == 'everyone') && {xen:helper ismemberof, $visitor, $xenOptions.snog_countryflags_groups}) || {$visitor.is_admin} || ({$xenOptions.snog_countryflags_moderator} && {$visitor.is_moderator})) && {$xenOptions.snog_countryflags_below} && {$user.snog_flag}"> <div style="text-align:center;"><img class="userflagimage flag-{$user.snog_flag} Tooltip" style="margin-top:5px" src="data/countryflags/flags/clear.gif" alt="{xen:helper country,$user.snog_flag}" title="{xen:helper country,$user.snog_flag}" /></div></xen:if>

Where can I find the Replace Box?
 
Where can I find the Replace Box?
You should be editing the template modification not the template itself.

Admin->Appearance->Template Modifications

Look for the modification 'message_user_info (Adds country flag below user name in posts)'

You will need to put your site into debug mode to edit the modification.
 
You should be editing the template modification not the template itself.

Admin->Appearance->Template Modifications

Look for the modification 'message_user_info (Adds country flag below user name in posts)'

You will need to put your site into debug mode to edit the modification.

I changed it but the username is gone..
upload_2015-6-11_16-21-31.webp
 
I changed it but the username is gone..
My bad, I thought you would just replace the single line. You replaced the entire replace box.

Change what's in the replace box to this...

Code:
$0
<xen:if is="(((({$user.snog_flag_view} == 'members' && {$visitor.user_id} >= 1) || {$user.snog_flag_view} == 'everyone') && {xen:helper ismemberof, $visitor, $xenOptions.snog_countryflags_groups}) || {$visitor.is_admin} || ({$xenOptions.snog_countryflags_moderator} && {$visitor.is_moderator})) && {$xenOptions.snog_countryflags_below} && {$user.snog_flag}"> <div style="text-align:center;"><img class="userflagimage flag-{$user.snog_flag} Tooltip" style="margin-top:5px" src="data/countryflags/flags/clear.gif" alt="{xen:helper country,$user.snog_flag}" title="{xen:helper country,$user.snog_flag}" /></div></xen:if>
 
My bad, I thought you would just replace the single line. You replaced the entire replace box.

Change what's in the replace box to this...

Code:
$0
<xen:if is="(((({$user.snog_flag_view} == 'members' && {$visitor.user_id} >= 1) || {$user.snog_flag_view} == 'everyone') && {xen:helper ismemberof, $visitor, $xenOptions.snog_countryflags_groups}) || {$visitor.is_admin} || ({$xenOptions.snog_countryflags_moderator} && {$visitor.is_moderator})) && {$xenOptions.snog_countryflags_below} && {$user.snog_flag}"> <div style="text-align:center;"><img class="userflagimage flag-{$user.snog_flag} Tooltip" style="margin-top:5px" src="data/countryflags/flags/clear.gif" alt="{xen:helper country,$user.snog_flag}" title="{xen:helper country,$user.snog_flag}" /></div></xen:if>

Thank you so much! It's a really great add-on..;)
 
Hi @Snog ,

I installed the addition by following instruction provided, but once installed, addition messed up members avatars.
Check out this image.
image proof.webp
I uninstalled it, but everything remained the same, any ideas how to fix it?
 
Hi @Snog ,

I installed the addition by following instruction provided, but once installed, addition messed up members avatars.
Check out this image.

I uninstalled it, but everything remained the same, any ideas how to fix it?
I've never seen that happen, and the country flags add-on does not change anything in the side bar display. So I have no idea what is causing that.

Did you get any errors while installing the add-on?
What version of XF are you running?
Do you have any add-ons that modify the sidebar?

If you uninstalled the add-on, then it should no longer be running and again, I have no idea why that happened to your sidebar.

Perhaps it's a caching issue.
 
I understand, but it happened when I installed this plugin. I tried installing it and reinstalling it, but nothing changes.
I checked out templates, no outdated ones. I do not use any sort of caching as well.
Its not only in sidebar, its on all avatars, no matter where they are shown.
 
I understand, but it happened when I installed this plugin. I tried installing it and reinstalling it, but nothing changes.
I checked out templates, no outdated ones. I do not use any sort of caching as well.
Its not only in sidebar, its on all avatars, no matter where they are shown.
If you send me a temporary user name and password with admin status for your site I'll take a look to see what I can find.

But, the country flags add-on does not do anything with the avatars.
 
Hi. Before I begin to install all the pre-requisites on the server, could anyone please tell me:

1) Is it possible to make only the administrator and moderators see the flags? I want to respect the members' privacy.
2) If a person registers and logs in from multiple countries, is it possible to show multiple flags? That would be a killer feature to detect spammers on the fly.
 
Back
Top Bottom