chavo
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Default parameters/attributes for post gallery shortcodeHi lancemonotone. Can you post your entire function?
Thanks in advance.
Forum: Plugins
In reply to: Client/Partner Logo Display PluginHi I’m looking for same function. The only way I think to get this is combining roles and jquery.
1) Install a role manager plugin. Create a new role called “Clients”. Add news users with this role (if you want to upload logos, you will need to instal User Photo plugin too).
2) Display users with “Client” role via handcoding this function.
3) Make the slider using this jquery plugin
http://www.smoothdivscroll.com/multipleAutoscrollers.htm
http://www.smoothdivscroll.com/clickableLogoParade.htmI know that this isn’t the best solution, but is the nearest I catch to get what you are looking for. The bad think is that I will can’t order users by “relevance” in the future (users can be ordered, by ID, nicename for example).
I also looking for a wordpress plugin to do this easier.
ps: sorry for my english.
Forum: Plugins
In reply to: [Reliable Twitter] [Plugin: Reliable Twitter] Tweets not loadingHi Sparkweb. I finally used the Twitter widget customized via css because I needed to show my client how the site will looks.
I tried with your plugin for a day with no results. Anyway, thanks for your help. I apreciate a lot the work that plugin developers do.
ps: sorry for my english.
Forum: Plugins
In reply to: [Taxonomy Images II] ciii_term_images() return image with no sourceHi Simon. Thanks for your reply. I’m using lastest version of the plugin. I just want to use the plugin as referred in the “Other notes” section.
For example, I want to be able to call category icons via ID but instead I tried with all te code posibilities, I cant’ get it to work, so I came with this hack for categories IDs http://wordpress.org/support/topic/ciii_category_images-wont-work-outside-the-loop?replies=3 (It is a little limited because of the file extension. I edited the code to show .gif). In this way I get what I looking for.
I don’t understand at all how taxonomies works (maybe because I never created new ones on my admin), but like I said, I tried with the code just like is referred in the plugin page but can’t get it working. The plugin is really useful (It would be nice if WordPress came with this utility by default). Maybe I’m doing something wrong…
Once again, thanks!
ps: sorry for my english.
Forum: Plugins
In reply to: [Taxonomy Images II] Png images with black backgroundThanks madjax! I will take a look.
Forum: Plugins
In reply to: [Taxonomy Images II] Png images with black backgroundLooking at the referred post and taking a look at the class-Category-Images-II.php file I think that the problem resides in how the plugin generates the thumbnail image:
protected function save_thumb( $original_file, $thumb_file ) { // Scale the image. list( $w, $h, $format ) = getimagesize( $original_file ); $max_side = $this->get_max_side(); $xratio = $max_side / $w; $yratio = $max_side / $h; $ratio = min( $xratio, $yratio ); $targetw = (int) $w * $ratio; $targeth = (int) $h * $ratio; $src_gd = $this->image_create_from_file( $original_file ); assert( $src_gd ); $target_gd = imagecreatetruecolor( $targetw, $targeth ); imagecopyresampled ( $target_gd, $src_gd, 0, 0, 0, 0, $targetw, $targeth, $w, $h ); // create the initial copy from the original file // also overwrite the filename (in case the extension isn't accurate) $success = false; if ( $format == IMAGETYPE_GIF ) { $success = imagegif( $target_gd, $thumb_file ); } elseif ( $format == IMAGETYPE_JPEG ) { $success = imagejpeg( $target_gd, $thumb_file, 90 ); } elseif ( $format == IMAGETYPE_PNG ) { $success = imagepng( $target_gd, $thumb_file ); } else { wp_die( __( 'Unknown image type. Please upload a JPEG, GIF or PNG.', 'category-images-ii' ) ); } if ( ! $success ) wp_die( __( 'Image resizing failed.', 'category-images-ii' ) ); }Unfortunately, I’m not a code master to try to fix it. Any solve?
ps: sorry for my english
Forum: Plugins
In reply to: [Taxonomy Images II] Png images with black backgroundHi. Thanks for your reply. I used a png-24 image with transparency. I need transparency/alpha channel.
Forum: Plugins
In reply to: [Taxonomy Images II] ciii_term_images() return image with no sourceHello. I’m having same issue. I just changed a bit the code (for display archive images) in term-images.php from this:
<img src="<?php echo $term[ 'image' ]; ?>" alt="<?php echo $term[ 'name' ]; ?>" />to this:
<img src="<?php echo $term[ 'thumbnail' ]; ?>" alt="<?php echo $term[ 'name' ]; ?>" />Hope this help.
ps: sorry for my english.
Forum: Plugins
In reply to: [Custom Field Template] Any fix to Add New bug?Looking at the source code, I figured out that when duplicate (Add new) fieldset the $rand value for the switch button remains the same value. I guess that this is the reason why switching affects original fieldset only. Unfortunately I’m not a code master to find a solution :(.
Any ideas?
Thanks in advance.
Forum: Fixing WordPress
In reply to: how to exclude author name in admin postsYou can do something like this:
<?php $getid = $posts[0]->post_author; if($getid == 1){ ?> /* DISPLAY ADMIN NAME BUT NOT LINK TO AUTHOR PAGE */ Published by <?php the_author(); ?> <?php } else { ?> Published by <?php the_author_posts_link(); ?> <?php } ?>Or, if you don’t want to display name
<?php $getid = $posts[0]->post_author; if($getid == 1){ ?> <?php } else { ?> Published by <?php the_author_posts_link(); ?> <?php } ?>Note id == 1 its default admin ID.
Hi to everyone. First at all, sorry for my english. Well…I was looking for this (inserting a login / registration form into a page) for a while. I found some plugins to do it but no one fills my entire goals. So, what I’m currently doing is inserting the form coding it manually. Yes…manually!
The basic steps I follow are next:
1) Go to login / registration url.
2) Look at source code and copy it (only form part).
3) Put this code into a php template file.
4) Clean the code.
5) Validate the fields via ajax (jQuery). Currently I’m not able to validate existing emails via ajax but I will explain how to do it in next steps or inserting and password strength meter (I don’t know how to do it).
6) Insert a hidden field with redirect_to value.Then, I open wp-login.php page and go to this part:
} elseif ( email_exists( $user_email ) ) { $errors->add( 'email_exists', __( '<strong>ERROR</strong>: This email is already registered, please choose another one.' ) ); }and edited like this
} elseif ( email_exists( $user_email ) ) { wp_redirect(('LINK_TO_THE_PAGE_WITH_REGISTRATION_FORM/?action=registeredEmail') ); $errors->add( 'email_exists', __( '<strong>ERROR</strong>: This email is already registered, please choose another one.' ) ); }Note the variable “registeredEmail”. So, I put a conditional php tag that shows the error message into my template file. Something like this:
<?php if($_GET['action']=="registeredEmail") { ?> <div class="errorForm" id="errorEmail">Email account is already registered. Please, enter another email address</div> <?php } else { ?> <div class="errorForm" id="errorEmail"></div> <?php } ?>That’s all. I know that maybe this is not the best solution or that this process can be perfectioned. It is working for me.
You can also that a look at this post
http://wordpress.org/support/topic/alternative-registration-page?replies=4I don’t tested it yet but It looks good.
Hope this helps you.
ps: once again, sorry for my english.
Forum: Fixing WordPress
In reply to: Latest 5 authors sorted by posting dateMichael…you rocks man!!! Thank you a lot, really! I came from this topic http://wordpress.org/support/topic/show-latest-posts-by-all-authors and then I found this solution. I rewrite the code to show some extra info. Here is the code:
<?php //list 6 latest contributors $authors = array(); $count = 0; $args=array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => -1, 'caller_get_posts'=> 1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { echo 'Latest 6 contributors'; while ($my_query->have_posts() && $count < 6) : $my_query->the_post(); $author_id=$my_query->post->post_author; $user = new WP_User( $author_id ); if ( !empty( $user->roles ) && is_array( $user->roles ) && !in_array('administrator',$user->roles)) { if (!in_array($author_id,$authors)) { ?> <?php echo '<p>'; ?> <a href="<?php echo $user_link; ?>" title="<?php echo $user->display_name; ?>"><?php echo get_avatar( $user->ID, 80, 'http://www.naciondeaccion.com/v1/wp-content/themes/default/images/ndaAvatar.gif' ); ?></a> <?php if($user->deporte) { ?> <?php echo $user->deporte; ?> <?php } ?> <?php the_author_posts_link(); ?> <a href="<?php the_permalink();?>"><?php the_title(); ?></a> <?php echo '</p>'; ?> <?php $count++; $authors[]=$author_id; } } endwhile; } wp_reset_query(); // Restore global post data stomped by the_post(). ?>I limit to display no administrator users with !in_array(‘administrator’,$user->roles) but I can figure out how to display only editors and contributors. How can I do it?
Once again thanks!
Forum: Fixing WordPress
In reply to: Show latest posts by all authorsHi. I was lookig for a while a solution similar to this one all over the internet and the forum support but I can’t find one solution that fits what I need. Is there a way to limit the post to X amount of authors? I mean, I need to show the latest 4 post published with:
– Post title and link
– Author avatar
– Author extra profile info (I add an extra profile field labeled as “sport”).Any solution? Thanks in advance.
Forum: Plugins
In reply to: [More Fields] [Plugin: More Fields] Unable to delete valuesWell. I get into the database and in fact I found empty meta fields. So…the problem is that instead of erasing/editing values from WordPress admin, there aren’t erased from database. Is this a bug? Any way to fix it?
Forum: Fixing WordPress
In reply to: How to add a banner to the header, under the nav barIt depends based on your layout design. But all elements must be inside the html structure. Maybe below <div id=”header”>
ps: sorry for my bad english.