diff --git a/core/admin.php b/core/admin.php index 851ad00..0838a38 100755 --- a/core/admin.php +++ b/core/admin.php @@ -9,9 +9,9 @@ class Classifieds_Core_Admin extends Classifieds_Core { /** @var string $hook The hook for the current admin page */ var $hook; /** @var string $menu_slug The main menu slug */ - var $menu_slug = 'kleinanzeigen'; + var $menu_slug = 'classifieds'; /** @var string $sub_menu_slug Submenu slug @todo better way of handling this */ - var $sub_menu_slug = 'kleinanzeigen_credits'; + var $sub_menu_slug = 'classifieds_credits'; /** @var string $message Return message after save settings operation */ var $message = ''; @@ -47,12 +47,12 @@ function init() { add_action( 'wp_ajax_cf_save', array( &$this, 'ajax_save' ) ); //IPN script for Paypal - add_action( 'wp_ajax_nopriv_kleinanzeigen_ipn', array( &$this, 'ajax_kleinanzeigen_ipn' ) ); - add_action( 'wp_ajax_kleinanzeigen_ipn', array( &$this, 'ajax_kleinanzeigen_ipn' ) ); + add_action( 'wp_ajax_nopriv_classifieds_ipn', array( &$this, 'ajax_classifieds_ipn' ) ); + add_action( 'wp_ajax_classifieds_ipn', array( &$this, 'ajax_classifieds_ipn' ) ); //Silent Post script for Authorizenet - add_action( 'wp_ajax_nopriv_kleinanzeigen_sp', array( &$this, 'ajax_kleinanzeigen_silent_post' ) ); - add_action( 'wp_ajax_kleinanzeigen_sp', array( &$this, 'ajax_kleinanzeigen_silent_post' ) ); + add_action( 'wp_ajax_nopriv_classifieds_sp', array( &$this, 'ajax_classifieds_silent_post' ) ); + add_action( 'wp_ajax_classifieds_sp', array( &$this, 'ajax_classifieds_silent_post' ) ); add_action('admin_init', array($this, 'tutorial_script') ); add_action('admin_print_footer_scripts', array($this, 'print_tutorial_script') ); @@ -71,8 +71,8 @@ function print_tutorial_script(){ function tutorial_script(){ - if(file_exists($this->plugin_dir . 'tutorial/kleinanzeigen-tutorial.js') ){ - $this->tutorial_script = file_get_contents($this->plugin_dir . 'tutorial/kleinanzeigen-tutorial.js'); + if(file_exists($this->plugin_dir . 'tutorial/classifieds-tutorial.js') ){ + $this->tutorial_script = file_get_contents($this->plugin_dir . 'tutorial/classifieds-tutorial.js'); preg_match('/data-kera-tutorial="(.+)">/', $this->tutorial_script, $matches); @@ -84,7 +84,7 @@ function tutorial_script(){ function launch_tutorial(){ ?> -

Kleinanzeigen Tutorial

+

Classifieds Tutorial

Launch Tutorial text_domain ), + __( 'Add New', $this->text_domain ), + 'create_classifieds', + 'classifieds_add', array( &$this, 'redirect_add' ) ); } - //add_menu_page( __( 'Classifieds', 'kleinanzeigen' ), __( 'Classifieds', 'kleinanzeigen' ), 'read', $this->menu_slug, array( &$this, 'handle_admin_requests' ) ); + //add_menu_page( __( 'Classifieds', $this->text_domain ), __( 'Classifieds', $this->text_domain ), 'read', $this->menu_slug, array( &$this, 'handle_admin_requests' ) ); add_submenu_page( - 'edit.php?post_type=kleinanzeigen', - __( 'Dashboard', 'kleinanzeigen' ), - __( 'Dashboard', 'kleinanzeigen' ), + 'edit.php?post_type=classifieds', + __( 'Dashboard', $this->text_domain ), + __( 'Dashboard', $this->text_domain ), 'read', $this->menu_slug, array( &$this, 'handle_admin_requests' ) ); $settings_page = add_submenu_page( - 'edit.php?post_type=kleinanzeigen', - __( 'Kleinanzeigen Einstellungen', 'kleinanzeigen' ), - __( 'Einstellungen', 'kleinanzeigen' ), + 'edit.php?post_type=classifieds', + __( 'Classifieds Settings', $this->text_domain ), + __( 'Settings', $this->text_domain ), 'create_users', //create_users so on multisite you can turn on and off Settings with the Admin add users switch - 'kleinanzeigen_settings', + 'classifieds_settings', array( &$this, 'handle_admin_requests' ) ); add_action( 'admin_print_styles-' . $settings_page, array( &$this, 'enqueue_scripts' ) ); if($this->use_credits && (current_user_can('manage_options') || $this->use_paypal || $this->authorizenet ) ){ $settings_page = add_submenu_page( - 'edit.php?post_type=kleinanzeigen', - __( 'Kleinanzeigen-Guthaben', 'kleinanzeigen' ), - __( 'Guthaben', 'kleinanzeigen' ), + 'edit.php?post_type=classifieds', + __( 'Classifieds Credits', $this->text_domain ), + __( 'Credits', $this->text_domain ), 'read', - 'kleinanzeigen_credits', + 'classifieds_credits', array( &$this, 'handle_credits_requests' ) ); add_action( 'admin_print_styles-' . $settings_page, array( &$this, 'enqueue_scripts' ) ); } - if(file_exists($this->plugin_dir . 'tutorial/kleinanzeigen-tutorial.js') ){ - add_submenu_page( 'edit.php?post_type=kleinanzeigen', __( 'Tutorial', 'kleinanzeigen' ), __( 'Tutorial', 'kleinanzeigen' ), 'read', 'kleinanzeigen_tutorial', array( &$this, 'launch_tutorial' ) ); + if(file_exists($this->plugin_dir . 'tutorial/classifieds-tutorial.js') ){ + add_submenu_page( 'edit.php?post_type=classifieds', __( 'Tutorial', $this->text_domain ), __( 'Tutorial', $this->text_domain ), 'read', 'classifieds_tutorial', array( &$this, 'launch_tutorial' ) ); } } function redirect_add(){ - echo ''; - //wp_redirect(get_permalink($this->meine_kleinanzeigen_page_id) ); exit; + echo ''; + //wp_redirect(get_permalink($this->my_classifieds_page_id) ); exit; } @@ -211,7 +211,7 @@ function handle_admin_requests() { $this->render_admin( 'dashboard' ); } } - elseif ( $page == 'kleinanzeigen_settings' ) { + elseif ( $page == 'classifieds_settings' ) { $tab = (empty($_GET['tab'])) ? 'general' : $_GET['tab']; //default tab if ( in_array( $tab, $valid_tabs)) { /* Save options */ @@ -220,14 +220,14 @@ function handle_admin_requests() { $name = sanitize_file_name($params['new_role']); $slug = sanitize_key(preg_replace('/\W+/','_',$name) ); $result = add_role($slug, $name, array('read' => true) ); - if (empty($result) ) $this->message = __('ROLLE BESTEHT BEREITS' , 'kleinanzeigen'); - else $this->message = sprintf(__('Neue Rolle "%s" hinzugefügt' , 'kleinanzeigen'), $name); + if (empty($result) ) $this->message = __('ROLE ALREADY EXISTS' , $this->text_domain); + else $this->message = sprintf(__('New Role "%s" Added' , $this->text_domain), $name); } if ( isset( $params['remove_role'] ) ) { check_admin_referer('verify'); $name = $params['delete_role']; remove_role($name); - $this->message = sprintf(__('Rolle "%s" entfernt' , 'kleinanzeigen'), $name); + $this->message = sprintf(__('Role "%s" Removed' , $this->text_domain), $name); } if ( isset( $params['save'] ) ) { check_admin_referer('verify'); @@ -238,7 +238,7 @@ function handle_admin_requests() { ); $this->save_options( $params ); - $this->message = __( 'Einstellungen gespeichert.', 'kleinanzeigen' ); + $this->message = __( 'Settings Saved.', $this->text_domain ); } /* Render admin template */ $this->render_admin( "settings-{$tab}" ); @@ -263,7 +263,7 @@ function handle_credits_requests(){ $page = (empty($_GET['page'])) ? '' : $_GET['page'] ; $tab = (empty($_GET['tab'])) ? 'my-credits' : $_GET['tab']; //default tab - if($page == 'kleinanzeigen_credits' && in_array($tab, $valid_tabs) ) { + if($page == 'classifieds_credits' && in_array($tab, $valid_tabs) ) { if ( $tab == 'send-credits' ) { if(!empty($params)) check_admin_referer('verify'); $send_to = ( empty($params['manage_credits'])) ? '' : $params['manage_credits']; @@ -280,10 +280,10 @@ function handle_credits_requests(){ $transaction = new CF_Transactions($user->ID, $blog_id); $transaction->credits += $credits; unset($transaction); - $this->message = sprintf(__('Benutzer "%s" hat %s Credits auf das Kleinanzeigenkonto des Mitglieds erhalten','kleinanzeigen'), $send_to_user, $credits); + $this->message = sprintf(__('User "%s" received %s credits to member\'s Classifieds account',$this->text_domain), $send_to_user, $credits); } else { - $this->message = sprintf(__('Benutzer "%s" nicht gefunden oder kein Kleinanzeigen-Mitglied','kleinanzeigen'), $send_to_user); + $this->message = sprintf(__('User "%s" not found or not a Classifieds member',$this->text_domain), $send_to_user); } } @@ -296,7 +296,7 @@ function handle_credits_requests(){ $transaction->credits += $credits; unset($transaction); } - $this->message = sprintf(__('Allen Benutzern wurden "%s" Credits zu ihren Konten hinzugefügt.','kleinanzeigen'), $credits); + $this->message = sprintf(__('All users have had "%s" credits added to their accounts.',$this->text_domain), $credits); } } else { @@ -345,7 +345,7 @@ function admin_print_scripts() { jQuery(document).ready(function($) { $('form.cf-form').hide(); }); - var kleinanzeigen = { + var classifieds = { toggle_end: function(key) { jQuery('#form-'+key).show(); jQuery('.action-links-'+key).hide(); @@ -455,8 +455,8 @@ function write_to_log($error, $log = 'error') { * * @return void */ - function ajax_kleinanzeigen_ipn() { - // debug mode for IPN script (please open plugin dir (kleinanzeigen) for writing) + function ajax_classifieds_ipn() { + // debug mode for IPN script (please open plugin dir (classifieds) for writing) $debug_ipn = 0; if ( 1 == $debug_ipn ) { $this->write_to_log( @@ -522,7 +522,7 @@ function ajax_kleinanzeigen_ipn() { if ( "subscr_payment" == $_POST['txn_type'] ) { - $key = md5( $_POST['mc_currency'] . "kleinanzeigen_123" . $_POST['mc_gross'] ); + $key = md5( $_POST['mc_currency'] . "classifieds_123" . $_POST['mc_gross'] ); //checking hash keys if ( $key != $transactions->paypal['key']) { @@ -567,9 +567,9 @@ function ajax_kleinanzeigen_ipn() { * * @return void */ - function ajax_kleinanzeigen_silent_post() { + function ajax_classifieds_silent_post() { - // debug mode for Silent Post script (please open plugin dir (kleinanzeigen) for writing) + // debug mode for Silent Post script (please open plugin dir (classifieds) for writing) $debug_sp = 0; if ( 1 == $debug_sp ) { $this->write_to_log( @@ -596,7 +596,7 @@ function ajax_kleinanzeigen_silent_post() { } else { - if ( 1 == $debug_sp ) $this->write_to_log('Abonnement-ID stimmt nicht überein: ' . $_POST['x_subscription_id'] . ' Key: ' . $transactions->authorizenet['profile_id'] , 'debug_sp'); + if ( 1 == $debug_sp ) $this->write_to_log('Subscription ID mismatch Post: ' . $_POST['x_subscription_id'] . ' Key: ' . $transactions->authorizenet['profile_id'] , 'debug_sp'); } } else{ @@ -609,8 +609,8 @@ function ajax_kleinanzeigen_silent_post() { function on_restrict_manage_posts() { global $typenow; - $taxonomy = 'kleinanzeigen_categories'; - if( $typenow == "kleinanzeigen" ){ + $taxonomy = 'classifieds_categories'; + if( $typenow == "classifieds" ){ $filters = array($taxonomy); foreach ($filters as $tax_slug) { @@ -637,7 +637,7 @@ function determine_backend_cap($data, $cap, $args) if (!is_admin()) { return $data; } - if (!in_array('publish_kleinanzeigen', $cap)) { + if (!in_array('publish_classifieds', $cap)) { return $data; } global $current_user; @@ -648,7 +648,7 @@ function determine_backend_cap($data, $cap, $args) $options = $Classifieds_Core->get_options(); if (!isset($options['moderation']['publish'])) { //no publish allowed, we will remove the publish classifield cap, admin only - unset($data['publish_kleinanzeigen']); + unset($data['publish_classifieds']); } } diff --git a/core/buddypress.php b/core/buddypress.php index 6181976..db0a870 100644 --- a/core/buddypress.php +++ b/core/buddypress.php @@ -51,11 +51,11 @@ function init() function fix_menu_page_links($link, $postID, $sample) { global $bp; - $meine_kleinanzeigen_page = get_post($this->meine_kleinanzeigen_page_id); - if ($postID == $this->meine_kleinanzeigen_page_id) { + $my_classifieds_page = get_post($this->my_classifieds_page_id); + if ($postID == $this->my_classifieds_page_id) { if (is_user_logged_in()) { $user_domain = (!empty($bp->displayed_user->domain)) ? $bp->displayed_user->domain : $bp->loggedin_user->domain; - $link = $user_domain . $bp->kleinanzeigen->slug . '/' . $meine_kleinanzeigen_page->post_name . '/'; + $link = $user_domain . $bp->classifieds->slug . '/' . $my_classifieds_page->post_name . '/'; } else { $link = bp_get_signup_page(); } @@ -73,50 +73,50 @@ function add_navigation() { global $bp; - /** Only add menu if current user can create kleinanzeigen */ - if (!$this->current_user->has_cap('create_kleinanzeigen')) { + /** Only add menu if current user can create classifieds */ + if (!$this->current_user->has_cap('create_classifieds')) { return; } - $kleinanzeigen_page = get_post($this->kleinanzeigen_page_id); - $meine_kleinanzeigen_page = get_post($this->meine_kleinanzeigen_page_id); - $default_sub_slug = bp_is_my_profile() ? $meine_kleinanzeigen_page->post_name : 'all'; + $classifieds_page = get_post($this->classifieds_page_id); + $my_classifieds_page = get_post($this->my_classifieds_page_id); + $default_sub_slug = bp_is_my_profile() ? $my_classifieds_page->post_name : 'all'; - if (!@is_object($bp->kleinanzeigen)) { - $bp->kleinanzeigen = new stdClass; + if (!@is_object($bp->classifieds)) { + $bp->classifieds = new stdClass; } - $bp->kleinanzeigen->slug = $kleinanzeigen_page->post_name; + $bp->classifieds->slug = $classifieds_page->post_name; /* Construct URL to the BuddyPress profile URL */ $user_domain = (!empty($bp->displayed_user->domain)) ? $bp->displayed_user->domain : $bp->loggedin_user->domain; - $parent_url = $user_domain . $bp->kleinanzeigen->slug . '/'; + $parent_url = $user_domain . $bp->classifieds->slug . '/'; - if (0 < $kleinanzeigen_page->ID) - $nav_title = $kleinanzeigen_page->post_title; + if (0 < $classifieds_page->ID) + $nav_title = $classifieds_page->post_title; else - $nav_title = 'Kleinanzeigen'; + $nav_title = 'Classifieds'; bp_core_new_nav_item(array( - 'name' => __($nav_title, 'kleinanzeigen'), - 'slug' => $bp->kleinanzeigen->slug . '/' . $default_sub_slug . '/', + 'name' => __($nav_title, $this->text_domain), + 'slug' => $bp->classifieds->slug . '/' . $default_sub_slug . '/', 'position' => 100, 'show_for_displayed_user' => true, 'screen_function' => array(&$this, 'load_template'), - 'item_css_id' => $bp->kleinanzeigen->slug + 'item_css_id' => $bp->classifieds->slug )); if (bp_is_my_profile()) { - if (0 < $meine_kleinanzeigen_page->ID) - $nav_title = $meine_kleinanzeigen_page->post_title; + if (0 < $my_classifieds_page->ID) + $nav_title = $my_classifieds_page->post_title; else - $nav_title = 'Meine Kleinanzeigen'; + $nav_title = 'My Classifieds'; bp_core_new_subnav_item(array( - 'name' => __($nav_title, 'kleinanzeigen'), - 'slug' => $meine_kleinanzeigen_page->post_name, + 'name' => __($nav_title, $this->text_domain), + 'slug' => $my_classifieds_page->post_name, 'parent_url' => $parent_url, - 'parent_slug' => $bp->kleinanzeigen->slug, + 'parent_slug' => $bp->classifieds->slug, 'screen_function' => array(&$this, 'load_template'), 'position' => 10, 'user_has_access' => true @@ -124,21 +124,21 @@ function add_navigation() if ($this->use_credits && !$this->is_full_access()) { bp_core_new_subnav_item(array( - 'name' => __('Mein Guthaben', 'kleinanzeigen'), + 'name' => __('My Credits', $this->text_domain), 'slug' => 'my-credits', 'parent_url' => $parent_url, - 'parent_slug' => $bp->kleinanzeigen->slug, + 'parent_slug' => $bp->classifieds->slug, 'screen_function' => array(&$this, 'load_template'), 'position' => 10, 'user_has_access' => true )); } - if (current_user_can('create_kleinanzeigen')) { + if (current_user_can('create_classifieds')) { bp_core_new_subnav_item(array( - 'name' => __('Neue Anzeige erstellen', 'kleinanzeigen'), + 'name' => __('Create New Ad', $this->text_domain), 'slug' => 'create-new', 'parent_url' => $parent_url, - 'parent_slug' => $bp->kleinanzeigen->slug, + 'parent_slug' => $bp->classifieds->slug, 'screen_function' => array(&$this, 'load_template'), 'position' => 10, 'user_has_access' => true @@ -147,10 +147,10 @@ function add_navigation() } else { //display author classifids page bp_core_new_subnav_item(array( - 'name' => __('Alle', 'kleinanzeigen'), + 'name' => __('All', $this->text_domain), 'slug' => 'all', 'parent_url' => $parent_url, - 'parent_slug' => $bp->kleinanzeigen->slug, + 'parent_slug' => $bp->classifieds->slug, 'screen_function' => array(&$this, 'load_template'), 'position' => 10, 'user_has_access' => true @@ -174,7 +174,7 @@ function load_template() /** - * Load the content for the specific kleinanzeigen component and handle requests + * Load the content for the specific classifieds component and handle requests * * @global object $bp * @return void @@ -183,16 +183,16 @@ function process_page_requests() { global $bp; - //Component meine-kleinanzeigen page - if ($bp->current_component == $this->kleinanzeigen_page_slug && $bp->current_action == $this->meine_kleinanzeigen_page_slug) { + //Component my-classifieds page + if ($bp->current_component == $this->classifieds_page_slug && $bp->current_action == $this->my_classifieds_page_slug) { if (isset($_POST['edit'])) { if (wp_verify_nonce($_POST['_wpnonce'], 'verify')) - $this->render_front('update_kleinanzeige', array('post_id' => (int)$_POST['post_id'])); + $this->render_front('update_classified', array('post_id' => (int)$_POST['post_id'])); else - die(__('Sicherheitsüberprüfung fehlgeschlagen!', 'kleinanzeigen')); - } elseif (isset($_POST['update_kleinanzeige'])) { - /* The credits required to renew the kleinanzeige for the selected period */ + die(__('Security check failed!', $this->text_domain)); + } elseif (isset($_POST['update_classified'])) { + /* The credits required to renew the classified for the selected period */ $credits_required = $this->get_credits_from_duration($_POST[$this->custom_fields['duration']]); /* If user have more credits of the required credits proceed with renewing the ad */ if ($this->is_full_access() || $this->user_credits >= $credits_required) { @@ -209,7 +209,7 @@ function process_page_requests() if ($this->transactions->billing_type == 'one_time') $this->transactions->status = 'used'; } - $this->render_front('meine-kleinanzeigen', array('action' => 'edit', 'post_title' => $_POST['post_title'])); + $this->render_front('my-classifieds', array('action' => 'edit', 'post_title' => $_POST['post_title'])); } else { $this->render_front('edit-ad', array('post_id' => (int)$_POST['post_id'], 'cl_credits_error' => '1')); } @@ -217,9 +217,9 @@ function process_page_requests() if (wp_verify_nonce($_POST['_wpnonce'], 'verify')) { if ($_POST['action'] == 'end') { $this->process_status((int)$_POST['post_id'], 'private'); - $this->render_front('meine-kleinanzeigen', array('action' => 'end', 'post_title' => $_POST['post_title'])); + $this->render_front('my-classifieds', array('action' => 'end', 'post_title' => $_POST['post_title'])); } elseif ($_POST['action'] == 'renew') { - /* The credits required to renew the kleinanzeige for the selected period */ + /* The credits required to renew the classified for the selected period */ $credits_required = $this->get_credits_from_duration($_POST[$this->custom_fields['duration']]); /* If user have more credits of the required credits proceed with renewing the ad */ if ($this->is_full_access() || $this->user_credits >= $credits_required) { @@ -235,27 +235,27 @@ function process_page_requests() //Check one_time if ($this->transactions->billing_type == 'one_time') $this->transactions->status = 'used'; } - /* Set the proper step which will be loaded by "page-meine-kleinanzeigen.php" */ - $this->render_front('meine-kleinanzeigen', array('action' => 'renew', 'post_title' => $_POST['post_title'])); + /* Set the proper step which will be loaded by "page-my-classifieds.php" */ + $this->render_front('my-classifieds', array('action' => 'renew', 'post_title' => $_POST['post_title'])); } else { - $this->render_front('meine-kleinanzeigen', array('cl_credits_error' => '1')); + $this->render_front('my-classifieds', array('cl_credits_error' => '1')); } } elseif ($_POST['action'] == 'delete') { wp_delete_post($_POST['post_id']); - $this->render_front('meine-kleinanzeigen', array('action' => 'delete', 'post_title' => $_POST['post_title'])); + $this->render_front('my-classifieds', array('action' => 'delete', 'post_title' => $_POST['post_title'])); } } else { - die(__('Sicherheitsüberprüfung fehlgeschlagen!', 'kleinanzeigen')); + die(__('Security check failed!', $this->text_domain)); } } else { - $this->render_front('meine-kleinanzeigen'); + $this->render_front('my-classifieds'); } } //Component create-new page - elseif ($bp->current_component == $this->kleinanzeigen_page_slug && $bp->current_action == 'create-new') { + elseif ($bp->current_component == $this->classifieds_page_slug && $bp->current_action == 'create-new') { - if (isset($_POST['update_kleinanzeige'])) { + if (isset($_POST['update_classified'])) { - // The credits required to create the kleinanzeige for the selected period + // The credits required to create the classified for the selected period $credits_required = $this->get_credits_from_duration($_POST[$this->custom_fields['duration']]); // If user have more credits of the required credits proceed with create the ad if ($this->is_full_access() || $this->user_credits >= $credits_required) { @@ -273,24 +273,24 @@ function process_page_requests() if ($this->transactions->billing_type == 'one_time') $this->transactions->status = 'used'; } - $this->js_redirect(trailingslashit($bp->loggedin_user->domain) . $this->kleinanzeigen_page_slug . '/' . $this->meine_kleinanzeigen_page_slug); + $this->js_redirect(trailingslashit($bp->loggedin_user->domain) . $this->classifieds_page_slug . '/' . $this->my_classifieds_page_slug); } else { //save ad if have not credits but select draft if (isset($_POST['status']) && 'draft' == $_POST['status']) { /* Create ad */ $post_id = $this->update_ad($_POST); - $this->js_redirect(trailingslashit($bp->loggedin_user->domain) . $this->kleinanzeigen_page_slug . '/' . $this->meine_kleinanzeigen_page_slug); + $this->js_redirect(trailingslashit($bp->loggedin_user->domain) . $this->classifieds_page_slug . '/' . $this->my_classifieds_page_slug); } else { - $this->render_front('update-kleinanzeige', array('cl_credits_error' => '1')); + $this->render_front('update-classified', array('cl_credits_error' => '1')); } } } else { - $this->render_front('update-kleinanzeige', array()); + $this->render_front('update-classified', array()); } } //Component my-credits page - elseif ($bp->current_component == $this->kleinanzeigen_page_slug && $bp->current_action == 'my-credits') { + elseif ($bp->current_component == $this->classifieds_page_slug && $bp->current_action == 'my-credits') { //redirect on checkout page if (isset($_POST['purchase'])) { $this->js_redirect(get_permalink($this->checkout_page_id)); @@ -298,16 +298,16 @@ function process_page_requests() } //show credits page $this->render_front('my-credits'); - } //Component Author kleinanzeigen page (kleinanzeigen/all) - elseif ($bp->current_component == $this->kleinanzeigen_page_slug && $bp->current_action == 'all') { - //show author kleinanzeigen page - $this->render_front('meine-kleinanzeigen'); - } //default for kleinanzeigen page - elseif ($bp->current_component == $this->kleinanzeigen_page_slug) { + } //Component Author classifieds page (classifieds/all) + elseif ($bp->current_component == $this->classifieds_page_slug && $bp->current_action == 'all') { + //show author classifieds page + $this->render_front('my-classifieds'); + } //default for classifieds page + elseif ($bp->current_component == $this->classifieds_page_slug) { if (bp_is_my_profile()) { - $this->js_redirect(trailingslashit($bp->loggedin_user->domain) . $this->kleinanzeigen_page_slug . '/' . $this->meine_kleinanzeigen_page_slug); + $this->js_redirect(trailingslashit($bp->loggedin_user->domain) . $this->classifieds_page_slug . '/' . $this->my_classifieds_page_slug); } else { - $this->js_redirect(trailingslashit($bp->displayed_user->domain) . $this->kleinanzeigen_page_slug . '/' . 'all'); + $this->js_redirect(trailingslashit($bp->displayed_user->domain) . $this->classifieds_page_slug . '/' . 'all'); } } } @@ -322,7 +322,7 @@ function handle_page_requests() { global $bp, $wp_query; - /* Handles request for kleinanzeigen page */ + /* Handles request for classifieds page */ $templates = array(); @@ -330,91 +330,91 @@ function handle_page_requests() $page_template = locate_template(array('page.php', 'index.php')); - $logged_url = trailingslashit($bp->loggedin_user->domain) . $this->kleinanzeigen_page_slug . '/'; + $logged_url = trailingslashit($bp->loggedin_user->domain) . $this->classifieds_page_slug . '/'; if (is_feed()) { return; - } elseif ($bp->current_component == $this->kleinanzeigen_page_slug && $bp->current_action == '') { + } elseif ($bp->current_component == $this->classifieds_page_slug && $bp->current_action == '') { $this->process_page_requests(); return; - } elseif (is_page($this->meine_kleinanzeigen_page_id)) { - /* Set the proper step which will be loaded by "page-meine-kleinanzeigen.php" */ - $this->js_redirect($logged_url . $this->meine_kleinanzeigen_page_slug . '/active', true); - } elseif (is_post_type_archive('kleinanzeigen')) { - /* Set the proper step which will be loaded by "page-meine-kleinanzeigen.php" */ - $templates = array('page-kleinanzeigen.php'); - if (!$this->kleinanzeigen_template = locate_template($templates)) { - $this->kleinanzeigen_template = $page_template; + } elseif (is_page($this->my_classifieds_page_id)) { + /* Set the proper step which will be loaded by "page-my-classifieds.php" */ + $this->js_redirect($logged_url . $this->my_classifieds_page_slug . '/active', true); + } elseif (is_post_type_archive('classifieds')) { + /* Set the proper step which will be loaded by "page-my-classifieds.php" */ + $templates = array('page-classifieds.php'); + if (!$this->classifieds_template = locate_template($templates)) { + $this->classifieds_template = $page_template; $wp_query->post_count = 1; add_filter('the_title', array(&$this, 'page_title_output'), 10, 2); - add_filter('the_content', array(&$this, 'kleinanzeigen_content')); + add_filter('the_content', array(&$this, 'classifieds_content')); } - add_filter('template_include', array(&$this, 'custom_kleinanzeigen_template')); - $this->is_kleinanzeigen_page = true; - } elseif (is_archive() && in_array($taxonomy, array('kleinanzeigen_categories', 'kleinanzeigen_tags'))) { - /* Set the proper step which will be loaded by "page-meine-kleinanzeigen.php" */ - $templates = array('page-kleinanzeigen.php'); - if (!$this->kleinanzeigen_template = locate_template($templates)) { - $this->kleinanzeigen_template = $page_template; + add_filter('template_include', array(&$this, 'custom_classifieds_template')); + $this->is_classifieds_page = true; + } elseif (is_archive() && in_array($taxonomy, array('classifieds_categories', 'classifieds_tags'))) { + /* Set the proper step which will be loaded by "page-my-classifieds.php" */ + $templates = array('page-classifieds.php'); + if (!$this->classifieds_template = locate_template($templates)) { + $this->classifieds_template = $page_template; $wp_query->post_count = 1; add_filter('the_title', array(&$this, 'page_title_output'), 10, 2); - add_filter('the_content', array(&$this, 'kleinanzeigen_content')); + add_filter('the_content', array(&$this, 'classifieds_content')); } - add_filter('template_include', array(&$this, 'custom_kleinanzeigen_template')); - $this->is_kleinanzeigen_page = true; - } elseif (is_single() && 'kleinanzeigen' == get_query_var('post_type')) { - $templates = array('single-kleinanzeigen.php'); - if (!$this->kleinanzeigen_template = locate_template($templates)) { - $this->kleinanzeigen_template = $page_template; + add_filter('template_include', array(&$this, 'custom_classifieds_template')); + $this->is_classifieds_page = true; + } elseif (is_single() && 'classifieds' == get_query_var('post_type')) { + $templates = array('single-classifieds.php'); + if (!$this->classifieds_template = locate_template($templates)) { + $this->classifieds_template = $page_template; add_filter('the_content', array(&$this, 'single_content')); } - add_filter('template_include', array(&$this, 'custom_kleinanzeigen_template')); - $this->is_kleinanzeigen_page = true; + add_filter('template_include', array(&$this, 'custom_classifieds_template')); + $this->is_classifieds_page = true; } elseif (is_page($this->my_credits_page_id)) { wp_redirect($logged_url . 'my-credits'); exit; $templates = array('page-my-credits.php'); - if (!$this->kleinanzeigen_template = locate_template($templates)) { - $this->kleinanzeigen_template = $page_template; + if (!$this->classifieds_template = locate_template($templates)) { + $this->classifieds_template = $page_template; add_filter('the_content', array(&$this, 'my_credits_content')); } - add_filter('template_include', array(&$this, 'custom_kleinanzeigen_template')); - $this->is_kleinanzeigen_page = true; + add_filter('template_include', array(&$this, 'custom_classifieds_template')); + $this->is_classifieds_page = true; } elseif (is_page($this->checkout_page_id)) { $templates = array('page-checkout.php'); - if (!$this->kleinanzeigen_template = locate_template($templates)) { - $this->kleinanzeigen_template = $page_template; + if (!$this->classifieds_template = locate_template($templates)) { + $this->classifieds_template = $page_template; add_filter('the_content', array(&$this, 'checkout_content')); } - add_filter('template_include', array(&$this, 'custom_kleinanzeigen_template')); - $this->is_kleinanzeigen_page = true; + add_filter('template_include', array(&$this, 'custom_classifieds_template')); + $this->is_classifieds_page = true; } elseif (is_page($this->signin_page_id)) { $templates = array('page-signin.php'); - if (!$this->kleinanzeigen_template = locate_template($templates)) { - $this->kleinanzeigen_template = $page_template; + if (!$this->classifieds_template = locate_template($templates)) { + $this->classifieds_template = $page_template; add_filter('the_title', array(&$this, 'delete_post_title')); //after wpautop add_filter('the_content', array(&$this, 'signin_content')); } - add_filter('template_include', array(&$this, 'custom_kleinanzeigen_template')); - $this->is_kleinanzeigen_page = true; + add_filter('template_include', array(&$this, 'custom_classifieds_template')); + $this->is_classifieds_page = true; } //Classifieds update pages - elseif (is_page($this->add_kleinanzeige_page_id) || is_page($this->edit_kleinanzeige_page_id)) { + elseif (is_page($this->add_classified_page_id) || is_page($this->edit_classified_page_id)) { wp_redirect($logged_url . 'create-new/?' . http_build_query($_GET)); exit; } /* If user wants to go to My Classifieds main page */ - elseif (isset($_POST['go_meine_kleinanzeigen'])) { - wp_redirect(get_permalink($this->meine_kleinanzeigen_page_id)); + elseif (isset($_POST['go_my_classifieds'])) { + wp_redirect(get_permalink($this->my_classifieds_page_id)); } /* If user wants to go to My Classifieds main page */ elseif (isset($_POST['purchase'])) { wp_redirect(get_permalink($this->checkout_page_id)); } else { - /* Set the proper step which will be loaded by "page-meine-kleinanzeigen.php" */ - set_query_var('cf_action', 'meine-kleinanzeigen'); + /* Set the proper step which will be loaded by "page-my-classifieds.php" */ + set_query_var('cf_action', 'my-classifieds'); } //load specific items - if ($this->is_kleinanzeigen_page) { + if ($this->is_classifieds_page) { add_filter('edit_post_link', array(&$this, 'delete_edit_post_link')); } @@ -425,11 +425,11 @@ function handle_page_requests() * * @return void **/ - function kleinanzeigen_content($content = null) + function classifieds_content($content = null) { if (!in_the_loop()) return $content; ob_start(); - require($this->custom_kleinanzeigen_template('kleinanzeigen')); + require($this->custom_classifieds_template('classifieds')); $new_content = ob_get_contents(); ob_end_clean(); return $new_content; @@ -440,12 +440,12 @@ function kleinanzeigen_content($content = null) * * @return void **/ - function update_kleinanzeige_content($content = null) + function update_classified_content($content = null) { if (!in_the_loop()) return $content; ob_start(); - $this->render_front('update-kleinanzeige', array('post_id' => $_POST['post_id'])); - //require($this->template_file('update-kleinanzeige')); + $this->render_front('update-classified', array('post_id' => $_POST['post_id'])); + //require($this->template_file('update-classified')); $new_content = ob_get_contents(); ob_end_clean(); return $new_content; @@ -456,11 +456,11 @@ function update_kleinanzeige_content($content = null) * * @return void **/ - function meine_kleinanzeigen_content($content = null) + function my_classifieds_content($content = null) { if (!in_the_loop()) return $content; ob_start(); - require($this->custom_kleinanzeigen_template('meine-kleinanzeigen')); + require($this->custom_classifieds_template('my-classifieds')); $new_content = ob_get_contents(); ob_end_clean(); return $new_content; @@ -475,7 +475,7 @@ function checkout_content($content = null) { if (!in_the_loop()) return $content; ob_start(); - require($this->custom_kleinanzeigen_template('checkout')); + require($this->custom_classifieds_template('checkout')); $new_content = ob_get_contents(); ob_end_clean(); return $new_content; @@ -490,7 +490,7 @@ function signin_content($content = null) { if (!in_the_loop()) return $content; ob_start(); - require($this->custom_kleinanzeigen_template('signin')); + require($this->custom_classifieds_template('signin')); $new_content = ob_get_contents(); ob_end_clean(); return $new_content; @@ -505,7 +505,7 @@ function my_credits_content($content = null) { if (!in_the_loop()) return $content; ob_start(); - require($this->custom_kleinanzeigen_template('page-my-credits')); + require($this->custom_classifieds_template('page-my-credits')); $new_content = ob_get_contents(); ob_end_clean(); return $new_content; @@ -520,7 +520,7 @@ function single_content($content = null) { if (!in_the_loop()) return $content; ob_start(); - require($this->custom_kleinanzeigen_template('single-kleinanzeigen')); + require($this->custom_classifieds_template('single-classifieds')); $new_content = ob_get_contents(); ob_end_clean(); return $new_content; @@ -533,24 +533,24 @@ function single_content($content = null) **/ function enqueue_scripts() { - if (is_page($this->add_kleinanzeige_page_id) || is_page($this->edit_kleinanzeige_page_id)) { + if (is_page($this->add_classified_page_id) || is_page($this->edit_classified_page_id)) { wp_enqueue_script('thickbox'); wp_enqueue_style('thickbox'); } - if (file_exists(get_template_directory() . '/style-bp-kleinanzeigen.css')) - wp_enqueue_style('style-kleinanzeigen', get_template_directory() . '/style-bp-kleinanzeigen.css'); - elseif (file_exists($this->plugin_dir . 'ui-front/buddypress/style-bp-kleinanzeigen.css')) - wp_enqueue_style('style-kleinanzeigen', $this->plugin_url . 'ui-front/buddypress/style-bp-kleinanzeigen.css'); + if (file_exists(get_template_directory() . '/style-bp-classifieds.css')) + wp_enqueue_style('style-classifieds', get_template_directory() . '/style-bp-classifieds.css'); + elseif (file_exists($this->plugin_dir . 'ui-front/buddypress/style-bp-classifieds.css')) + wp_enqueue_style('style-classifieds', $this->plugin_url . 'ui-front/buddypress/style-bp-classifieds.css'); } function on_author_link($link) { global $post, $bp; - if ($post->post_type == 'kleinanzeigen') { + if ($post->post_type == 'classifieds') { if (get_current_user_id() == $post->post_author) { - $link = bp_core_get_user_domain($post->post_author) . $bp->kleinanzeigen->slug . '/meine-kleinanzeigen'; + $link = bp_core_get_user_domain($post->post_author) . $bp->classifieds->slug . '/my-classifieds'; } elseif (is_user_logged_in()) { - $link = bp_core_get_user_domain($post->post_author) . $bp->kleinanzeigen->slug . '/all'; + $link = bp_core_get_user_domain($post->post_author) . $bp->classifieds->slug . '/all'; }else{ $link = bp_core_get_user_domain($post->post_author); } diff --git a/core/class-cf-meta.php b/core/class-cf-meta.php index c5bdccf..8750544 100644 --- a/core/class-cf-meta.php +++ b/core/class-cf-meta.php @@ -6,7 +6,7 @@ class CF_Meta{ protected $_meta = null; public $post_id = 0; - public $text_domain = 'kleinanzeigen'; + public $text_domain = CF_TEXT_DOMAIN; public $options_name = CF_OPTIONS_NAME; public $plugin_dir = CF_PLUGIN_DIR; public $plugin_url = CF_PLUGIN_URL; diff --git a/core/class-cf-transactions.php b/core/class-cf-transactions.php index 7cff88e..ae5bf15 100644 --- a/core/class-cf-transactions.php +++ b/core/class-cf-transactions.php @@ -2,7 +2,7 @@ class CF_Transactions{ - public $text_domain = 'kleinanzeigen'; + public $text_domain = CF_TEXT_DOMAIN; public $options_name = CF_OPTIONS_NAME; public $plugin_dir = CF_PLUGIN_DIR; public $plugin_url = CF_PLUGIN_URL; @@ -28,7 +28,7 @@ class CF_Transactions{ //credits_log - array of credit purchases. 'credits_log' => array(), - //order- Information about the last successful order. Use expires and status to decide wheter user can add kleinanzeigen. + //order- Information about the last successful order. Use expires and status to decide wheter user can add classifieds. 'order' => array('billing_type' => '', 'billing_frequency' => '', 'billing_period' => '','payment_method' => '', 'status' => '', 'expires' => 0, 'order_info' => array() ), //paypal - list of successful transaction numbers and subscription ids. @@ -247,7 +247,7 @@ function __set($property, $value){ //for affiliate subscription $affiliate_settings = $this->get_options( 'affiliate_settings' ); - do_action( 'kleinanzeigen_set_paid_member', $affiliate_settings, $user_id, $this->_transactions['order']['billing_type'] ); + do_action( 'classifieds_set_paid_member', $affiliate_settings, $user_id, $this->_transactions['order']['billing_type'] ); $member_role = $this->get_options('general'); $member_role = $member_role['member_role']; @@ -323,7 +323,7 @@ function __set($property, $value){ //for affiliate subscription $affiliate_settings = $this->get_options( 'affiliate_settings' ); - do_action( 'kleinanzeigen_set_paid_member', $affiliate_settings, $user_id, $this->_transactions['order']['billing_type'] ); + do_action( 'classifieds_set_paid_member', $affiliate_settings, $user_id, $this->_transactions['order']['billing_type'] ); $member_role = $this->get_options('general'); $member_role = $member_role['member_role']; diff --git a/core/core.php b/core/core.php index aa806f1..3df52aa 100755 --- a/core/core.php +++ b/core/core.php @@ -9,14 +9,14 @@ class Classifieds_Core { // Definiere Klassenvariablen für veraltete dynamische Eigenschaften public $capability_map; - public $add_kleinanzeige_page_id; - public $add_kleinanzeige_page_page_slug; - public $edit_kleinanzeige_page_id; - public $edit_kleinanzeige_page_slug; + public $add_classified_page_id; + public $add_classified_page_page_slug; + public $edit_classified_page_id; + public $edit_classified_page_slug; public $my_credits_page_slug; public $signin_page_id; public $signin_page_slug; - public $kleinanzeigen_template; + public $classified_template; /** @public plugin version */ public $plugin_version = CF_VERSION; @@ -27,14 +27,14 @@ class Classifieds_Core { /** @public string $plugin_dir Path to plugin directory */ public $plugin_dir = CF_PLUGIN_DIR; /** @public string $text_domain The text domain for strings localization */ - public $text_domain = 'kleinanzeigen'; + public $text_domain = CF_TEXT_DOMAIN; /** @public string $options_name The name of the plugin options entry in DB */ public $options_name = CF_OPTIONS_NAME; /** @public string $plugin_prefix Plugin prefix */ public $plugin_prefix = 'cf_'; /** @public string $post_type Plugin post type */ - public $post_type = 'kleinanzeigen'; + public $post_type = 'classifieds'; /** @public array $taxonomies Post taxonomies */ public $taxonomy_objects; /** @public array $taxonomies Post taxonomies */ @@ -65,28 +65,28 @@ class Classifieds_Core { /** @public string/bool Whether to display pagination at the bottom of the page */ public $pagination_bottom; - /** @public int kleinanzeigen_page_id the Classifieds default page ID number. Track by ID so the page permalink and slug may be internationalized */ - public $kleinanzeigen_page_id = 0; - /** @public string kleinanzeigen_page_slug the Classifieds page slug. Track by ID so the page permalink and slug may be internationalized */ - public $kleinanzeigen_page_slug = ''; - /** @public string kleinanzeigen_page_name the Classifieds default page name for templates. Track by ID so the page permalink and slug may be internationalized */ - public $kleinanzeigen_page_name = 'kleinanzeigen'; + /** @public int classifieds_page_id the Classifieds default page ID number. Track by ID so the page permalink and slug may be internationalized */ + public $classifieds_page_id = 0; + /** @public string classifieds_page_slug the Classifieds page slug. Track by ID so the page permalink and slug may be internationalized */ + public $classifieds_page_slug = ''; + /** @public string classifieds_page_name the Classifieds default page name for templates. Track by ID so the page permalink and slug may be internationalized */ + public $classifieds_page_name = 'classifieds'; /** @public int the My Classifieds default page ID number. Track by ID so the page permalink and slug may be internationalized */ - public $meine_kleinanzeigen_page_id = 0; + public $my_classifieds_page_id = 0; /** @public string the My Classifieds page slug. Track by ID so the page permalink and slug may be internationalized */ - public $meine_kleinanzeigen_page_slug = ''; - /** @public string kleinanzeigen_page_name the Classifieds default page name for templates. Track by ID so the page permalink and slug may be internationalized */ - public $meine_kleinanzeigen_page_name = 'meine-kleinanzeigen'; + public $my_classifieds_page_slug = ''; + /** @public string classifieds_page_name the Classifieds default page name for templates. Track by ID so the page permalink and slug may be internationalized */ + public $my_classifieds_page_name = 'my-classifieds'; /** @public int the Checkout default page ID number. Track by ID so the page permalink and slug may be internationalized */ public $checkout_page_id = 0; /** @public string the My Classifieds page slug. Track by ID so the page permalink and slug may be internationalized */ public $checkout_page_slug = ''; - /** @public string kleinanzeigen_page_name the Classifieds default page name for templates. Track by ID so the page permalink and slug may be internationalized */ + /** @public string classifieds_page_name the Classifieds default page name for templates. Track by ID so the page permalink and slug may be internationalized */ public $checkout_page_name = 'checkout'; - public $is_kleinanzeigen_page = false; + public $is_classifieds_page = false; /** @public int My credits page ID */ public $my_credits_page_id = 0; @@ -110,18 +110,18 @@ function __construct() { //Default capability map for Classifieds $this->capability_map = array( - 'read_kleinanzeigen' => __( 'Kleinanzeigen ansehen.', 'kleinanzeigen' ), - 'read_private_kleinanzeigen' => __( 'Private Kleinanzeigen ansehen.', 'kleinanzeigen' ), - 'publish_kleinanzeigen' => __( 'Kleinanzeigen hinzufügen.', 'kleinanzeigen' ), - 'edit_kleinanzeigen' => __( 'Kleinanzeigen bearbeiten.', 'kleinanzeigen' ), - 'edit_published_kleinanzeigen' => __( 'Veröffentlichte Kleinanzeigen bearbeiten.', 'kleinanzeigen' ), - 'edit_private_kleinanzeigen' => __( 'Private Kleinanzeigen bearbeiten.', 'kleinanzeigen' ), - 'delete_kleinanzeigen' => __( 'Kleinanzeigen löschen', 'kleinanzeigen' ), - 'delete_published_kleinanzeigen' => __( 'Veröffentlichte Kleinanzeigen löschen.', 'kleinanzeigen' ), - 'delete_private_kleinanzeigen' => __( 'Private Kleinanzeigen löschen.', 'kleinanzeigen' ), - 'edit_others_kleinanzeigen' => __( 'Kleinanzeigen anderer bearbeiten.', 'kleinanzeigen' ), - 'delete_others_kleinanzeigen' => __( 'Andere Kleinanzeigen löschen.', 'kleinanzeigen' ), - 'upload_files' => __( 'Daten hochladen.', 'kleinanzeigen' ), + 'read_classifieds' => __( 'View classifieds.', $this->text_domain ), + 'read_private_classifieds' => __( 'View private classifieds.', $this->text_domain ), + 'publish_classifieds' => __( 'Add classifieds.', $this->text_domain ), + 'edit_classifieds' => __( 'Edit classifieds.', $this->text_domain ), + 'edit_published_classifieds' => __( 'Edit published classifieds.', $this->text_domain ), + 'edit_private_classifieds' => __( 'Edit private classifieds.', $this->text_domain ), + 'delete_classifieds' => __( 'Delete classifieds', $this->text_domain ), + 'delete_published_classifieds' => __( 'Delete published classifieds.', $this->text_domain ), + 'delete_private_classifieds' => __( 'Delete private classifieds.', $this->text_domain ), + 'edit_others_classifieds' => __( 'Edit others\' classifieds.', $this->text_domain ), + 'delete_others_classifieds' => __( 'Delete others\' classifieds.', $this->text_domain ), + 'upload_files' => __( 'Upload files.', $this->text_domain ), ); @@ -172,11 +172,11 @@ function __construct() { /** Map meta capabilities */ add_filter( 'map_meta_cap', array( &$this, 'map_meta_cap' ), 11, 4 ); - /** Show only user's kleinanzeigen on kleinanzeigen posttype page*/ - add_filter( 'parse_query', array( &$this, 'show_only_c_user_kleinanzeigen' ) ); + /** Show only user's classifieds on classifieds posttype page*/ + add_filter( 'parse_query', array( &$this, 'show_only_c_user_classifieds' ) ); - // filter for $wp_query on kleinanzeigen page - it is necessary that the other plug-ins have not changed it in these pages - add_filter( 'pre_get_posts', array( &$this, 'pre_get_posts_for_kleinanzeigen' ), 101 ); + // filter for $wp_query on classifieds page - it is necessary that the other plug-ins have not changed it in these pages + add_filter( 'pre_get_posts', array( &$this, 'pre_get_posts_for_classifieds' ), 101 ); add_filter( 'user_contactmethods', array( &$this, 'contact_fields' ), 10, 2 ); add_filter( 'admin_post_thumbnail_html', array( &$this, 'on_admin_post_thumbnail_html' ) ); @@ -186,13 +186,13 @@ function __construct() { //Shortcodes - add_shortcode( 'cf_list_categories', array( &$this, 'kleinanzeigen_categories_sc' ) ); - add_shortcode( 'cf_kleinanzeigen_btn', array( &$this, 'kleinanzeigen_btn_sc' ) ); - add_shortcode( 'cf_add_kleinanzeige_btn', array( &$this, 'add_kleinanzeige_btn_sc' ) ); - add_shortcode( 'cf_edit_kleinanzeige_btn', array( &$this, 'edit_kleinanzeige_btn_sc' ) ); + add_shortcode( 'cf_list_categories', array( &$this, 'classifieds_categories_sc' ) ); + add_shortcode( 'cf_classifieds_btn', array( &$this, 'classifieds_btn_sc' ) ); + add_shortcode( 'cf_add_classified_btn', array( &$this, 'add_classified_btn_sc' ) ); + add_shortcode( 'cf_edit_classified_btn', array( &$this, 'edit_classified_btn_sc' ) ); add_shortcode( 'cf_checkout_btn', array( &$this, 'checkout_btn_sc' ) ); add_shortcode( 'cf_my_credits_btn', array( &$this, 'my_credits_btn_sc' ) ); - add_shortcode( 'cf_meine_kleinanzeigen_btn', array( &$this, 'meine_kleinanzeigen_btn_sc' ) ); + add_shortcode( 'cf_my_classifieds_btn', array( &$this, 'my_classifieds_btn_sc' ) ); add_shortcode( 'cf_profile_btn', array( &$this, 'profile_btn_sc' ) ); add_shortcode( 'cf_logout_btn', array( &$this, 'logout_btn_sc' ) ); add_shortcode( 'cf_signin_btn', array( &$this, 'signin_btn_sc' ) ); @@ -212,24 +212,24 @@ function on_enqueue_scripts() { function init() { global $wp, $wp_rewrite; - $kleinanzeigen_obj = get_post_type_object( 'kleinanzeigen' ); + $classifieds_obj = get_post_type_object( 'classifieds' ); - if ( ! empty( $kleinanzeigen_obj ) ) { + if ( ! empty( $classifieds_obj ) ) { - if ( ! is_string( $slug = $kleinanzeigen_obj->has_archive ) ) { - $slug = $kleinanzeigen; + if ( ! is_string( $slug = $classifieds_obj->has_archive ) ) { + $slug = $classifieds; } add_rewrite_rule( "author/([^/]+)/{$slug}/page/?([2-9][0-9]*)", - "index.php?post_type=kleinanzeigen&author_name=\$matches[1]&paged=\$matches[2]", 'top' ); + "index.php?post_type=classifieds&author_name=\$matches[1]&paged=\$matches[2]", 'top' ); add_rewrite_rule( "author/([^/]+)/{$slug}", - "index.php?post_type=kleinanzeigen&author_name=\$matches[1]", 'top' ); + "index.php?post_type=classifieds&author_name=\$matches[1]", 'top' ); } // post_status "virtual" for pages not to be displayed in the menus but that users should not be editing. register_post_status( 'virtual', array( - 'label' => __( 'Virtual', 'kleinanzeigen' ), + 'label' => __( 'Virtual', $this->text_domain ), 'public' => ( ! is_admin() ), //This trick prevents the virtual pages from appearing in the All Pages list but can be display on the front end. 'exclude_from_search' => false, @@ -271,7 +271,7 @@ function init() { $this->pagination_top = ( ! empty( $options['pagination_top'] ) ); $this->pagination_bottom = ( ! empty( $options['pagination_bottom'] ) ); - /* Set the member role for kleinanzeigen */ + /* Set the member role for classifieds */ $this->user_role = ( empty( $options['member_role'] ) ) ? get_option( 'default_role' ) : $options['member_role']; //How do we sell stuff @@ -305,15 +305,15 @@ function init() { || ( $this->use_credits && $this->user_credits >= $options['credits_per_week'] ) || $this->is_full_access() ) { - if ( $this->current_user->has_cap( 'publish_kleinanzeigen' ) ) { - $this->current_user->add_cap( 'create_kleinanzeigen' ); + if ( $this->current_user->has_cap( 'publish_classifieds' ) ) { + $this->current_user->add_cap( 'create_classifieds' ); } else { - $this->current_user->remove_cap( 'create_kleinanzeigen' ); + $this->current_user->remove_cap( 'create_classifieds' ); } } else { - $this->current_user->remove_cap( 'create_kleinanzeigen' ); + $this->current_user->remove_cap( 'create_classifieds' ); } } } @@ -329,14 +329,14 @@ function init() { function contact_fields( $contact_fields = array(), $user = null ) { $cc_contact = array( - 'cc_email' => __( 'CC Email', 'kleinanzeigen' ), - 'cc_firstname' => __( 'CC First Name', 'kleinanzeigen' ), - 'cc_lastname' => __( 'CC Last Name', 'kleinanzeigen' ), - 'cc_street' => __( 'CC Street', 'kleinanzeigen' ), - 'cc_city' => __( 'CC City', 'kleinanzeigen' ), - 'cc_state' => __( 'CC State', 'kleinanzeigen' ), - 'cc_zip' => __( 'CC Zip', 'kleinanzeigen' ), - 'cc_country_code' => __( 'CC Country Code', 'kleinanzeigen' ), + 'cc_email' => __( 'CC Email', $this->text_domain ), + 'cc_firstname' => __( 'CC First Name', $this->text_domain ), + 'cc_lastname' => __( 'CC Last Name', $this->text_domain ), + 'cc_street' => __( 'CC Street', $this->text_domain ), + 'cc_city' => __( 'CC City', $this->text_domain ), + 'cc_state' => __( 'CC State', $this->text_domain ), + 'cc_zip' => __( 'CC Zip', $this->text_domain ), + 'cc_country_code' => __( 'CC Country Code', $this->text_domain ), ); return array_merge( $cc_contact, $contact_fields ); @@ -348,7 +348,7 @@ function contact_fields( $contact_fields = array(), $user = null ) { * * @return void */ - function create_default_kleinanzeigen_roles() { + function create_default_classifieds_roles() { //set capability for admin $admin = get_role( 'administrator' ); @@ -363,7 +363,7 @@ function create_default_kleinanzeigen_roles() { * @return void **/ function on_activate() { - $this->create_default_kleinanzeigen_roles(); + $this->create_default_classifieds_roles(); /* Update plugin versions */ $versions = array( @@ -389,7 +389,7 @@ function on_deactivate() { foreach ( $post_statuses as $post_status ) { $args = array( 'hierarchical' => 0, - 'meta_key' => 'kleinanzeigen_type', + 'meta_key' => 'classifieds_type', 'post_type' => 'page', 'post_status' => $post_status ); @@ -408,8 +408,8 @@ function on_deactivate() { function on_plugins_loaded() { - //Loads "kleinanzeigen-[xx_XX].mo" language file from the "languages" kleinanzeigen - load_plugin_textdomain( 'kleinanzeigen', false, plugin_basename( $this->plugin_dir . 'languages' ) ); + //Loads "classifieds-[xx_XX].mo" language file from the "languages" classifieds + load_plugin_textdomain( $this->text_domain, false, plugin_basename( $this->plugin_dir . 'languages' ) ); //If the activate flag is set then try to initalize the defaults if ( get_site_option( 'cf_activate', false ) ) { @@ -428,9 +428,9 @@ function on_parse_query( $query ) { //Handle any security redirects if ( ! is_user_logged_in() ) { - if ( @is_page( $this->add_kleinanzeige_page_id ) - || @is_page( $this->edit_kleinanzeige_page_id ) - || @is_page( $this->meine_kleinanzeigen_page_id ) + if ( @is_page( $this->add_classified_page_id ) + || @is_page( $this->edit_classified_page_id ) + || @is_page( $this->my_classifieds_page_id ) || @is_page( $this->my_credits_page_id ) || @is_page( $this->checkout_page_id ) ) { @@ -451,24 +451,24 @@ function on_parse_query( $query ) { //Are are we managing credits? if ( ! $this->use_credits ) { if ( @is_page( $this->my_credits_page_id ) ) { - wp_redirect( get_permalink( $this->meine_kleinanzeigen_page_id ) ); + wp_redirect( get_permalink( $this->my_classifieds_page_id ) ); exit; } } - //Are we adding a kleinanzeige? - if ( ! ( current_user_can( 'create_kleinanzeigen' ) && current_user_can( 'publish_kleinanzeigen' ) ) ) { - if ( @is_page( $this->add_kleinanzeige_page_id ) ) { - wp_redirect( get_permalink( $this->meine_kleinanzeigen_page_id ) ); + //Are we adding a classified? + if ( ! ( current_user_can( 'create_classifieds' ) && current_user_can( 'publish_classifieds' ) ) ) { + if ( @is_page( $this->add_classified_page_id ) ) { + wp_redirect( get_permalink( $this->my_classifieds_page_id ) ); exit; } } - //Or are we editing a kleinanzeige? - //Can the user edit kleinanzeigen? - if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_kleinanzeige', $_REQUEST['post_id'] ) ) { - if ( @is_page( $this->edit_kleinanzeige_page_id ) ) { - wp_redirect( get_permalink( $this->meine_kleinanzeigen_page_id ) ); + //Or are we editing a classified? + //Can the user edit classifieds? + if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_classified', $_REQUEST['post_id'] ) ) { + if ( @is_page( $this->edit_classified_page_id ) ) { + wp_redirect( get_permalink( $this->my_classifieds_page_id ) ); exit; } } @@ -510,14 +510,14 @@ function hide_menu_pages( $args ) { } /** - * filter for $wp_query on kleinanzeigen page - it is necessary that the other plug-ins have not changed it in these pages + * filter for $wp_query on classifieds page - it is necessary that the other plug-ins have not changed it in these pages * * @return void **/ - function pre_get_posts_for_kleinanzeigen() { + function pre_get_posts_for_classifieds() { global $wp_query; - if ( isset( $wp_query->query_vars['post_type'][0] ) && 'kleinanzeigen' == $wp_query->query_vars['post_type'][0] ) { + if ( isset( $wp_query->query_vars['post_type'][0] ) && 'classifieds' == $wp_query->query_vars['post_type'][0] ) { $wp_query->query_vars['cat'] = ''; $wp_query->query_vars['category__in'] = array(); $wp_query->query_vars['showposts'] = ''; @@ -539,14 +539,14 @@ function get_page_by_meta( $value ) { " SELECT post_id FROM {$wpdb->postmeta} - WHERE meta_key='kleinanzeigen_type' + WHERE meta_key='classifieds_type' AND meta_value=%s ", $value ), OBJECT_K ) ); if ( count( $ids ) != 1 ) { //There can be only one. foreach ( $ids as $id ) { //Delete all and start over. - delete_post_meta( $id, "kleinanzeigen_type" ); + delete_post_meta( $id, "classifieds_type" ); wp_delete_post( $id, true ); } @@ -574,17 +574,17 @@ function get_page_by_meta( $value ) { function create_default_pages() { /* Create neccessary pages */ - $post_content = __( 'Virtuelle Seite. Das Bearbeiten dieser Seite ändert nichts.', 'kleinanzeigen' ); + $post_content = __( 'Virtual page. Editing this page won\'t change anything.', $this->text_domain ); //Classifieds list - $kleinanzeigen_page = $this->get_page_by_meta( 'kleinanzeigen' ); - $page_id = ( $kleinanzeigen_page && $kleinanzeigen_page->ID > 0 ) ? $kleinanzeigen_page->ID : 0; + $classifieds_page = $this->get_page_by_meta( 'classifieds' ); + $page_id = ( $classifieds_page && $classifieds_page->ID > 0 ) ? $classifieds_page->ID : 0; if ( empty( $page_id ) ) { $current_user = wp_get_current_user(); /* Construct args for the new post */ $args = array( - 'post_title' => 'Kleinanzeigen', + 'post_title' => 'Classifieds', 'post_status' => 'publish', //'post_author' => $current_user->ID, 'post_type' => 'page', @@ -593,177 +593,177 @@ function create_default_pages() { 'comment_status' => 'closed' ); $page_id = wp_insert_post( $args ); - $kleinanzeigen_page = get_post( $page_id ); - add_post_meta( $page_id, "kleinanzeigen_type", 'kleinanzeigen' ); + $classifieds_page = get_post( $page_id ); + add_post_meta( $page_id, "classifieds_type", 'classifieds' ); } - $this->kleinanzeigen_page_id = $page_id; //Remember the number - $this->kleinanzeigen_page_slug = $kleinanzeigen_page->post_name; //Remember the slug + $this->classifieds_page_id = $page_id; //Remember the number + $this->classifieds_page_slug = $classifieds_page->post_name; //Remember the slug //My Classifieds - $kleinanzeigen_page = $this->get_page_by_meta( 'meine_kleinanzeigen' ); - $page_id = ( $kleinanzeigen_page && $kleinanzeigen_page->ID > 0 ) ? $kleinanzeigen_page->ID : 0; + $classifieds_page = $this->get_page_by_meta( 'my_classifieds' ); + $page_id = ( $classifieds_page && $classifieds_page->ID > 0 ) ? $classifieds_page->ID : 0; if ( empty( $page_id ) ) { $current_user = wp_get_current_user(); /* Construct args for the new post */ $args = array( - 'post_title' => 'Meine Kleinanzeigen', + 'post_title' => 'My Classifieds', 'post_status' => 'publish', //'post_author' => $current_user->ID, 'post_type' => 'page', - 'post_parent' => $this->kleinanzeigen_page_id, + 'post_parent' => $this->classifieds_page_id, 'post_content' => $post_content, 'ping_status' => 'closed', 'comment_status' => 'closed' ); $page_id = wp_insert_post( $args ); - $kleinanzeigen_page = get_post( $page_id ); - add_post_meta( $page_id, "kleinanzeigen_type", 'meine_kleinanzeigen' ); + $classifieds_page = get_post( $page_id ); + add_post_meta( $page_id, "classifieds_type", 'my_classifieds' ); } - $this->meine_kleinanzeigen_page_id = $page_id; // Remember the number - $this->meine_kleinanzeigen_page_slug = $kleinanzeigen_page->post_name; //Remember the slug + $this->my_classifieds_page_id = $page_id; // Remember the number + $this->my_classifieds_page_slug = $classifieds_page->post_name; //Remember the slug //Classifieds Checkout - $kleinanzeigen_page = $this->get_page_by_meta( 'checkout_kleinanzeige' ); - $page_id = ( $kleinanzeigen_page && $kleinanzeigen_page->ID > 0 ) ? $kleinanzeigen_page->ID : 0; + $classifieds_page = $this->get_page_by_meta( 'checkout_classified' ); + $page_id = ( $classifieds_page && $classifieds_page->ID > 0 ) ? $classifieds_page->ID : 0; if ( empty( $page_id ) ) { $current_user = wp_get_current_user(); /* Construct args for the new post */ $args = array( - 'post_title' => 'Kleinanzeigen Kasse', + 'post_title' => 'Classifieds Checkout', 'post_name' => 'checkout', 'post_status' => 'publish', //'post_author' => $current_user->ID, 'post_type' => 'page', - 'post_parent' => $this->kleinanzeigen_page_id, + 'post_parent' => $this->classifieds_page_id, 'post_content' => $post_content, 'ping_status' => 'closed', 'comment_status' => 'closed', 'menu_order' => 1 ); $page_id = wp_insert_post( $args ); - $kleinanzeigen_page = get_post( $page_id ); - add_post_meta( $page_id, "kleinanzeigen_type", 'checkout_kleinanzeige' ); + $classifieds_page = get_post( $page_id ); + add_post_meta( $page_id, "classifieds_type", 'checkout_classified' ); } $this->checkout_page_id = $page_id; // Remember the number - $this->checkout_page_slug = $kleinanzeigen_page->post_name; //Remember the slug + $this->checkout_page_slug = $classifieds_page->post_name; //Remember the slug - $kleinanzeigen_page = $this->get_page_by_meta( 'add_kleinanzeige_page' ); - $page_id = ( $kleinanzeigen_page && $kleinanzeigen_page->ID > 0 ) ? $kleinanzeigen_page->ID : 0; + $classifieds_page = $this->get_page_by_meta( 'add_classified_page' ); + $page_id = ( $classifieds_page && $classifieds_page->ID > 0 ) ? $classifieds_page->ID : 0; if ( empty( $page_id ) ) { $current_user = wp_get_current_user(); /* Construct args for the new post */ $args = array( - 'post_title' => 'Kleinanzeige hinzufügen', + 'post_title' => 'Add Classified', 'post_status' => 'virtual', //'post_author' => $current_user->ID, - 'post_parent' => $this->kleinanzeigen_page_id, + 'post_parent' => $this->classifieds_page_id, 'post_type' => 'page', 'post_content' => $post_content, 'ping_status' => 'closed', 'comment_status' => 'closed' ); $page_id = wp_insert_post( $args ); - $kleinanzeigen_page = get_post( $page_id ); - add_post_meta( $page_id, "kleinanzeigen_type", 'add_kleinanzeige_page' ); + $classifieds_page = get_post( $page_id ); + add_post_meta( $page_id, "classifieds_type", 'add_classified_page' ); } else { - if ( ! in_array( $kleinanzeigen_page->post_status, array( 'virtual', 'trash' ) ) ) { + if ( ! in_array( $classifieds_page->post_status, array( 'virtual', 'trash' ) ) ) { wp_update_post( array( 'ID' => $page_id, 'post_status' => 'virtual' ) ); } } - $this->add_kleinanzeige_page_id = $page_id; // Remember the number - $this->add_kleinanzeige_page_page_slug = $kleinanzeigen_page->post_name; //Remember the slug + $this->add_classified_page_id = $page_id; // Remember the number + $this->add_classified_page_page_slug = $classifieds_page->post_name; //Remember the slug - $kleinanzeigen_page = $this->get_page_by_meta( 'edit_kleinanzeige' ); - $page_id = ( $kleinanzeigen_page && $kleinanzeigen_page->ID > 0 ) ? $kleinanzeigen_page->ID : 0; + $classifieds_page = $this->get_page_by_meta( 'edit_classified' ); + $page_id = ( $classifieds_page && $classifieds_page->ID > 0 ) ? $classifieds_page->ID : 0; if ( empty( $page_id ) ) { $current_user = wp_get_current_user(); /* Construct args for the new post */ $args = array( - 'post_title' => 'Kleinanzeige bearbeiten', + 'post_title' => 'Edit Classified', 'post_status' => 'virtual', //'post_author' => $current_user->ID, - 'post_parent' => $this->kleinanzeigen_page_id, + 'post_parent' => $this->classifieds_page_id, 'post_type' => 'page', 'post_content' => $post_content, 'ping_status' => 'closed', 'comment_status' => 'closed' ); $page_id = wp_insert_post( $args ); - $kleinanzeigen_page = get_post( $page_id ); - add_post_meta( $page_id, "kleinanzeigen_type", 'edit_kleinanzeige' ); + $classifieds_page = get_post( $page_id ); + add_post_meta( $page_id, "classifieds_type", 'edit_classified' ); } else { - if ( ! in_array( $kleinanzeigen_page->post_status, array( 'virtual', 'trash' ) ) ) { + if ( ! in_array( $classifieds_page->post_status, array( 'virtual', 'trash' ) ) ) { wp_update_post( array( 'ID' => $page_id, 'post_status' => 'virtual' ) ); } } - $this->edit_kleinanzeige_page_id = $page_id; // Remember the number - $this->edit_kleinanzeige_page_slug = $kleinanzeigen_page->post_name; //Remember the slug + $this->edit_classified_page_id = $page_id; // Remember the number + $this->edit_classified_page_slug = $classifieds_page->post_name; //Remember the slug - $kleinanzeigen_page = $this->get_page_by_meta( 'my_classifeds_credits' ); - $page_id = ( $kleinanzeigen_page && $kleinanzeigen_page->ID > 0 ) ? $kleinanzeigen_page->ID : 0; + $classifieds_page = $this->get_page_by_meta( 'my_classifeds_credits' ); + $page_id = ( $classifieds_page && $classifieds_page->ID > 0 ) ? $classifieds_page->ID : 0; if ( empty( $page_id ) ) { $current_user = wp_get_current_user(); /* Construct args for the new post */ $args = array( - 'post_title' => 'Mein Kleinanzeigen-Guthaben', + 'post_title' => 'My Classifieds Credits', 'post_name' => 'my-credits', 'post_status' => 'virtual', //'post_author' => $current_user->ID, - 'post_parent' => $this->kleinanzeigen_page_id, + 'post_parent' => $this->classifieds_page_id, 'post_type' => 'page', 'post_content' => $post_content, 'ping_status' => 'closed', 'comment_status' => 'closed', ); $page_id = wp_insert_post( $args ); - $kleinanzeigen_page = get_post( $page_id ); - add_post_meta( $page_id, "kleinanzeigen_type", 'my_classifeds_credits' ); + $classifieds_page = get_post( $page_id ); + add_post_meta( $page_id, "classifieds_type", 'my_classifeds_credits' ); } else { - if ( ! in_array( $kleinanzeigen_page->post_status, array( 'virtual', 'trash' ) ) ) { + if ( ! in_array( $classifieds_page->post_status, array( 'virtual', 'trash' ) ) ) { wp_update_post( array( 'ID' => $page_id, 'post_status' => 'virtual' ) ); } } $this->my_credits_page_id = $page_id; // Remember the number - $this->my_credits_page_slug = $kleinanzeigen_page->post_name; //Remember the slug + $this->my_credits_page_slug = $classifieds_page->post_name; //Remember the slug - $kleinanzeigen_page = $this->get_page_by_meta( 'kleinanzeigen_signin' ); - $page_id = ( $kleinanzeigen_page && $kleinanzeigen_page->ID > 0 ) ? $kleinanzeigen_page->ID : 0; + $classifieds_page = $this->get_page_by_meta( 'classifieds_signin' ); + $page_id = ( $classifieds_page && $classifieds_page->ID > 0 ) ? $classifieds_page->ID : 0; if ( empty( $page_id ) ) { /* Construct args for the new post */ $args = array( - 'post_title' => 'Kleinanzeigen Anmeldung', + 'post_title' => 'Classifieds Signin', 'post_name' => 'signin', 'post_status' => 'virtual', //'post_author' => $current_user->ID, - 'post_parent' => $this->kleinanzeigen_page_id, + 'post_parent' => $this->classifieds_page_id, 'post_type' => 'page', 'post_content' => $post_content, 'ping_status' => 'closed', 'comment_status' => 'closed' ); $page_id = wp_insert_post( $args ); - $kleinanzeigen_page = get_post( $page_id ); - add_post_meta( $page_id, "kleinanzeigen_type", "kleinanzeigen_signin" ); + $classifieds_page = get_post( $page_id ); + add_post_meta( $page_id, "classifieds_type", "classifieds_signin" ); } else { - if ( ! in_array( $kleinanzeigen_page->post_status, array( 'virtual', 'trash' ) ) ) { + if ( ! in_array( $classifieds_page->post_status, array( 'virtual', 'trash' ) ) ) { wp_update_post( array( 'ID' => $page_id, 'post_status' => 'virtual' ) ); } } $this->signin_page_id = $page_id; //Remember the number - $this->signin_page_slug = $kleinanzeigen_page->post_name; //Remember the slug + $this->signin_page_slug = $classifieds_page->post_name; //Remember the slug } @@ -774,10 +774,10 @@ function create_default_pages() { function on_print_scripts() { echo ' + - +
@@ -127,40 +127,40 @@ - - + + =') ): ?> - + - + -

+

text_domain ); ?>

- +
- - -

+ + +

text_domain ); ?>

hierarchical) continue; $tax_name = $taxonomy->name; $labels = $taxonomy->labels; //Get this Taxonomies terms - $selected_cats = array_values( wp_get_post_terms($kleinanzeige_data['ID'], $tax_name, array('fields' => 'ids') ) ); + $selected_cats = array_values( wp_get_post_terms($classified_data['ID'], $tax_name, array('fields' => 'ids') ) ); ?> @@ -189,7 +189,7 @@ $labels = $tag->labels; //Get this Taxonomies terms - $tag_list = strip_tags(get_the_term_list( $kleinanzeige_data['ID'], $tag_name, '', ',', '' )); + $tag_list = strip_tags(get_the_term_list( $classified_data['ID'], $tag_name, '', ',', '' )); ?> @@ -207,18 +207,18 @@

- +
- $value): ?> - +
-

+

text_domain ); ?>

@@ -231,9 +231,9 @@
- + - +
diff --git a/ui-front/buddypress/style-bp-classifieds.css b/ui-front/buddypress/style-bp-classifieds.css new file mode 100644 index 0000000..cc44f57 --- /dev/null +++ b/ui-front/buddypress/style-bp-classifieds.css @@ -0,0 +1,549 @@ +/* +Styleshteet Name: Classifieds UI Front Main +Description: You can override this file in your active theme. +*/ + +/* =Styles for Classifieds Main component. +-------------------------------------------------------------- */ +.error { + background: #FFEBE8; +} +.submit { + margin: 10px 0; +} +.invalid-login { + margin-top: 10px; +} +.description { + color:#888888; + font-size:12px; +} + +.clear{ + clear:both; +} + +ul.button-nav li { + float: left; + list-style: none; + padding-right: 15px; +} + +.create-new-btn, +.credits_btn, +.checkout_btn +{ + float: right; +} + +.av-credits { + float: right; + margin-top: 0px; + color: green; +} + +#content .classifieds ul { + overflow: hidden; + margin: 0; + padding-bottom: 15px; +} + +.editfield input, +.editfield textarea, +.editfield select { + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box; + width:95%; +} + +.editfield .wp-post-image { + border: 1px solid #eaeaea; + padding: 15px; +} +.single-classifieds #content img.wp-post-image { + border: 1px solid #eaeaea; + padding: 15px; + margin: 0 15px 10px 0; +} +.cf-custom-fields .alt { + background: #F6F6F6; +} +#content .cf-custom-fields tr th { + border-top:1px solid #eaeaea; +} +.action-form, .confirm-form { + margin-top: 10px; +} +.cf-padder { + -moz-border-radius-bottomleft: 6px; + -moz-border-radius-topleft: 6px; + border-right: 1px solid #eaeaea; + margin-right: 225px; + overflow: hidden; + padding: 19px; +} + + +/* =Styles for BuddyPress profile pages and taxonomy pages +-------------------------------------------------------------- */ + +.cf-ad{ + width: 96%; + overflow: hidden; + margin: 0 5px 5px 0; + border:1px solid #eaeaea; + padding: 1em; +} + +.cf-pad{ + padding:1em; +} + +.cf-image { + float: left; + +} + +.cf-title{ + font-size: 1.2em; + font-weight: bold; + +} + +.cf-price{ + float: right; + font-size: 1.2em; + font-weight: bold; + color: #3279BB; +} + +.cf-author{ + font-weight: bold; +} +.cf-terms{ + font-weight: bold; +} +.cf-expires{ + font-weight: bold; +} + +.cf-info { + margin-left: 160px; +} + +.cf-info table{ + width: 100%; + height: 150px; + border-collapse: collapse; + margin:0 !important; +} + +.cf-info table th { + text-align: right; + width: 50px; +} + +.cf-info table th, +.cf-info table td { + padding: 0 1em; + vertical-align: middle; + border: 1px solid #eaeaea; +} + +.cf-ad form { + padding-right: 7px; + overflow: hidden; + float: right; +} + +.cf-ad form.del-form { + padding-right: 7px; +} + +/* =Styles for BuddyPress normal pages +-------------------------------------------------------------- */ +.cf-ad-info { + float: left; + width: 500px; +} +.cf-ad-info td{ + padding: 0 1em; +} + +.cf-ad-info th { + width: 20%; + vertical-align: top; + text-align: right; + border:1px solid #eaeaea; + padding: 0 1em; +} +.cf-description { + text-align: left; + border:1px solid #eaeaea; +} +.cf-description thead tr { + background: none; +} +.cf-description td { + border-top:1px solid #eaeaea; +} +.cf-custom-fields { + text-align: left; + margin-top: 20px; + border:1px solid #eaeaea; +} +.cf-custom-fields td { + border:1px solid #eaeaea; +} + +.cf-contact-form { + width: 500px; + float: left; + margin-top: -20px; + margin-left: 15px; +} + +.contact-user-btn{ + margin-bottom: 1em; +} + +/* =Styles for BuddyPress checkout page +-------------------------------------------------------------- */ +.terms { + height:100px; + overflow-x: hidden; + color:#888888; + font-size:12px; + font-family:"Helvetica Neue",Arial,Helvetica,"Nimbus Sans L",sans-serif; +} +.cf-terms { + width: inherit; +} +.cf-terms td { + vertical-align: top; +} +.cf-checkout { + width: 48%; + float: left; + margin-right: 15px; +} +.cf-checkout img { + margin-bottom: 0 !important; +} +.cf-login { + width: 48%; + float: left; +} + +#cf-message, +#cf-message-error { + background-color: #8FF57A; + color: #1A6A00; + -moz-border-radius: 3px 3px 3px 3px; + border: 1px solid #80CF70; + font-weight: normal; + margin: 3px 0px 10px 0px; + text-decoration: none; + display: block; + font-size: 12px; + padding: 5px 50px; + float: left; +} + +#cf-message-error { + background-color: #FFEBE8; + color: #000; + border: 1px solid #CC0000; +} + +.my-credits h3 { + margin: 15px 0px 15px 0px; +} + +.my-credits table { + width: inherit; +} + +/* Pagination styles */ +.cf-navigation{ + float: right; +} + +.cf-pagination { + clear:both; + padding:20px 0; + position: relative; + font-size:11px; + line-height:13px; + z-index:99; +} +.cf-pagination span, .cf-pagination a { + display:block; + float:left; + margin: 2px 2px 2px 0; + padding:6px 9px 5px 9px; + text-decoration:none; + width:auto; + color:#fff; + background: #bbb; +} +.cf-pagination a:hover{ + color:#fff; + background: #3279BB; +} +.cf-pagination .current{ + padding:6px 9px 5px 9px; + background: #3279BB; + color:#fff; +} + + +/** Sigin Form **/ +/* tabbed list */ +#login-register-password ul.cf_tabs { + padding-bottom: 0; + margin: 0; + position: relative; + list-style: none; + z-index: 1000; + float: left; +} +ul.cf_tabs li { + position: relative; + background: #fff; + border: 1px solid #E7E9F6; + border-top-right-radius: 10px; + border-top-left-radius: 10px; + line-height: 3em; + padding: 0; + margin-right: 5px; + overflow: hidden; + float: left; + z-index: 99; +} +ul.cf_tabs li a { + text-decoration: none; + padding: 0 10px; + display: block; +} + +ul.cf_tabs li.cf_active { + border-bottom: 1px solid #fff; +} +ul.cf_tabs li.cf_active a { + font-weight: bold; + color: #333; +} + +.cf_tab_container { + background: #fff; + position: relative; + margin: 0; + border: 1px solid #E7E9F6; + float: left; + width: 100%; + top: -1px; +} + +.cf_tab_content { + padding: 15px; +} +.cf_tab_content ul { + padding: 0; + margin: 0 0 0 15px; +} +.cf_tab_content li { + margin: 5px 0; +} + +/* global styles */ +#login-register-password {} +#login-register-password h3 { + border: 0 none; + margin: 10px 0; + padding: 0; +} +#login-register-password p { + margin: 0 0 15px 0; + padding: 0; +} +/* form elements */ +.wp-user-form {} +.username, +.password, +.login_fields { + margin: 7px 0 0 0; + overflow: hidden; + width: 100%; +} +.username label, +.password label { + float: left; + width: 25%; +} +.username input, +.password input { + float: left; + width: 200px; + padding: 2px 3px; + color: #777; +} +.rememberme { + overflow: hidden; + width: 100%; + margin-bottom: 7px; +} +#rememberme { + float: left; + margin: 4px 4px -4px 0; +} +.user-submit { + padding: 5px 10px; + margin: 5px 0; +} +.userinfo { + float: left; + width: 75%; + margin-bottom: 10px; +} +.userinfo p { + margin-left: 10px; +} +.usericon { + float: left; + width: 15%; + margin: 0 0 10px 22px; +} +.usericon img { + border: 1px solid #F4950E; + padding: 1px; +} + +/* Update page*/ +.cf_tax_panel{ + overflow: auto; + height:160px; + border:1px solid #ddd; +} + +.cf_tax_panel label{ + margin: 0; + padding:0; + +} +.cf_tax_panel ul{ + list-style: none outside none; + padding: 0; + margin: 0; +} + +.cf_tax_panel ul.children{ + font-size: .8em; + margin-left: 1.6em; +} + +.cf_taxonomydiv{ + float: left; + display: block; + width:47%; + margin-right: 3%; +} + +/*Categories list grid css*/ + +#cf_list_categories ul{ + padding:0; + margin:0; +} + +.cf_list_grid h2{ + background-color: #eee; + padding: .2em 1em; + border-radius: .3em; + text-align: center; + font-size: 1em; +} + +.cf_list_grid li{ + float: left; + list-style: none outside none; + min-height: 11em; + padding: .5em; + width: 19%; + margin: 0 2% 2% 0; + border: medium solid #eee; + border-radius: .4em; + font-size: small; +} + +#cf_list_categories span{ +} + +/*Categories list css*/ +.cf_list h2{ + background-color: #eee; + padding: .2em 1em; + border-radius: .3em; + text-shadow: 1px 1px #fff; +} + +.cf_list ul{ + min-width:50%; +} + +.cf_list li{ + list-style: none outside none; + margin: .6em; +} + +.cf_list div{ + float:left; + margin: 0 1em; +} + +/** File upload button +* +* this is rather empirically arrived at ratios to get the upload button +* to work in all browsers due to [type=file] weirdness between browsers +* Firefox in particualr is touchy. +*/ + +.upload-button { + cursor: pointer; + display: inline-block; + overflow: hidden; + position: relative; +} + +.upload-button input { + position: absolute; + right: 0; + top: -200%; + width: 100%; + height: 400%; + font-size: 10%; + letter-spacing: 12em; + cursor: pointer; + filter: alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; + margin-right: 10px; +} + +.upload-button .button { + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + cursor: pointer; + display: inline-block; + font-size: 11px; + margin-right: 5px; + padding: 4px 18px; + text-transform: uppercase; +} + +.upload-button .file-holder { + background: #ddd; + padding:3px; +} diff --git a/ui-front/buddypress/style-bp-kleinanzeigen-OLD.css b/ui-front/buddypress/style-bp-kleinanzeigen-OLD.css deleted file mode 100644 index cbc2970..0000000 --- a/ui-front/buddypress/style-bp-kleinanzeigen-OLD.css +++ /dev/null @@ -1,610 +0,0 @@ -/* -Styleshteet Name: Classifieds UI Front Main -Description: You can override this file in your active theme. -*/ - - -/* =Styles for Classifieds Main component. --------------------------------------------------------------- */ - -.error { - background: #FFEBE8; -} - -.submit { - margin: 10px 0; -} - -.invalid-login { - margin-top: 10px; -} - -.description { - color: #888888; - font-size: 12px; -} - -.clear { - clear: both; -} - -ul.button-nav li { - float: left; - list-style: none; - padding-right: 15px; -} - -.create-new-btn, -.credits_btn, -.checkout_btn { - float: right; -} - -.av-credits { - float: right; - margin-top: 0px; - color: green; -} - -#content .kleinanzeigen ul { - overflow: hidden; - margin: 0; - padding-bottom: 15px; -} - -.editfield input, -.editfield textarea, -.editfield select { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - /*width: 95%;*/ -} - -.editfield .wp-post-image { - border: 1px solid #eaeaea; - padding: 15px; -} - -.single-kleinanzeigen #content img.wp-post-image { - border: 1px solid #eaeaea; - padding: 15px; - margin: 0 15px 10px 0; -} - -.cf-custom-fields .alt { - background: #F6F6F6; -} - -#content .cf-custom-fields tr th { - border-top: 1px solid #eaeaea; -} - -.action-form, -.confirm-form { - margin-top: 10px; -} - -.cf-padder { - -moz-border-radius-bottomleft: 6px; - -moz-border-radius-topleft: 6px; - border-right: 1px solid #eaeaea; - margin-right: 225px; - overflow: hidden; - padding: 19px; -} - - -/* =Styles for BuddyPress profile pages and taxonomy pages --------------------------------------------------------------- */ - -.cf-ad { - width: 96%; - overflow: hidden; - margin: 0 5px 5px 0; - border: 1px solid #eaeaea; - padding: 1em; -} - -.cf-pad { - padding: 1em; -} - -.cf-image { - float: left; -} - -.cf-title { - font-size: 1.2em; - font-weight: bold; -} - -.cf-price { - float: right; - font-size: 1.2em; - font-weight: bold; - color: #3279BB; -} - -.cf-author { - font-weight: bold; -} - -.cf-terms { - font-weight: bold; -} - -.cf-expires { - font-weight: bold; -} - -.cf-info { - margin-left: 160px; -} - -.cf-info table { - width: -webkit-fill-available; - height: 150px; - border-collapse: collapse; - margin: 0 !important; -} - -.cf-info table th { - text-align: right; - width: 50px; -} - -.cf-info table th, -.cf-info table td { - padding: 0 1em; - vertical-align: middle; - border: 1px solid #eaeaea; -} - -.cf-ad form { - padding-right: 7px; - overflow: hidden; - float: right; -} - -.cf-ad form.del-form { - padding-right: 7px; -} - - -/* =Styles for BuddyPress normal pages --------------------------------------------------------------- */ - -.cf-ad-info { - float: left; - width: 500px; -} - -.cf-ad-info td { - padding: 0 1em; -} - -.cf-ad-info th { - width: 30%; - vertical-align: top; - text-align: left; - border: 1px solid #eaeaea; - padding: 0 1em; -} - -.cf-description { - text-align: left; - border: 1px solid #eaeaea; -} - -.cf-description thead tr { - background: none; -} - -.cf-description td { - border-top: 1px solid #eaeaea; -} - -.cf-custom-fields { - text-align: left; - margin-top: 20px; - border: 1px solid #eaeaea; -} - -.cf-custom-fields td { - border: 1px solid #eaeaea; -} - -.cf-contact-form { - width: 500px; - float: left; - margin-top: 20px; - margin-left: 15px; -} - -.contact-user-btn { - margin-bottom: 1em; -} - - -/* =Styles for BuddyPress checkout page --------------------------------------------------------------- */ - -.terms { - height: 100px; - overflow-x: hidden; - color: #888888; - font-size: 12px; - font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif; -} - -.cf-terms { - width: inherit; -} - -.cf-terms td { - vertical-align: top; -} - -.cf-checkout { - width: 48%; - float: left; - margin-right: 15px; -} - -.cf-checkout img { - margin-bottom: 0 !important; -} - -.cf-login { - width: 48%; - float: left; -} - -#cf-message, -#cf-message-error { - background-color: #8FF57A; - color: #1A6A00; - -moz-border-radius: 3px 3px 3px 3px; - border: 1px solid #80CF70; - font-weight: normal; - margin: 3px 0px 10px 0px; - text-decoration: none; - display: block; - font-size: 12px; - padding: 5px 50px; - float: left; -} - -#cf-message-error { - background-color: #FFEBE8; - color: #000; - border: 1px solid #CC0000; -} - -.my-credits h3 { - margin: 15px 0px 15px 0px; -} - -.my-credits table { - width: inherit; -} - - -/* Pagination styles */ - -.cf-navigation { - float: right; -} - -.cf-pagination { - clear: both; - padding: 20px 0; - position: relative; - font-size: 11px; - line-height: 13px; - z-index: 99; -} - -.cf-pagination span, -.cf-pagination a { - display: block; - float: left; - margin: 2px 2px 2px 0; - padding: 6px 9px 5px 9px; - text-decoration: none; - width: auto; - color: #fff; - background: #bbb; -} - -.cf-pagination a:hover { - color: #fff; - background: #3279BB; -} - -.cf-pagination .current { - padding: 6px 9px 5px 9px; - background: #3279BB; - color: #fff; -} - - -/** Sigin Form **/ - - -/* tabbed list */ - -#login-register-password ul.cf_tabs { - padding-bottom: 0; - margin: 0; - position: relative; - list-style: none; - z-index: 1000; - float: left; -} - -ul.cf_tabs li { - position: relative; - background: #fff; - border: 1px solid #E7E9F6; - border-top-right-radius: 10px; - border-top-left-radius: 10px; - line-height: 3em; - padding: 0; - margin-right: 5px; - overflow: hidden; - float: left; - z-index: 99; -} - -ul.cf_tabs li a { - text-decoration: none; - padding: 0 10px; - display: block; -} - -ul.cf_tabs li.cf_active { - border-bottom: 1px solid #fff; -} - -ul.cf_tabs li.cf_active a { - font-weight: bold; - color: #333; -} - -.cf_tab_container { - background: #fff; - position: relative; - margin: 0; - border: 1px solid #E7E9F6; - float: left; - width: 100%; - top: -1px; -} - -.cf_tab_content { - padding: 15px; -} - -.cf_tab_content ul { - padding: 0; - margin: 0 0 0 15px; -} - -.cf_tab_content li { - margin: 5px 0; -} - - -/* global styles */ - -#login-register-password {} - -#login-register-password h3 { - border: 0 none; - margin: 10px 0; - padding: 0; -} - -#login-register-password p { - margin: 0 0 15px 0; - padding: 0; -} - - -/* form elements */ - -.wp-user-form {} - -.username, -.password, -.login_fields { - margin: 7px 0 0 0; - overflow: hidden; - width: 100%; -} - -.username label, -.password label { - float: left; - width: 25%; -} - -.username input, -.password input { - float: left; - width: 200px; - padding: 2px 3px; - color: #777; -} - -.rememberme { - overflow: hidden; - width: 100%; - margin-bottom: 7px; -} - -#rememberme { - float: left; - margin: 4px 4px -4px 0; -} - -.user-submit { - padding: 5px 10px; - margin: 5px 0; -} - -.userinfo { - float: left; - width: 75%; - margin-bottom: 10px; -} - -.userinfo p { - margin-left: 10px; -} - -.usericon { - float: left; - width: 15%; - margin: 0 0 10px 22px; -} - -.usericon img { - border: 1px solid #F4950E; - padding: 1px; -} - - -/* Update page*/ - -.cf_tax_panel { - overflow: auto; - height: 160px; - border: 1px solid #ddd; -} - -.cf_tax_panel label { - margin: 0; - padding: 0; -} - -.cf_tax_panel ul { - list-style: none outside none; - padding: 0; - margin: 0; -} - -.cf_tax_panel ul.children { - font-size: .8em; - margin-left: 1.6em; -} - -.cf_taxonomydiv { - float: left; - display: block; - width: 47%; - margin-right: 3%; -} - - -/*Categories list grid css*/ - -#cf_list_categories ul { - padding: 0; - margin: 0; -} - -.cf_list_grid h2 { - background-color: #eee; - padding: .2em 1em; - border-radius: .3em; - text-align: center; - font-size: 1em; -} - -.cf_list_grid li { - float: left; - list-style: none outside none; - min-height: 11em; - padding: .5em; - width: 19%; - margin: 0 2% 2% 0; - border: medium solid #eee; - border-radius: .4em; - font-size: small; -} - -#cf_list_categories span {} - - -/*Categories list css*/ - -.cf_list h2 { - background-color: #eee; - padding: .2em 1em; - border-radius: .3em; - text-shadow: 1px 1px #fff; -} - -.cf_list ul { - min-width: 50%; -} - -.cf_list li { - list-style: none outside none; - margin: .6em; -} - -.cf_list div { - float: left; - margin: 0 1em; -} - - -/** File upload button -* -* this is rather empirically arrived at ratios to get the upload button -* to work in all browsers due to [type=file] weirdness between browsers -* Firefox in particualr is touchy. -*/ - -.upload-button { - cursor: pointer; - display: inline-block; - overflow: hidden; - position: relative; -} - -.upload-button input { - position: absolute; - right: 0; - top: -200%; - width: 100%; - height: 400%; - font-size: 10%; - letter-spacing: 12em; - cursor: pointer; - filter: alpha(opacity=0); - -moz-opacity: 0; - opacity: 0; - margin-right: 10px; -} - -.upload-button .button { - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border-radius: 5px; - cursor: pointer; - display: inline-block; - font-size: 11px; - margin-right: 5px; - padding: 4px 18px; - text-transform: uppercase; -} - -.upload-button .file-holder { - background: #ddd; - padding: 3px; -} \ No newline at end of file diff --git a/ui-front/buddypress/style-bp-kleinanzeigen.css b/ui-front/buddypress/style-bp-kleinanzeigen.css deleted file mode 100644 index 579e781..0000000 --- a/ui-front/buddypress/style-bp-kleinanzeigen.css +++ /dev/null @@ -1,179 +0,0 @@ -/* -Styleshteet Name: Kleinanzeigen UI Front Main -Description: Du kannst diese Datei in Deinem aktiven Design überschreiben. -*/ - -/* Tab-Styles*/ -ul.cf_tabs li { - position: relative; - background: #fff; - border: 1px solid #E7E9F6; - border-top-right-radius: 10px; - border-top-left-radius: 10px; - line-height: 3em; - padding: 0; - margin-right: 5px; - overflow: hidden; - float: left; - z-index: 99; -} - -ul.cf_tabs li a { - text-decoration: none; - padding: 0 10px; - display: block; -} - -ul.cf_tabs li.cf_active { - border-bottom: 1px solid #fff; -} - -ul.cf_tabs li.cf_active a { - font-weight: bold; - color: #333; -} - -.cf_tab_container { - background: #fff; - position: relative; - margin: 0; - border: 1px solid #E7E9F6; - float: left; - width: 100%; - top: -1px; -} - -.cf_tab_content { - padding: 15px; -} - -.cf_tab_content ul { - padding: 0; - margin: 0 0 0 15px; -} - -.cf_tab_content li { - margin: 5px 0; -} -/*Guthaben-Info*/ -.av-credits { - float: right; - margin-top: 0px; - color: green; -} - -/* =Styles for BuddyPress profile pages and taxonomy pages --------------------------------------------------------------- */ - -.cf-ad { - overflow: hidden; - margin: 0 5px 5px 0; - border: 1px solid #eaeaea; - padding: 1em; -} - -.cf-pad { - padding: 1em; -} - -.cf-image { - float: left; -} - -.cf-title { - font-size: 1.2em; - font-weight: bold; -} - -.cf-price { - float: right; - font-size: 1.2em; - font-weight: bold; - color: #3279BB; -} - -.cf-author { - font-weight: bold; -} - -.cf-terms { - font-weight: bold; -} - -.cf-expires { - font-weight: bold; -} - -.cf-info { - -} - -.cf-info table { - width: -webkit-fill-available; - height: 150px; - border-collapse: collapse; - margin: 0 !important; -} - -/* =Styles for BuddyPress checkout page --------------------------------------------------------------- */ - -.terms { - height: 100px; - overflow-x: hidden; - color: #888888; - font-size: 12px; - font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif; -} - -.cf-terms { - width: inherit; -} - -.cf-terms td { - vertical-align: top; -} - -.cf-checkout { - width: 48%; - float: left; - margin-right: 15px; -} - -.cf-checkout img { - margin-bottom: 0 !important; -} - -.cf-login { - width: 48%; - float: left; -} - -#cf-message, -#cf-message-error { - background-color: #8FF57A; - color: #1A6A00; - -moz-border-radius: 3px 3px 3px 3px; - border: 1px solid #80CF70; - font-weight: normal; - margin: 3px 0px 10px 0px; - text-decoration: none; - display: block; - font-size: 12px; - padding: 5px 50px; - float: left; -} - -#cf-message-error { - background-color: #FFEBE8; - color: #000; - border: 1px solid #CC0000; -} - -.my-credits h3 { - margin: 15px 0px 15px 0px; -} - -.my-credits table { - width: inherit; -} \ No newline at end of file diff --git a/ui-front/general/custom-fields.php b/ui-front/general/custom-fields.php index 2007310..73b4b78 100644 --- a/ui-front/general/custom-fields.php +++ b/ui-front/general/custom-fields.php @@ -23,7 +23,7 @@ if (is_array($custom_field['object_type'])){ foreach ( $custom_field['object_type'] as $custom_field_object_type ){ - if ( $custom_field_object_type == 'kleinanzeigen' ){ + if ( $custom_field_object_type == 'classifieds' ){ $output = true; break; } } diff --git a/ui-front/general/loop-author.php b/ui-front/general/loop-author.php index a43a089..0c9310e 100644 --- a/ui-front/general/loop-author.php +++ b/ui-front/general/loop-author.php @@ -36,7 +36,7 @@ 'paged' => $cf_page, 'author_name' => get_query_var( 'cf_author_name' ), 'post_status' => 'publish', - 'post_type' => 'kleinanzeigen', + 'post_type' => 'classifieds', ) ); $cf_options = $cf->get_options( 'general' ); @@ -50,9 +50,9 @@
-

+

-

+

@@ -86,27 +86,27 @@ if ( isset( $cf_options['field_image_def'] ) && '' != $cf_options['field_image_def'] ) echo 'no image'; } else { - echo get_the_post_thumbnail( get_the_ID(), 'medium' ); + echo get_the_post_thumbnail( get_the_ID(), array( 200, 150 ) ); } ?>
- + - + - + - +
post_title; ?>
has_archive) ? $obj->has_archive : ''; ?> @@ -116,16 +116,16 @@
- +
get_expiration_date( get_the_ID() ); ?>
diff --git a/ui-front/general/loop-taxonomy.php b/ui-front/general/loop-taxonomy.php index 99e5033..257d9d2 100644 --- a/ui-front/general/loop-taxonomy.php +++ b/ui-front/general/loop-taxonomy.php @@ -27,7 +27,7 @@ ?> - + pagination( $cf->pagination_top ); ?> @@ -35,9 +35,9 @@
-

+

-

+

@@ -62,7 +62,7 @@
> @@ -75,7 +75,7 @@ if ( isset( $cf_options['field_image_def'] ) && '' != $cf_options['field_image_def'] ) echo 'no image'; } else { - echo get_the_post_thumbnail( get_the_ID(), 'medium' ); + echo get_the_post_thumbnail( get_the_ID(), array( 200, 150 ) ); } ?> @@ -83,14 +83,14 @@
- + - + - + - + - +
post_title; ?>
@@ -99,9 +99,9 @@
- + @@ -109,11 +109,11 @@
get_expiration_date( get_the_ID() ); ?>
diff --git a/ui-front/general/page-author.php b/ui-front/general/page-author.php index b320636..288a075 100644 --- a/ui-front/general/page-author.php +++ b/ui-front/general/page-author.php @@ -1,7 +1,7 @@ %s", - __( 'Kleinanzeigen von: ', 'kleinanzeigen' ), + __( 'Classifieds By: ', CF_TEXT_DOMAIN ), get_option( 'siteurl' ) . $cf_author_url, $user_display, $user_display @@ -62,7 +62,7 @@ * If you want to overload this in a child theme then include a file * called loop-author.php and that will be used instead. */ - load_template( $Classifieds_Core->custom_kleinanzeigen_template( 'loop-author' ) ); + load_template( $Classifieds_Core->custom_classifieds_template( 'loop-author' ) ); ?>
diff --git a/ui-front/general/page-checkout.php b/ui-front/general/page-checkout.php index 45a264f..6d54ebb 100644 --- a/ui-front/general/page-checkout.php +++ b/ui-front/general/page-checkout.php @@ -23,13 +23,13 @@ $error = (empty($error)) ? '' : $error; if ( $this->is_full_access() && $step != 'success' && $step != 'api_call_error' ) { - _e( 'Du hast bereits Zugriff zum Erstellen von Anzeigen.', 'kleinanzeigen' ); + _e( 'You already have access to create ads.', $this->text_domain ); $step = ''; } //STEP = DISABLED if ( $step == 'disabled' ): -_e( 'Diese Funktion ist derzeit vom Systemadministrator deaktiviert.', 'kleinanzeigen' ); +_e( 'This feature is currently disabled by the system administrator.', $this->text_domain ); elseif ( !empty($error) ): ?>
- + text_domain ); ?> > use_credits && ! $this->is_full_access() ): ?> - +
@@ -115,7 +115,7 @@ @@ -126,7 +126,7 @@
- +
@@ -152,11 +152,11 @@ - + text_domain ); ?>
use_paypal ): ?> - + - +
Acceptance Mark @@ -165,7 +165,7 @@ use_authorizenet ): ?>
Solution Graphics @@ -175,7 +175,7 @@
- +
@@ -447,39 +447,39 @@
- + text_domain ); ?>
- + - + - + - + - + - + - + - + - + - + - + - + - + @@ -582,41 +582,41 @@ - + text_domain ); ?>
:text_domain ); ?>: @@ -500,36 +500,36 @@
- + - + - + - + - + @@ -658,11 +658,11 @@ -
- +
text_domain ); ?>
+text_domain ); ?>
- +text_domain) . '" view="always"]'); ?> @@ -691,40 +691,40 @@ - + text_domain ); ?>
- + text_domain), $cc['cc_street'], $cc['cc_city'], $cc['cc_state'], $cc['cc_zip'], $cc['cc_country_code']), ', ') ; ?>
- + - + - + - +
user_email : $cc['cc_email']; ?>
first_name : $cc['cc_firstname']; ?> last_name : $cc['cc_lastname']; ?>
- + text_domain), $cc['cc_street'], $cc['cc_city'], $cc['cc_state'], $cc['cc_zip'], $cc['cc_country_code']), ', ') ; ?>
- +
@@ -735,11 +735,11 @@ -
- +
text_domain ); ?>
+text_domain ); ?>

- +text_domain) . '" view="always"]'); ?> diff --git a/ui-front/general/page-kleinanzeigen.php b/ui-front/general/page-classifieds.php similarity index 85% rename from ui-front/general/page-kleinanzeigen.php rename to ui-front/general/page-classifieds.php index 68a3f27..b74abd3 100644 --- a/ui-front/general/page-kleinanzeigen.php +++ b/ui-front/general/page-classifieds.php @@ -15,12 +15,12 @@ $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; remove_filter( 'the_title', array( &$this, 'page_title_output' ), 10 , 2 ); -remove_filter('the_content', array(&$this, 'kleinanzeigen_content')); +remove_filter('the_content', array(&$this, 'classifieds_content')); $query_args = array( 'paged' => $paged, 'post_status' => 'publish', -'post_type' => 'kleinanzeigen', +'post_type' => 'classifieds', //'author' => get_query_var('author'), ); @@ -41,6 +41,6 @@ query_posts($query_args); -load_template( $this->custom_kleinanzeigen_template( 'loop-taxonomy' ) ); +load_template( $this->custom_classifieds_template( 'loop-taxonomy' ) ); if(is_object($wp_query)) $wp_query->post_count = 0; diff --git a/ui-front/general/page-meine-kleinanzeigen.php b/ui-front/general/page-my-classifieds.php similarity index 61% rename from ui-front/general/page-meine-kleinanzeigen.php rename to ui-front/general/page-my-classifieds.php index 1347eec..1b681c1 100644 --- a/ui-front/general/page-meine-kleinanzeigen.php +++ b/ui-front/general/page-my-classifieds.php @@ -19,7 +19,7 @@ $query_args = array( 'paged' => $paged, -'post_type' => 'kleinanzeigen', +'post_type' => 'classifieds', 'author' => $current_user->ID, //'posts_per_page' => 1000, ); @@ -37,9 +37,9 @@ query_posts($query_args); -$cf_path = get_permalink($this->meine_kleinanzeigen_page_id); +$cf_path = get_permalink($this->my_classifieds_page_id); -remove_filter('the_content', array(&$this, 'meine_kleinanzeigen_content')); +remove_filter('the_content', array(&$this, 'my_classifieds_content')); ?> @@ -53,29 +53,29 @@
is_full_access() ): ?> -
+
text_domain ); ?>
use_credits): ?> -
transactions->credits; ?>
+
text_domain ); ?> transactions->credits; ?>
text_domain) . '" view="loggedin"]'); ?>
- - + text_domain) . '" view="loggedin"]'); ?> + text_domain) . '" view="loggedin"]'); ?>


-

+

text_domain ); ?>

@@ -96,29 +96,29 @@ if ( ! empty( $options_general['field_image_def'] ) ) echo 'no image'; } else { - echo get_the_post_thumbnail( get_the_ID(), 'medium' ); + echo get_the_post_thumbnail( get_the_ID(), array( 200, 150 ) ); } ?>
- + - + - +
text_domain ); ?>
text_domain ); ?> - +
text_domain ); ?> get_expiration_date( get_the_ID() ); ?>
@@ -129,19 +129,19 @@ text_domain) . '" view="always" post="' . get_the_ID() . '"]'); } ?> - + - + - - + + @@ -151,9 +151,9 @@ - - - + text_domain ); ?> + text_domain ); ?> + text_domain ); ?> get_options('payments'); @@ -170,15 +170,15 @@ if( empty($field_option ) ) continue; if($this->use_credits): ?> - + - - + +
diff --git a/ui-front/general/page-my-credits.php b/ui-front/general/page-my-credits.php index 5244eba..4dbdf61 100644 --- a/ui-front/general/page-my-credits.php +++ b/ui-front/general/page-my-credits.php @@ -7,48 +7,48 @@
-

+

text_domain ); ?>

- + - + text_domain ); ?>
-

+

text_domain ); ?>

- +

- + text_domain) . '" ]'); ?>

transactions->credits_log; ?> -

+

text_domain ); ?>

diff --git a/ui-front/general/page-signin.php b/ui-front/general/page-signin.php index 843ffd4..e33e5fb 100644 --- a/ui-front/general/page-signin.php +++ b/ui-front/general/page-signin.php @@ -29,56 +29,56 @@
-

-

+

text_domain); ?>

+

text_domain); ?>

-

-

+

text_domain); ?>

+

text_domain); ?>

-

-

-

free!', 'kleinanzeigen'); ?>

+

text_domain); ?>

+

text_domain); ?>

+

free!', $this->text_domain); ?>

- +
- +
@@ -86,8 +86,8 @@
- + - + text_domain ); ?> - + text_domain ); ?>