Texiwill
Forum Replies Created
-
Forum: Plugins
In reply to: [sidebarTabs] sidebarTabs broken with 3.0.2Hello,
This is definitely a WP 3.0.2 issue, Wassup has nothing to do with it. I deactivated Wassup and it still occurs.
Best Regards,
EdwardHello,
I opened ticket #119 on your trac but the Trac must have issues as it spits out errors everytime I try to logout then login… Makes this somewhat unusable.
Now I cannot add anything to the ticket… Namely that if I pass $this (transposh object) to the widget instantiation code pass by reference nothing changes.
Best regards,
EdwardHello,
Not really the problem. The problem is that the $this->transposh->transposh_plugin_dir variable has NO value in the widget object after instantiation.
I have printed things out before init and then after init of the widget object. Has no value, hence why the code fails to load properly without modification.
Best regards,
EdwardWell still broken. Only solution is to use what I already mentioned. Perhaps you need a conditional that says if it is set to null then use a defaul. And yes it still gets included more than once.
Not sure what settings you need… I am definitely not messing with that variable anywhere.
Hello,
This code change is to gAnnounce/gAnnounce.php
Best regards,
EdwardStill empty…. Still broken…. Still includes more than once.
transposh_plugin_dir just gets set to empty string.
To fix this I did modified /views/_edit-slide.php to make the following change:
<!-- <textarea name="slide[<?php echo $count; ?>][content]" cols="80" rows="10" class="horizontal slide-content" id="<?php echo $editor_id; ?>"><?php echo htmlspecialchars( slidedeck_process_slide_content( $slide['content'] ), ENT_QUOTES ); ?></textarea> --> <textarea name="slide[<?php echo $count; ?>][content]" cols="80" rows="10" class="horizontal slide-content" id="<?php echo $editor_id; ?>"><?php echo $slide['content']; ?></textarea>
Here is a diff that implements ‘cats-to-include’:
148,149d147 < $instance['include-cats']['active'] = $new_instance['include-cats']; < $instance['include-cats']['cats'] = empty($new_instance['included']) ? '' : (ctype_digit(str_replace(",", "", $new_instance['included']))) ? $new_instance['included'] : ''; 203,206d200 < 'include-cats' => array( < 'active' => false, < 'cats' => '' < ), 286,293d279 < <input type="checkbox" class="checkbox" <?php echo ($instance['include-cats']['active']) ? 'checked="checked"' : ''; ?> id="<?php echo $this->get_field_id( 'include-cats' ); ?>" name="<?php echo $this->get_field_name( 'include-cats' ); ?>" /> <label for="<?php echo $this->get_field_id( 'include-cats' ); ?>"><?php _e('Include categories', 'wordpress-popular-posts'); ?></label> <small>[<a href="<?php echo bloginfo('url'); ?>/wp-admin/options-general.php?page=wordpress-popular-posts/wordpress-popular-posts.php">?</a>]</small><br /> < <?php if ($instance['include-cats']['active']) : ?> < <fieldset class="widefat"> < <legend><?php _e('Categories to include', 'wordpress-popular-posts'); ?></legend> < <label for="<?php echo $this->get_field_id( 'included' ); ?>"><?php _e('ID(s) (comma separated, no spaces):', 'wordpress-popular-posts'); ?></label><br /> <input id="<?php echo $this->get_field_id( 'included' ); ?>" name="<?php echo $this->get_field_name( 'included' ); ?>" value="<?php echo $instance['include-cats']['cats']; ?>" class="widefat" style="width:150px" /><br /><br /> < </fieldset> < <?php endif; ?> < <br /> 608,627d593 < < if ( $instance['include-cats']['active'] && !empty($instance['include-cats']['cats']) ) { < $include = " AND $wpdb->posts.ID IN ( < < SELECT object_id < FROM $wpdb->term_relationships AS r < JOIN $wpdb->term_taxonomy AS x ON x.term_taxonomy_id = r.term_taxonomy_id < JOIN $wpdb->terms AS t ON t.term_id = x.term_id < WHERE x.taxonomy = 'category' < AND object_id IN < ( < SELECT object_id < FROM $wpdb->term_relationships AS r < JOIN $wpdb->term_taxonomy AS x ON x.term_taxonomy_id = r.term_taxonomy_id < JOIN $wpdb->terms AS t ON t.term_id = x.term_id < WHERE x.taxonomy = 'category' < AND t.term_id IN (".$instance['include-cats']['cats']."))) "; < } else { < $include = ""; < } 629c595 < $mostpopular = $wpdb->get_results("SELECT $wpdb->posts.ID, $wpdb->posts.post_title $fields FROM $wpdb->posts $join WHERE $wpdb->posts.post_status = 'publish' AND $wpdb->posts.post_password = '' AND $range $force_pv $nopages $include GROUP BY $wpdb->posts.ID ORDER BY $sortby DESC LIMIT " . $instance['limit'] . ""); --- > $mostpopular = $wpdb->get_results("SELECT $wpdb->posts.ID, $wpdb->posts.post_title $fields FROM $wpdb->posts $join WHERE $wpdb->posts.post_status = 'publish' AND $wpdb->posts.post_password = '' AND $range $force_pv $nopages $exclude GROUP BY $wpdb->posts.ID ORDER BY $sortby DESC LIMIT " . $instance['limit'] . ""); 1034d999 < 'cats_to_include' => '', 1078,1081d1042 < 'include-cats' => array( < 'active' => empty($cats_to_include) ? false : (ctype_digit(str_replace(",", "", $cats_to_include))) ? true : false, < 'cats' => empty($cats_to_include) ? '' : (ctype_digit(str_replace(",", "", $cats_to_include))) ? $cats_to_include : '' < ), 1198c1159 < */ --- > */
Hello,
What about adding a ‘cat_to_include’ type of approach instead. I want only one of my X categories….
Thoughts?
https://www.virtualizationpractice.com
GO to the Left, under the ‘Tweets’ header of the Tabs.
WIthin my ‘error_log’ file for Apache….
On latest error:
The solution could be:
Change line 112 to read something like the following:
if (!is_wp_error($result) && $result[‘response’][‘code’] == 200) {As the $result was not checked if it was an ‘error’
Yes, I know it assigns empty string to the tweet blender, mainly because I rather NOT have the errors. It was filling up my log….
I also occasionally see:
PHP Fatal error: Cannot use object of type WP_Error as array in /usr/share/wordpress/wp-content/plugins/tweet-blender/ws.php on line 112,
– Edward
I am using PHP 5 so that is not the real issue. the problem is that the $tweets variable is NOT an array…. I had to add in just before line 374 the following once more.
if (!is_array($tweets)) { $tweets=Array(); }
This ensures that ‘tweets’ is always an array which is what ‘foreach’ wants to use. BTW, I am using PHP v5.2.9. So it is definitely NOT the v4.0 issue you mentioned. It is the fact that $tweets is NOT an array.
I had this problem on Line 707, with $version = “1.6.10.2” and the solution was pretty straight forward. The problem I saw was that $category_description was being converted to a WP_Error when there was a problem with the category_description for some reason. Not sure why that is happening yet. So if this does happen I just put in a simple test…. It will alleviate the error but SEO does not appear to suffer. I use the Multibox plugin and saw this error only when that was in use….
Change:
$title = str_replace(‘%category_description%’, $category_description, $title);to be:
if(!is_object($category_description)) {
$title = str_replace(‘%category_description%’, $category_description, $title);
} else {
$title = str_replace(‘%category_description%’, ”, $title);
}