Hi,

I upgraded from Drupal 5 to 6 and now after installing IP2C module with accompanied modules all I get is blank icons pointing to unknown.png flag, see here :

http://www.megaleecher.net/Download_Windows_7_Theme

Comments

mrfelton’s picture

Status: Active » Postponed (maintainer needs more info)

It should only display the unknown icon if an unrecognised country code is being used. Is IP2CC installed correctly (including it's country database)?

deepesh’s picture

Issue tags: +Drupal, +icon, +Flag, +ip2cc
StatusFileSize
new114.76 KB

Yeah, IP2CC module and it's database seems fine - here is my status report.

http://imgur.com/IC6br.jpg

deepesh’s picture

Any updates on the issue ?

splash112’s picture

Status: Postponed (maintainer needs more info) » Needs review

Think I have a solution.
Country_icons expect a lowercase country code and IP2CC provides a uppercase code.
Might me nice to use a simple drupal_strtolower() in the theme function.

Thanks
Mark

deepesh’s picture

Any fixed version you have to share ?

splash112’s picture

Component: User interface » Code
StatusFileSize
new1.87 KB

Please try the amended module file in the attachment.

yngens’s picture

tried attached module, nothing changed. will the official version be released?

Scyther’s picture

Status: Needs review » Postponed (maintainer needs more info)

Is this still a problem, even after drupal_strtolower() ?

federico’s picture

<li class="ip2cc_info"><span><span><img src="/sites/all/modules/countryicons/iconsets/shiny/unknown.png" alt="unknown" title=" 190.137.242.51"  class="countryicon" width="16" height="11" /></span></span></li>

Maybe the space before the ip address has something to do with this issue?

deepesh’s picture

Anybody willing to look into this ?

Scyther’s picture

@deepesh can you give more info please. Which Country Icons and IP to Country version do you run? And any info that could be in handy for us.

Scyther’s picture

Issue tags: -Drupal, -icon, -Flag, -ip2cc

deepesh, if you could edit countryicons.module as below and visit a page that has these icons displayed and copy paste the result here of what the value of $code is.

For me when I installed ip2cc and so, I got it to work, so if you could help us with some debug it would be great!

function theme_countryicons_icon($code, $iconset = 'shiny', $alt = '', $title = '', $attributes = NULL) {
  // if you have Devel installed
  dvm($code);
  // else
  print_r($code);

  ...
}
deepesh’s picture

I am not very sure how to add this PHP code in module file, I don't have devel module install so can you pls. send the edited countryicons.module file which I can replace to get desired value ?, also, I remember I was asked to edit some theme file to make this work and when upgrading the theme to D6 the coder might have made some mistake so If you can tell what section I need to look for that editing (to make country icons visible in comments) I can check that too?

Scyther’s picture

StatusFileSize
new2.23 KB

1. If you have the option to install Devel module it would be great, easier to get the value outputed on the page.

2. Make a backup copy of your countryicons.module file.

3. Download attached file and unzip and put the "new" countryicons.module file in your countryicons directory.

4. Visit a page on your site that should show a country icon.

5. If you have Devel installed you should see a message like this http://uccio.org/files/devel_dvm.PNG . If you don't have Devel, a message will be printed out on top of your page. Message should look like "$code: ***" for either way.

6. Copy the message you get and paste it in here or take a print screen.

7. Remove the "new" countryicons.module file and copy back your backup of that file that you did in step 2.

8. Uninstall Devel if you had installed it in step 1.

deepesh’s picture

StatusFileSize
new126.81 KB

Did as instructed (using Devel) and the screencap is attached.

Scyther’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

By reviewing your screenshot, your issue is not caused by countryicons.

IP to Country module sends 'unknown' as a country code to the theme function and that is why you get unknown.png icons on your site. Why it does that, I don't know, you have to write a issue to that module instead.