eian00
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Remove spam linki updated wordpress to the last version, and when i changed a new theme, the spam link does not appear, should i now rewrite the old theme code in new files under a new theme name. As the theme was custom made?
Forum: Fixing WordPress
In reply to: Sidebar post filterand how would it show the posts with that category and with the same value from a custom field?
now there should be a way to join mine and your code, but how?
Forum: Plugins
In reply to: [WP Custom Fields Search] Pagination Fixthank you for the replay dpierce, but it still won’t work.
I do the search with the wp-custom-fields-search-form.php template, not the searchform.php from the default template as I use a custom field search with more search fields, and then when I have to go to the next result page, it says “There are no results for your search”
so what I am using for the search is
<?php if(function_exists('wp_custom_fields_search')) wp_custom_fields_search(); ?>Forum: Plugins
In reply to: [WP Custom Fields Search] Pagination FixHello dpierce,
I am having the same problem, but I can’t find where to find
action=”<?php bloginfo(‘url’);?>”.I don’t have the file searchform.php , but wp-custom-fields-search-form.php and it’s content looks like:
<?php if($title && !(@$params['noTitle'])){ echo $params['before_title'].$title.$params['after_title']; }?> <form method='get' class='<?php echo $formCssClass?>' action='<?php echo $formAction?>'> <?php echo $hidden ?> <div class='searchform-params'> <?php foreach($inputs as $input){?> <div class='<?php echo $input->getCSSClass()?>'><?php echo $input->getInput()?></div> <?php }?> </div> <div class='searchform-controls'> <input type='submit' name='search' value='<?php _e('Search','wp-custom-fields-search')?>'/> </div> <div class='searchform-spoiler'><a href='http://www.don-benjamin.co.uk/' title='Brighton Web Development'>DB WordPress Plugins</a></div> </form>Forum: Fixing WordPress
In reply to: Using Custom Select Query and Magic fieldsI got it,
the problem was that in magic fields for color I used a Checkbox List with the list of possible colors, so once you choose the color Red for example, wordpress stores it in the database like:
a:1:{i:0;s:4:"Red";}so the correct form would be:
<?php global $wpdb; global $post; $key1 = 'color'; $val1 = 'a:1:{i:0;s:4:"Red";}'; $key2 = 'shape'; $val2 = 'square'; $querystr = " SELECT wposts.* FROM $wpdb->posts wposts, $wpdb->postmeta metacolor, $wpdb->postmeta metawgt WHERE wposts.ID = metacolor.post_id AND wposts.ID = metawgt.post_id AND (metacolor.meta_key = '$key1' AND metacolor.meta_value = '$val1') AND (metawgt.meta_key = '$key2' AND metawgt.meta_value = '$val2') AND wposts.post_type = 'post' AND wposts.post_status = 'publish' ORDER BY UPPER(wposts.post_title) ASC "; $pageposts = $wpdb->get_results($querystr, OBJECT); ?> <?php if ($pageposts): ?> <?php global $post; ?> <?php foreach ($pageposts as $post): ?> <?php setup_postdata($post); ?> <div class="post" id="post-<?php the_ID(); ?>"> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"> <?php the_title(); ?></a> </div> <?php endforeach; ?> <?php endif; ?>Forum: Fixing WordPress
In reply to: List all users by first letter in nameI am exercising on that right now, so it is just perfect your solution on the top.
Thank you again
Forum: Fixing WordPress
In reply to: List all users by first letter in nameNice it works,
I would need now just a more complex form;
next to the last and first name, display also the cimy field value, under the label “status”, and all together make a link to the users author.php page.
Thank you
Forum: Fixing WordPress
In reply to: Custom Select Query by Authors informationThank you vtxyzzy
Here is the solution on how to pull out user name, last name, and some cimy fields based on the cimy fields values:
<?php global $wpdb; global $userid; $querystr = "SELECT $wpdb->users.ID,display_name,cimy_city.VALUE as city, cimy_age.VALUE as age FROM $wpdb->users, {$wpdb->prefix}cimy_uef_data cimy_city, {$wpdb->prefix}cimy_uef_fields cimy_fields1, {$wpdb->prefix}cimy_uef_data cimy_age, {$wpdb->prefix}cimy_uef_fields cimy_fields2 WHERE $wpdb->users.ID = cimy_city.USER_ID AND $wpdb->users.ID = cimy_age.USER_ID AND cimy_city.FIELD_ID = cimy_fields1.ID AND cimy_fields1.NAME ='CITY' AND cimy_age.FIELD_ID = cimy_fields2.ID AND cimy_fields2.NAME ='AGE' AND cimy_city.VALUE = 'Madrid' AND cimy_age.VALUE = 55"; $authorset = $wpdb->get_results($querystr, OBJECT); if ($authorset): global $wpdb; echo '<ul>'; foreach ($authorset as $userid){ $user_id = (int) $userid->ID; $userdata = get_userdata($user_id); $user_fullname = $userdata->last_name . ', ' . $userdata->first_name; $user_url = add_query_arg('author',$user_id, get_bloginfo('url')); $user_link = "<a href='$user_url' alt='Link To Author $user_id' >$user_fullname</a>"; $return = "\t" . "<li>$user_link $userid->age $userid->city</li>" . "\n"; print($return); } echo '</ul>'; endif; ?>Forum: Fixing WordPress
In reply to: Custom Select Query by Authors informationok, I sent you a mail
Forum: Fixing WordPress
In reply to: Custom Select Query by Authors informationwhen I am saying putting default values to fields, I mean putting them in in the values fields on the Cimy User Extra Fields options page.
Forum: Fixing WordPress
In reply to: Custom Select Query by Authors informationOk, so something strange is happening.
The only way I get some results is when in the AGE field I set up a default value that will be applied automatically to all users; for example ’55’. The same for the field CITY example ‘Madrid’.
now when the code matches the values Madrid and 55 like in the code below;
<?php global $wpdb; global $userid; $querystr = "SELECT wp_users.ID, user_login, display_name, cimy_age.VALUE as age, cimy_city.VALUE as city FROM wp_users JOIN wp_cimy_uef_fields cimy_fields1 ON cimy_fields1.NAME = 'CITY' JOIN wp_cimy_uef_fields cimy_fields2 ON cimy_fields2.NAME = 'AGE' JOIN wp_cimy_uef_data cimy_age ON (cimy_age.USER_ID = wp_users.ID AND cimy_age.FIELD_ID = cimy_fields2.ID) JOIN wp_cimy_uef_data cimy_city ON (cimy_city.USER_ID = wp_users.ID AND cimy_city.FIELD_ID = cimy_fields1.ID) WHERE cimy_fields1.VALUE = 'Madrid' AND cimy_fields2.VALUE = '55'"; $authorset = $wpdb->get_results($querystr, OBJECT); ?> <?php if ($authorset): ?> <?php global $wpdb; ?> <?php echo '<ul>'; foreach ($authorset as $userid){ $return = ''; $user_id = (int) $userid->ID; $user_data = get_userdata($user_id); $return .= "\t" . "<li>$user_data->first_name $user_data->last_name $userid->age $user_id->city</li>" . "\n"; print($return); } echo '</ul>'; ?> <?php endif; ?>I don’t get still any results.
But from the moment I go manually change in a profile page the city or age, i get displayed the users name, surname, age (no city is displayed) of the modified profiles.There is no result in any other way
What is wrong?
Forum: Fixing WordPress
In reply to: Custom Select Query by Authors informationNo, sorry, now it worked at the end, I had to change the order of the cimy fields of CITY and AGE to position #1 and #2
It just shows some wrong results.
I will let you know when I find out what is wrong.
Forum: Fixing WordPress
In reply to: Custom Select Query by Authors informationNo results, blank page, can you show me a simple example then, only how to show all the users having the same cimy field, let’s say HEIGHT is 190.
Just to see if it gets correctly the cimy data
Forum: Fixing WordPress
In reply to: Custom Select Query by Authors informationOw sorry, for surname I mean the value that stays in the “Last name” field in the Profiles page, so it is not under cimy.
So I have under cimy fields: CITY, AGE
From the original wordpress profile page: name, surname.The final print if user exists would show the users name, surname and next to it his city and age.
Forum: Fixing WordPress
In reply to: Custom Select Query by Authors informationi removed
<?php endforeach; ?>and there is no rerror anymore, but there is also nothing showing on the page. The cimy field names and values are correct.
Can it be maybe something wrong with the second part;<?php if ($authorset): ?> <?php global $wpdb; ?> <?php foreach ($authorset as $userid){ $user_id = (int) $userid->ID; $surname = get_cimyFieldValue($userid, 'SURNAME'); $return .= "\t" . '<li>'. $surname .'</li> ' . "\n"; print($return); } ?> <?php endif; ?>Thank you for helping