New ipdb.mysql

It seems I forgot about ipdb.mysql during last upgrade so I got a comment about my mistake. To fix this problem, I will upload as an attach file with this post so you can get it anytime you want. I don't commit it to the CVS because of its size. It might take your updating into big trouble for diffing 5MB text file. As a result, ipdb.mysql_.gz is downloadable. You have to uncompress and then load it into mysql.
Attachment Size
ipdb.mysql_.gz 1008.4 KB

thanks for your help

thanks for your reply. i updated my database with your ipdb.mysql one and the error messages stopped. that was a big step. the flags weren't displaying, so i looked at the links and then at the module code. i ended up hacking the module code, as it was treating the flag as a node (i believe) when constructing the address. (this is probably due to some quirk of my settings.) regardless, i hardwired it to suit me, making the url work, and changing the .png to .gif and changing width and height to suit other flag set, somewhat like this... the original... $src = url(drupal_get_path('module','ip2cc') . "/flags/$cc.png"); $attribs = array('width' => 14, height => 14, 'alt' => "$cc", 'title' => "$title"); return ""; became this... $src = url("http://example.com/modules/ip2cc/flags/$cc.gif"); $attribs = array('width' => 18, height => 12, 'alt' => "$cc", 'title' => "$title"); return ""; i think many people would use the api if we could get some good examples together of ways to use it in blocks, by user names, etc. i know there are some basic hints but i'm too dumb to hook it all into useful drupal variables since i'm still learning it all and don't know them. (and yes i'm willing to go read more on drupal.org too.) i'll throw out some things...my site is rsn2.com, a community building site for skating, cycling and charity exercise...and of course more. the ideas: i use userpoints but call them skateylove points. beside the user's name, perhaps all over the site but in userpoints especially, i'd like to place a flag (or two) to the left of the user name in the userpoints block and full listing. in some cases i'd like to use the flag of the country they most recently posted from, perhaps, and others, i'd like to allow them the option of entering country of birth or citizenship as a code in their profile, and having that be their user flag (as opposed to an ip based posting flag). there is an example with a snip of code in one node on howforge, but the code that produced the example is not fully included i don't believe. specifically i don't think it addresses how to pull the flag. that block is for showing the user where they're posting from. http://drupal.org/node/65939 presents some mods made on watchdog module, and that may help some of us figure it out. also, a search of all modules i have on my system pointed out that ip2cc is referenced in the search_keywords module around line 81 and 82 of my version. it goes something like this... $sql = 'SELECT a.* FROM {search_keywords_log} a' . tablesort_sql($header); $result = pager_query($sql, 30); while ($log = db_fetch_object($result)) { $title = (empty($log->title))?$log->path:$log->title; if (module_exist('ip2cc')) { $flag = theme('ip2cc_ip_flag',$log->hostname); } else { $flag = ''; } $rows[] = array( array('data' => format_date($log->timestamp, 'small'), 'class' => 'nowrap'), array('data' => l($log->search_engine, "http://$log->search_engine/")), array('data' => "$flagurl\">$log->keywords"), array('data' => l(_search_keywords_column_width($title), $log->path))); } $output = theme('table', $header, $rows); $output .= theme('pager', NULL, 30, 0); return $output; } so that's all i know or have found on the subject. this is a cool thing to have and i hope we can share ways of using it. none of this is meant by way of complaint or expecation that anyone owes me or anyone else anything. i appreciate your hard work, all of you, and am happy to struggle along, but always glad to have the light shined on my path when it isn't too much trouble. i'll share the light when i have some. thanks!

how to install ip2cc help needed

Hello i am trying to install ip2cc module and this is what install file reads am not able to get it am not techie please guide me I have completed first three steps now at 4 am confused , what does it mean in the 4th step are those * two separate sub steps or we have to choose either of two? how to run that Run fetchdb.sh ? am on linux hosting i have ssh access what command i have to run? Apply ip2cc.mysql , it means to just run sql command right? Download ipdb.mysql from https://howforge.com/modules/ip2cc/ipdb.mysql i cannot find the above file , does it exits? can you try i need help in installing the module thanks for your help With Regards jamie Installation ------------ 1. Copy the ip2cc.module to the Drupal modules/ip2cc directory. 2. Download flag provided by AWStats http://ip-to-country.webhosting.info/flag/awstatsflags.zip and extract in modules/ip2cc/flags 3. Apply iso3166.mysql 4. Choose a database * IP-to-Country 1. Run fetchdb.sh to obtain ip2cc.mysql 2. Apply ip2cc.mysql * My Database 1. Download ipdb.mysql from https://howforge.com/modules/ip2cc/ipdb.mysql 2. Apply ipdb.mysql 5. Apply ip2cc_addon.mysql 6. Enable the module by visiting admin/modules

Oops! sorry about that

According to the latest development, you don't need to do anything. I assume that you are running Drupal 5 or later. If you are using Drupal 4.7, please let me know. Below is a copy of INSTALL.txt.

Description

This is a simple APIs for obtaining country information by given an IPv4 address.

Requirements

This module requires Drupal 5 or greater.

Installation

  1. Extract the archive into sites/all/modules
  2. Enable the module in admin/build/modules
  3. Customize configurations in admin/settings/ip2cc

Update Database

  1. Get the new ipdb.mysql from cvs or the archive
  2. Go to admin/settings/ip2cc/update
  3. Run the update by specifying start and end manually, e.g.,

    • 1-15000
    • 15001-30000
    • 30001-45000
    • 45001-60000
    • 60001-75000
    • 75001-77711

    It is possible to specify 1-77711 if your hosting service allows PHP to run longer enough.

You can get the latest version for Drupal 5 at http://ftp.osuosl.org/pub/drupal/files/projects/ip2cc-5.x-1.x-dev.tar.gz. Please let me know if you don't understand in any steps.

i am running 4.7 version

i am running 4.7 version thanks for your help , all the steps which are mentioned in that version i have tried to follow i have written th problem which am facing in earlier message thanks once again for your help regards jamie

ipdb.mysql

I see. The only one thing you need is ip2cc.mysql. I have committed the up-to-date version to the CVS. You may obtain it directly from the CVS or else download the development snapshot tomorrow.

http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/modules/ip2cc/ip2cc.mysql?rev=1.1.2.1

Hello Sugree thanks for your

Hello Sugree thanks for your help , * My Database 1. Download ipdb.mysql from https://howforge.com/modules/ip2cc/ipdb.mysql 2. Apply ipdb.mysql what about this step , am getting 404 not found error when i try to get the ipdb.mysql file do i require it? thanks for your help once again With Regards

i can see that you have

i can see that you have attached the ipdb.mysql file in the above post , but just a query i was checking version 5 of the module and there was same file present but the size of both are different the file you attached is of about 5.18mb and file available with version 5 is 5.88mb should i use the latest file of 5.88 size? thanks lot one again

cvs is newer

You should use the newest version in CVS. It was updated 10 days ago.

updated document

The INSTALL.txt has been updated too. You may obtain the ip2cc.mysql from CVS as a replacement of ipdb.mysql.

Post new comment