skozyk
Forum Replies Created
-
Forum: Plugins
In reply to: [New User Approve] Users Created on Failed Form SubmissionThanks again for your quick response. I’m using S2Memeber. Here’s the page
Thanks.
Forum: Plugins
In reply to: [New User Approve] Users Created on Failed Form SubmissionThank you so much for the quick response Josh. I tried the above solution and I’m still getting the same result as described above. It’s not working unfortunately. Is there something else you’d like me to try?
Forum: Plugins
In reply to: [New User Approve] Users Created on Failed Form SubmissionLingoSam,
Thank you for the quick response and solution.
Our functions.php doesn’t include the registration_errors filter. How would we solve the above situation with a generic theme functions.php file, for argument sake a blank one?
Thank you.
Forum: Fixing WordPress
In reply to: Export a single categoryGood question.
Forum: Fixing WordPress
In reply to: Displaying Register Plus DataSimply put, I’d like to know how to display Register Plus data in alphabetical order by the users last name.
Thank you.
Forum: Everything else WordPress
In reply to: how to get a xml driven flash movie to work in wordpressDid you ever solve this? I can get it to work using absolute links in both my XML and in the .fla ActionScript where it calls the XML file. It will work this way, but there’s got to be a more dynamic solution.
Forum: Fixing WordPress
In reply to: Displaying Register Plus DataI’ve been trying to solve how to get my results to display alphabetically by first_name from the usermeta table since your last post minus a few hours of shut eye and I feel I’m pretty well stuck. I realize this is getting beyond the scope of Register Plus and appreciate your consideration of help.
I located the functions you use in your provided code and tried to modify them to include an ORDER BY $wpdb->first_name ASC (also tried some other methods). I copied these functions below for reference.
One of the problems is the get_row function returns the results I need, however it doesn’t seem that you can use ORDER BY in the statement because it is looping through selecting single rows one at a time.
I think what it comes down to is if each key in the usermeta table was stored in it’s own field, I’d be able to easily write a select statement that alphabetizes ASC, but because I need to alphabetize by a key in the meta_key field with values stored in the meta_value field, I’m having trouble. Do you have a solution for this?
(WP functions used in above code snippet listed below for reference)
get_users_of_blog()
Defined at: * /wp-includes/user.php -> line 218/** * Get users for the blog. * * For setups that use the multi-blog feature. Can be used outside of the * multi-blog feature. * * @since 2.2.0 * @uses $wpdb WordPress database object for queries * @uses $blog_id The Blog id of the blog for those that use more than one blog * * @param int $id Blog ID. * @return array List of users that are part of that Blog ID */ function get_users_of_blog( $id = '' ) { global $wpdb, $blog_id; if ( empty($id) ) $id = (int) $blog_id; $users = $wpdb->get_results( "SELECT user_id, user_login, display_name, user_email, meta_value FROM $wpdb->users, $wpdb->usermeta WHERE " . $wpdb->users . ".ID = " . $wpdb->usermeta . ".user_id AND meta_key = '" . $wpdb->prefix . "capabilities' ORDER BY {$wpdb->usermeta}.user_id" ); return $users; }
—————————————–
get_userdata()
Defined at: * /wp-includes/pluggable.php -> line 113/** * Retrieve user info by user ID. * * @since 0.71 * * @param int $user_id User ID * @return bool|object False on failure, User DB row object */ function get_userdata( $user_id ) { global $wpdb; $user_id = absint($user_id); if ( $user_id == 0 ) return false; $user = wp_cache_get($user_id, 'users'); if ( $user ) return $user; if ( !$user = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->users WHERE ID = %d LIMIT 1 ORDER BY $wpdb->business_name ASC", $user_id)) ) return false; _fill_user($user); return $user; } endif; if ( !function_exists('update_user_cache') ) : /** * Updates a users cache when overridden by a plugin. * * Core function does nothing. * * @since 1.5 * * @return bool Only returns true */ function update_user_cache() { return true; } endif;
————————————————–
get_row()
Defined at: * /wp-includes/wp-db.php -> line 723/** * Retrieve one row from the database. * * @since 0.71 * * @param string $query SQL query * @param string $output ARRAY_A | ARRAY_N | OBJECT * @param int $y Row num to return * @return mixed Database query results */ function get_row($query = null, $output = OBJECT, $y = 0) { $this->func_call = "\$db->get_row(\"$query\",$output,$y)"; if ( $query ) $this->query($query); else return null; if ( !isset($this->last_result[$y]) ) return null; if ( $output == OBJECT ) { return $this->last_result[$y] ? $this->last_result[$y] : null; } elseif ( $output == ARRAY_A ) { return $this->last_result[$y] ? get_object_vars($this->last_result[$y]) : null; } elseif ( $output == ARRAY_N ) { return $this->last_result[$y] ? array_values(get_object_vars($this->last_result[$y])) : null; } else { $this->print_error(/*WP_I18N_DB_GETROW_ERROR*/" \$db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N"/*/WP_I18N_DB_GETROW_ERROR*/); } }
Forum: Fixing WordPress
In reply to: Displaying Register Plus DataLast question Michael, How do display users in alphabetical order? I know how to do it with a SELECT statement and ASC, but I’m not sure how to do with the above method I’m using. Right now it displays by user_id.
Forum: Fixing WordPress
In reply to: Displaying Register Plus DataThanks Michael. I accomplished it by adding:
if ($user->user_login == $user->user_nicename)
Once the user is verified by the admin the user_login field is changed from unverified__xxxxx to the same value as the user_nicename field. So I check to see if user_login is equal to user_nicename.
Do you see any potential problems doing it this way?
Forum: Fixing WordPress
In reply to: Displaying Register Plus DataMichael,
Thank you very much for your quick response. The code snippet you provided was absolutely what I was looking for. It works perfectly. I also appreciate you commenting the code.
After getting the code added to my site and working properly I realized that I don’t want to display the data until the admin approves the new user registration. I found that the unverified user info is stored in the user_login field of the wp_users table. I also see that the actual user name is stored in the user_nicename field. When a user has been approved the value in user_login equals user_nicename.
Would you be willing to add the necessary code to the code you provided above to only show the data if a user has been approved by the admin? I’d also like to show the data in ascending alphabetical order by, let’s say, first name.
Thanks again,
Steve
Forum: Fixing WordPress
In reply to: [Plugin: Global Translator] Unreachable URLs and No sitemap anymore!I’m having a very similar problem. In Google webmaster tools, I’m getting almost 3,000 unreachable URLs. In addition, my pages aren’t being translated automatically. After the Global Translator plugin has been installed for 1 week, only 28 pages have been actually translated. I also have no Google XML sitemap integration.
Davide, I think Global Translator, when perfected has the potential to be one of the best plugins of ALL TIME for WordPress, but it just isn’t working for many WordPress users and I haven’t been able to find you supporting the plugin anywhere.
We’d appreciate your help and guidance.
Thank you for your hard work developing Global Translator.