Jake Evans
Forum Replies Created
-
Forum: Reviews
In reply to: [WordPress Game List] GreatThanks krazyjakee, appreciate it!
Forum: Reviews
In reply to: [WordPress Book List] Great SupportGlad I could get everything worked out for you! Thanks again for trying WPBookList!
Forum: Reviews
In reply to: [WordPress Book List] Great Plugin, Great Support!No problem Chad! Thanks again for trying out WPBookList!
Forum: Reviews
In reply to: [WordPress Book List] Great app, great serviceThanks a lot 36Candles! Enjoy!
Forum: Reviews
In reply to: [WordPress Book List] Great Plugin and really kind and fast serviceHey Kantorarpad, Thanks a lot for the kind words!!!
Forum: Reviews
In reply to: [WordPress Book List] Awesome PluginThanks a lot Luddington!
Forum: Plugins
In reply to: [WordPress Book List] Select UKAfter talking with David further, the following is the official fix, to be included in future updates:
In savedbookactions.php, the following code was added directly underneath “$amazondetpage = filter_var($saved_book->amazondetailpage, FILTER_SANITIZE_URL);”
// Following code is to direct visitors to the UK amazon if they’re in the UK, based off their IP
// Getting user’s ip
$ip;
if (!empty($_SERVER[‘HTTP_CLIENT_IP’])) {
$ip = $_SERVER[‘HTTP_CLIENT_IP’];
} elseif (! empty($_SERVER[‘HTTP_X_FORWARDED_FOR’]))
{
$ip = $_SERVER[‘HTTP_X_FORWARDED_FOR’];
} else {
$ip = $_SERVER[‘REMOTE_ADDR’];
}// Getting country based on ip
$xml = simplexml_load_file(“http://www.geoplugin.net/xml.gp?ip=”.$ip);// Checking to see if the user’s site is in UK
$visitor_country = $xml->geoplugin_countryName;
if ($visitor_country == ‘United Kingdom’) {
$amazondetpage = str_replace(“.com”,”.co.uk”, $amazondetpage);
}Forum: Reviews
In reply to: [WordPress Book List] Good StuffThomas,
In response to that particular request you had, about changing the default sorting of your books to Alphabetical, here’s the solution, for you and any others that may want to have their library set up this way:
You’ll need to open the ‘ui.php’ file. Look for a section of code that looks like…
default:
if(empty($searchquery)){
$my_query = “SELECT * FROM $table_name”;
wpbooklist_display_books($wpdb, $count, $my_query, $sort_id, $hide_edit_delete, $books_on_page, $table_name);
}
}//end switchShould be around line 352 (if you’re looking at this in an actual text editor).
Change the code above to:
default:
if(empty($searchquery)){
$my_query = “SELECT * FROM $table_name ORDER BY book_title ASC”;
wpbooklist_display_books($wpdb, $count, $my_query, $sort_id, $hide_edit_delete, $books_on_page, $table_name);
}
}//end switchHope that helps!
-Jake