• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

[SchmitzIT] Animated Userflags

SchmitzIT

Well-known member
#1
Disclaimer #1: These flags were not created by me. I got them from Cobro on vBulletin.org.
Disclaimer #2: The template edits required were earlier suggested by Ims in his "Flags of Countries" and by Dismounted in his XenMoods thread. I merely rewrote their instructions somewhat to put the flags in.
Disclaimer #3: I did not see this advertised yet, but if it has already been covered, I hereby apologize for the double-post.

Instructions: Unzip the countryflags-zip files and upload it to your xf folder. The images will be placed in /styles/default/userflags.

Then perform the following template edits.

In template message_user_info find:

Code:
<dd><a href="http://maps.google.com/maps?q={xen:urlencode {xen:string censor, $user.location}}" target="_blank" rel="nofollow" itemprop="address" class="concealed">{xen:string censor, $user.location}</a></dd>
Replace this with:

Code:
<dd><a href="http://maps.google.com/maps?q={xen:urlencode {xen:string censor, $user.location}}" target="_blank" rel="nofollow" itemprop="address" class="concealed">
         <img src="@imagePath/userflags/{xen:string censor, $user.location}.gif" alt="{xen:string censor, $user.location}" title="{xen:string censor, $user.location}" />
</a></dd>
In template member_view, find:

Code:
                <xen:if is="{$user.location}">
                    <dt>{xen:phrase location}:</dt>
                    <dd itemprop="address">{xen:string censor, $user.location}</dd>
                </xen:if>
Replace with:

Code:
                <xen:if is="{$user.location}">
                    <dt>{xen:phrase location}:</dt>
                    <dd itemprop="address"><img src="@imagePath/userflags/{xen:string censor, $user.location}.gif" alt="{xen:string censor, $user.location}" title="{xen:string censor, $user.location}" /></dd>
                </xen:if>
Finally, in template account_personal_details find:

Code:
<dd><input type="text" name="location" value="{$visitor.location}" id="ctrl_location" class="textCtrl OptOut" /></dd>
Replace this with the content of the enclosed textfile.


The first edits take care of displaying the image (can someone tell me what template message_user_info does exactly? I cannot seem to be able to find the edit I made there back anywhere. I listed it because it was also used by Ims.).

The last edit replaces the original "location" textbox in the Personal Details page with a dropdown boox containing all the individual countries.
 

Attachments