Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

country flags

Asked Modified Viewed 3,040 times
J
Jebajseti
J
  • Junior Member, joined since
  • Contributed 32 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
asked
Junior Member

Hi,

i would like that on every site where ever is name included there would be infront flag of user country

like here http://www.gamestv.org/event/26636-next-evolution-esc-vs-teamoxid/#comment834317

how to achieve that goal?

Regards
0 replies

9 posts

W
Webzone
W
I have never been in Disneyland wink
  • Junior Member, joined since
  • Contributed 11 posts on the community forums.
  • Started 3 threads in the forums
answered
Junior Member

If i would like to apply this flags to the forum, but below the user avatar and without showing the name beside it. And would like it to show the locale name of the country too? (mouse over effect)
How can that be done?

The locale files in applied together with the User fields doesn't show in the profile site either.
0 replies
— 2 years earlier —
J
Jebajseti
J
  • Junior Member, joined since
  • Contributed 32 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
answered
Junior Member

ok thanks it works ill need to make a bit edit on some sites but just that it works. Ty m8
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

Oh man ! That was due to Smileys Parsing in the Post... Now I have Disabled smileys in my above post ! Try that Code now ! ;)
0 replies
J
Jebajseti
J
  • Junior Member, joined since
  • Contributed 32 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
answered
Junior Member

hi thanks for reply i get errors with that

Parse error: syntax error, unexpected '<', expecting ')' in /htdocs/maincore.php on line 658

line 658:

function profile_link($user_id, $user_name, $user_status, $class = "profile-link"<img src="../images/smiley/wink.gif" alt="Wink" style="vertical-align:middle;"> {
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

Try this ! Replace your profile_link function in your maincore.php with the given below :

function profile_link($user_id, $user_name, $user_status, $class = "profile-link") {
   global $locale, $settings;
   $country = dbresult(dbquery("SELECT user_country FROM ".DB_USERS." WHERE user_id='".$user_id."'"),0);
   $country = strtolower($country);
   $showcountry = "<img src='".IMAGES."user_flags/".$country.".png' alt='".$country."' /> \n";

   $class = ($class ? " class='$class'" : "");

   if ((in_array($user_status, array(0, 3, 7)) || checkrights("M")) && (iMEMBER || $settings['hide_userprofiles'] == "0")) {
      $link = $showcountry."<a href='".BASEDIR."profile.php?lookup=".$user_id."'".$class.">".$user_name."</a>";
   } elseif ($user_status == "5" || $user_status == "6") {
      $link = $locale['user_anonymous'];
   } else {
      $link = $user_name;
   }

   return $link;
}


Merged on Jul 15 2011 at 12:31:52:
[ Moved to Modification and Requests ]
Edited by Chan on 21-09-2019 03:13,
0 replies
J
Jebajseti
J
  • Junior Member, joined since
  • Contributed 32 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
answered
Junior Member

thanks will take a look

Merged on Jul 02 2011 at 19:51:29:
well i tried like

profile_link($user_data['user_country'], $member['user_id'],


and didnt get any affect with it

Merged on Jul 14 2011 at 23:46:19:
can anyone help please
Edited by Chan on 21-09-2019 03:13,
0 replies
H
HobbyMan
H
Just some Guy
  • Veteran Member, joined since
  • Contributed 1,486 posts on the community forums.
  • Started 91 threads in the forums
answered
Veteran Member

maincore.php

Lines 880-895
0 replies
J
Jebajseti
J
  • Junior Member, joined since
  • Contributed 32 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
answered
Junior Member

where is that function? ty for fast reply btw
0 replies
H
HobbyMan
H
Just some Guy
  • Veteran Member, joined since
  • Contributed 1,486 posts on the community forums.
  • Started 91 threads in the forums
answered
Veteran Member

Here's a user field that will display a flag in profile. To display it every where would require modification of profile_link function



-- User Country --
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 9 posts
  • Votes 0 votes
  • Topic users 4 members

4 participants

H
H
Just some Guy
  • Veteran Member, joined since
  • Contributed 1,486 posts on the community forums.
  • Started 91 threads in the forums
W
W
I have never been in Disneyland wink
  • Junior Member, joined since
  • Contributed 11 posts on the community forums.
  • Started 3 threads in the forums
A
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
J
J
  • Junior Member, joined since
  • Contributed 32 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet