Index: trunk/readme.txt =================================================================== --- trunk/readme.txt (revision 92698) +++ trunk/readme.txt (working copy) @@ -4,7 +4,7 @@ Tags: directory,links,directory links,business directory Requires at least: 2.7 Tested up to: 2.7 -Stable tag: 1.3.3 +Stable tag: 1.4.0 Add a Business Directory or Directory of Links in different categories and pages. @@ -19,7 +19,7 @@ Manage the links easily by allowing your users to submit a link. Links can also be added manually. -The links integrate easily with your own theme. No CSS to configure as it uses the CSS from your current theme. +The links integrate easily with your own theme. No CSS to configure as it uses the CSS from your current theme. Just customize the way your Links show up with the Built in tags, text and your own html. Put multiple links in each row. Add a widget to your sidebar with Random Links, Popular Links or Newest Links. Index: trunk/wp-directory-form-html.php =================================================================== --- trunk/wp-directory-form-html.php (revision 92495) +++ trunk/wp-directory-form-html.php (working copy) @@ -9,7 +9,7 @@ * File Information: * * - Directory Categories * * - wp-content/plugins/wp-directory-list/wp-directory-form-hmtl.php * -* - Version 1.1.0 * +* - Version 1.1.1 * * * *********************************************************************/ Index: trunk/wp-directory-link-html.php =================================================================== --- trunk/wp-directory-link-html.php (revision 92495) +++ trunk/wp-directory-link-html.php (working copy) @@ -9,7 +9,7 @@ * File Information: * * - Configure Directory Options * * - wp-content/plugins/wp-directory-list/wp-directory-link-html.php * -* - Version 1.0.3 * +* - Version 2.0.0 * * * ***********************************************************************/ @@ -18,26 +18,26 @@ // lets get the options just once. $my_blog = get_option('blogurl'); - $location = get_option('location_text'); - $phone = get_option('phone_text'); - $fax = get_option('fax_text'); - $email = get_option('email_text'); - $clicks = get_option('clicks_text'); - $category = get_option('directory_cat_text'); - $display_address = get_option('directory_display_address'); - $display_email = get_option('directory_display_email'); - $display_clicks = get_option('directory_show_clicks'); - $display_category= get_option('directory_show_cat'); $links_per_row = intval(get_option('links_per_row')); if($links_per_row<1){ $links_per_row = 1; - } - foreach($get_links as $links){ + } + $width = 100/$links_per_row; + $format = nl2br(get_option('links_format')); + $num = 0; + $directory .= ''; + foreach($get_links as $links){ + if($links_per_row<=$num){ + + $num = 0; + $directory.=''; + } + $directory .= ''; + if($links_per_row<=$num){ + + $directory.=''; + } } - $directory .= '" rel="bookmark" title="'. $links->title; - $directory .='">'.$links->title; - $directory .=' -
-
-
-
'; - -$directory .= $links->description; -$directory .='
'; - - if($display_address && $links->address1){ - $directory .= '
'; - if($location){ - $directory .= $location; - } - $directory .= $links->address1.", "; - if($links->address2){ - $directory .= $links->address2.", "; - } - $directory .= $links->city.", "; - $directory .= $links->state.", "; - $directory .= $links->zipcode." "; - $directory .= $links->country; -$directory .='
'; - - if($links->phone){ - if($phone){ - $directory .= $phone; - } - - $directory .= $links->phone." "; - } - if($links->fax){ - if($fax){ - $directory .= $fax; - } - $directory .= $links->fax." "; - } - if($links->email && $display_email){ - if($email){ - $directory .= $email; - } - $directory .= $links->email; - } - } - $directory .= '
-
-

'; -if($display_clicks){ - if($clicks){ - $directory .= $clicks; - } - $directory .= $links->clicks; - } - -$directory .='

-
-
-

'; -if($atts['category']=='all' && $display_category){ -$directory .= $category; - -$directory .= $catname; -} -$directory .='

-
- - '; - } } - -$directory .=' +if($links_per_row>$num){ + + $directory.=''; + } +$directory .='
'; $sql = "SELECT category FROM $wp_directory_table2 WHERE id=$links->categories"; $get_cats = $wpdb->get_results($sql); $catname=''; @@ -46,99 +46,73 @@ $catname .= $linkcategory->category; } - - $directory .= '

id; + + }else{ + + $title .= $links->url; + + } + + if (get_option('links_nofollow')){ + + $title .='" rel="nofollow'; + + } + if (get_option('links_newpage')){ + + $title .='" target="_blank'; + + } + $title .= '" rel="bookmark" title="'. $links->title; + $title .='">'.$links->title; + $title .=''; + + }else{ + + $title .= $links->title; + + } + + $parsed = str_replace('%TITLE%', $title, $format); + $parsed = str_replace('%DESCRIPTION%', $links->description, $parsed); + $parsed = str_replace('%ADDRESS1%', $links->address1, $parsed); + if($links->address2){ + $parsed = str_replace('%ADDRESS2%', $links->address2, $parsed); }else{ - - $directory .= $links->url; - + $parsed = str_replace('%ADDRESS2%', '', $parsed); } + $parsed = str_replace('%CITY%', $links->city, $parsed); + $parsed = str_replace('%STATE%', $links->state, $parsed); + $parsed = str_replace('%ZIPCODE%', $links->zipcode, $parsed); + $parsed = str_replace('%COUNTRY%', $links->country, $parsed); + $parsed = str_replace('%EMAIL%', $links->email, $parsed); + $parsed = str_replace('%PHONE%', $links->phone, $parsed); + $parsed = str_replace('%FAX%', $links->fax, $parsed); + $parsed = str_replace('%HITS%', $links->clicks, $parsed); + $parsed = str_replace('%CATEGORY%', $catname, $parsed); + - if (get_option('links_nofollow')){ - - $directory .='" rel="nofollow'; - + $directory .= $parsed; + ++$num; + $directory .= '


Index: trunk/wp-directory-list.php =================================================================== --- trunk/wp-directory-list.php (revision 92698) +++ trunk/wp-directory-list.php (working copy) @@ -4,7 +4,7 @@ Plugin Name: Wp-Directory-List Plugin URI: http://themoneymakingwebsite.com/wp-directory-list/ Description: Add a directory listing to your blog. -Version: 1.3.3 +Version: 1.4.0 Author: Billie Kennedy Jr Author URI: http://themoneymakingwebsite.com */ @@ -30,7 +30,7 @@ require_once(ABSPATH .'wp-includes/pluggable.php'); // declare the current version -$wp_directory_list_db_version = "1.3.3"; +$wp_directory_list_db_version = "1.4.0"; $wp_directory_table = $wpdb->prefix .'directory_links'; $wp_directory_table2 = $wpdb->prefix .'directory_link_cats'; @@ -171,19 +171,20 @@ // set defaults here - add_option('clicks_text','Hits: '); - add_option('phone_text','Phone: '); - add_option('fax_text','Fax: '); - add_option('location_text','Location: '); - add_option('email_text','Email: '); add_option('submitted_text','Your Link was Submitted Successfully. It may take up to 48 hours before it appears in the directory.'); - add_option('directory_cat_text','Category: '); add_option('links_per_row','1'); + add_option('links_format','

%TITLE%


%DESCRIPTION%
+
%ADDRESS1% +%ADDRESS2% +%CITY%, %STATE% %ZIPCODE% %COUNTRY% +Ph: %PHONE% +F: %FAX%
'); + } if( $installed_ver != $wp_directory_list_db_version ) { - + switch($installed_ver){ case "1.1.0": @@ -191,36 +192,64 @@ $sql = "ALTER TABLE $wp_directory_table ADD date_added INT NOT NULL"; dbDelta($sql); - - add_option('clicks_text','Hits: '); - add_option('phone_text','Phone: '); - add_option('fax_text','Fax: '); - add_option('location_text','Location: '); - add_option('email_text','Email: '); + add_option('submitted_text','Your Link was Submitted Successfully. It may take up to 48 hours before it appears in the directory.'); - add_option('directory_cat_text','Category: '); add_option('links_per_row','1'); + add_option('links_format','

%TITLE%


%DESCRIPTION%
+
%ADDRESS1% +%ADDRESS2% +%CITY%, %STATE% %ZIPCODE% %COUNTRY% +Ph: %PHONE% +F: %FAX%
'); + break; case "1.2.0": add_option('links_per_row','1'); + add_option('submitted_text','Your Link was Submitted Successfully. It may take up to 48 hours before it appears in the directory.'); + add_option('links_format','

%TITLE%


%DESCRIPTION%
+
%ADDRESS1% +%ADDRESS2% +%CITY%, %STATE% %ZIPCODE% %COUNTRY% +Ph: %PHONE% +F: %FAX%
'); + break; case "1.2.1": case "1.3.0": case "1.3.1": case "1.3.2": + case "1.3.3": + echo ' here'; + update_option('directory_email_text',''); + update_option('location_text',''); + update_option('email_text',''); + update_option('phone_text',''); + update_option('fax_text',''); + update_option('clicks_text',''); + update_option('submitted_text',''); + update_option('directory_cat_text',''); + add_option('links_format','

%TITLE%


%DESCRIPTION%
+
%ADDRESS1% +%ADDRESS2% +%CITY%, %STATE% %ZIPCODE% %COUNTRY% +Ph: %PHONE% +F: %FAX%
'); + + break; + break; default: break; } - + update_option( "wp_directory_list_db_version", $wp_directory_list_db_version ); } @@ -238,7 +267,7 @@ $results = $wpdb->query($sql); $pending_count = print_r($results,true); - $pending_menu='Pending Links'; + $pending_menu = __('Pending Links','wp-directory-links'); if(0<$pending_count){ @@ -248,10 +277,10 @@ add_menu_page( 'Directory List', 'Directory List', 8, __FILE__,'directory_plugin'); - add_submenu_page(__FILE__,'Manage Directory', 'Manage Directory', 8,'wp-directory-list/wp-directory-manage.php'); + add_submenu_page(__FILE__,__('Manage Directory','wp-directory-list'),__('Manage Directory','wp-directory-list'), 8,'wp-directory-list/wp-directory-manage.php'); add_submenu_page(__FILE__,$pending_menu,$pending_menu, 8,'wp-directory-list/wp-directory-pending-links.php'); - add_submenu_page(__FILE__,'Categories', 'Categories', 8,'wp-directory-list/wp-directory-categories.php'); - add_submenu_page(__FILE__,'Options', 'Options', 8,'wp-directory-list/wp-directory-options.php'); + add_submenu_page(__FILE__,__('Categories','wp-directory-list'),__('Categories','wp-directory-list'), 8,'wp-directory-list/wp-directory-categories.php'); + add_submenu_page(__FILE__,__('Options','wp-directory-list'),__('Options','wp-directory-list'), 8,'wp-directory-list/wp-directory-options.php'); } Index: trunk/wp-directory-options.php =================================================================== --- trunk/wp-directory-options.php (revision 92495) +++ trunk/wp-directory-options.php (working copy) @@ -9,7 +9,7 @@ * File Information: * * - Configure Directory Options * * - wp-content/plugins/wp-directory-list/wp-directory-options.php * -* - Version 1.2.0 * +* - Version 1.2.1 * * * ******************************************************************/ @@ -18,53 +18,37 @@ if($_POST['Submit']) { - // $multi_cat = strip_tags(trim($_POST['multi_cat'])); - // $paypal_email = strip_tags(trim($_POST['paypal'])); $address = strip_tags(trim($_POST['address'])); $url = strip_tags(trim($_POST['url'])); $directory_redirect = strip_tags(trim($_POST['directory_redirect'])); - $directory_show_clicks = strip_tags(trim($_POST['directory_show_clicks'])); - //$google_maps = strip_tags(trim($_POST['google_maps'])); $display_address = strip_tags(trim($_POST['display_address'])); $display_hours = strip_tags(trim($_POST['display_hours'])); $display_category = strip_tags(trim($_POST['show_category'])); $links_per_row = intval($_POST['links_per_row']); $links_nofollow = strip_tags(trim($_POST['links_nofollow'])); - + $links_newpage = strip_tags(trim($_POST['links_newpage'])); + $links_format = trim($_POST['links_format']); $email = strip_tags(trim($_POST['email'])); - $display_email = strip_tags(trim($_POST['display_email'])); $requireuser = strip_tags(trim($_POST['requireuser'])); $default_country = strip_tags(trim($_POST['directory_country'])); $directory_captcha = strip_tags(trim($_POST['directory_captcha'])); $recap_pub = strip_tags(trim($_POST['recap_pub'])); $recap_priv = strip_tags(trim($_POST['recap_priv'])); - // Text fields - $location_text = trim($_POST['location_text']); - $email_text = trim($_POST['email_text']); - $phone_text = trim($_POST['phone_text']); - $fax_text = trim($_POST['fax_text']); - $clicks_text = trim($_POST['clicks_text']); $submitted_text = trim($_POST['submitted_text']); - $category_text = trim($_POST['category_text']); - $business_hours = trim($_POST['business_hours']); - //update_option('directory_multi_cat', $multi_cat); - //update_option('paypal_email', $paypal_email); update_option('directory_address', $address); - update_option('directory_display_address',$display_address); - update_option('directory_email_text',$email_text); update_option('directory_country',$default_country); update_option('directory_url', $url); update_option('directory_redirect',$directory_redirect); - update_option('directory_show_clicks',$directory_show_clicks); - update_option('directory_clicks',$directory_clicks); update_option('directory_email',$email); - update_option('directory_display_email',$display_email); + update_option('directory_requireuser',$requireuser); update_option('directory_show_cat',$display_category); update_option('links_per_row',$links_per_row); update_option('links_nofollow',$links_nofollow); + update_option('links_newpage',$links_newpage); + update_option('links_format',$links_format); update_option('directory_captcha',$directory_captcha); update_option('recap_pub',$recap_pub); update_option('recap_priv',$recap_priv); @@ -72,15 +56,7 @@ //update_option('directory_google_maps', $google_maps); // update text fields - update_option('location_text',$location_text); - update_option('email_text',$email_text); - update_option('phone_text',$phone_text); - update_option('fax_text',$fax_text); - update_option('clicks_text',$clicks_text); update_option('submitted_text',$submitted_text); - update_option('directory_cat_text',$category_text); - update_option('display_hours',$display_hours); - update_option('business_hours',$business_hours); } @@ -94,39 +70,25 @@ - + - - - - - - + - + - - - - - - - - - - - + - - - -
-
- -
-
- + - - - -
-
- - +
- - -
-
-
- - - -
-
-
+ -
-
- -
-