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 |
- sugree's blog
- 2738 reads
thanks for your help
$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
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
sites/all/modules
admin/build/modules
admin/settings/ip2cc
Update Database
ipdb.mysql
from cvs or the archiveadmin/settings/ip2cc/update
Run the update by specifying
start
andend
manually, e.g.,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
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
i can see that you have
cvs is newer
updated document
The INSTALL.txt has been updated too. You may obtain the
ip2cc.mysql
from CVS as a replacement ofipdb.mysql
.Post new comment