News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

CountryFlags

Started by SMFHacks.com Team, August 14, 2006, 01:07:43 PM

Previous topic - Next topic

brianjw

Quote from: TrueSatan on May 16, 2007, 10:25:45 PM
Brian...if you'll post your Display.template.php file I'll have a look at it for you and see if I can put this mod into it...BTW I think Chunky was trying to say that you have modified the file by installing other mods...he/she's quite right.

If I'm able to fix that file then you'll need to follow this procedure:

Backup your database and files
Install the mod ignoring the error in Display.template.php
Rename the existing Display.template.php and leave it on the server (call it Display.template.php-flag so you know what the file is if you need it at a later date)
Via ftp upload the fixed Display.template.php I'll give you

Not difficult and it should get your problem over and done...all I need is that file...
Ok, I have uploaded and attached the Display.template.php file. I have done what you suggested but will wait to continue the renaming file part until I have the updated display.template.php :)

TrueSatan

All done Brian...by the looks of it the package installer stumbled over the file because the following line was different from what it expected to find:

// Show the member's gender icon?

The expected was with a bit of spacing to make the code easier to read:

// Show the member's gender icon?

I've added the edit to the file and made that line above have the spacing in it so the mod should now uninstall via the package manager.

Have fun!

bilalghouri

its giving me error when i am installing it.
its giving me error of profile.php

TrueSatan

Quote from: bilalghouri on May 18, 2007, 06:47:29 AM
its giving me error when i am installing it.
its giving me error of profile.php

Do a manual install as with any mod that gives such errors...use the search function on this forum to find the details. Use Daniel15's Package Parser to parse the mod...again the search function will get you the details you need.

brianjw

#284
Thanks truesatan your a good person :)

Edit: I will test this in a minute as I was away from home when I originally posted this.


Edit2: It didn't work and I don't think its worth it.

Filipina

Quote from: KGIII on May 17, 2007, 02:32:04 AM
This one too I will look at and if there are enough folks wanting it then I will consider taking over the support for it. That's and the other is about all I can handle at the moment.

I will just say that everyone at my forums loves the flags... I hope it can be supported for future use :)

TrueSatan

Quote from: brianjw on May 18, 2007, 11:25:28 AM
Thanks truesatan your a good person :)

Edit: I will test this in a minute as I was away from home when I originally posted this.


Edit2: It didn't work and I don't think its worth it.

Sorry to hear that you still had problems Brian...certainly this mod isn't the most useful on offer but if you do still want to use it I'd be glad to give further assistance.

You don't say exactly in what way it didn't work so I can't really take it any further at this point.

brianjw

Well it I took the file you had and put it through ftp. Then uploaded the module and no errors no mod. :-\

TrueSatan

You do know it's off until you turn it on in Admin>Features and Options I suppose? In that you can set when/where the members are asked to set a location and if it will be shown on posts.

Sorry if you did know that and I'm telling you something that was already obvious to you but asking is the only way I can know for sure.

brianjw

oh great LOL! I didn't know that let me try it. :P

brianjw

#290
Ok now the country I selected is showing up twice.


TrueSatan

@Brianjw

Brian,

Your problem is in the file Display.template.php in your theme directory...the following code seems to be in there twice judging from the display you showed me...


// Did they select a flag?
if(isset($message['member']['options']['country']) && !empty($modSettings['country_flag_show']) && !empty($message['member']['options']['country']))
{
$flags = CountryFlag();
echo '
<img src="', $settings['default_theme_url'], '/images/flags/', $message['member']['options']['country'], '.png" alt="', $flags[$message['member']['options']['country']], '" /> ', $flags[$message['member']['options']['country']], '<br /><br />';
}


You can either take out one instance of it for yourself or if you would like me to do it for you please upload the file here and I'll do it.

brianjw

Ill let you do it since you are the helpful coder :)

TrueSatan

Hmmm...the problem is in that file but it's a clash between mods rather than a duplication of code...I was looking for the easy answer first.

Bear Moods seems OK with Country Flags and by the looks of it you are also running the Ads mod so that is the most likely culprit (though I think there's some other mod also added to that file)...

I've tried a possible fix by commenting out an echo and that might do the trick...I can't test it as I don't know all the mods that are involved in this problem.

Would you mind listing for me the mods you are using if the attached file doesn't work?

Please rename your existing file ( make it Display.template.phpold) on your server before uploading this file and if it doesn't work then delete this file from your server and rename your old file back to Display.template.php

It might be difficult (for me anyway) to solve this one if my quick fix doesn't work.

folkandfaith

PLEASE continue to support this mod someone! It's very cool but it needs some work to make it adjustable for folks like if they wish to add another country or flag or replace a new flag in place of another one etc. Please consider fixing these issues and supporting it!!

brianjw

TrueSatan, there is a parse error:
Quote
Parse error: parse error, unexpected '<' in .../Themes/default/Display.template.php on line 344
Line 344 in display.template.php was
Code (Line 344 - Display.template.php) Select

<img src="', $settings['default_theme_url'], '/images/flags/', $message['member']['options']['country'], '.png" alt="', $flags[$message['member']['options']['country']], '" /> ', $flags[$message['member']['options']['country']], '<br /><br />';


Thanks,
Brianjw

brianjw

Nevermind, after putting the code back as it was with the old display.template.php, the country shows up fine and only 1 time :)

TrueSatan

Good! I'm glad it's worked for you and should I be able to help you again it would be my pleasure so to do.

brianjw

You would be a good person to take over this mod ;)

TrueSatan

Thanks for that Brian but unless I'm mistaken I think it's already been accepted by somebody whose coding know how is highly likely to be better than mine...if memory serves me properly KGIII has offered to take it over.

Advertisement: