Rich Tape
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Offering different color schemes using customizerget_theme_mod()
only returns the array key (as a string) of the chosen setting which is why you’re only seeing ‘Choice 1’You may have to do this manually, i.e.
//get what is chosen $choice = get_theme_mod( 'colorpalette_color_scheme' ); //default $colour_scheme = 'blue'; if ( $choice == "Choice 1" ) $colour_scheme = 'blue'; elseif ( $choice == "Choice 2" ) $colour_scheme = 'red'; elseif ( $choice == "Choice 3" ) $colour_scheme = 'green'; else $colour_scheme = 'gray';
Then you’ll need something like
function colorpalette_add_customizer_css() { ?> <link rel="stylesheet" href="<?php echo get_template_directory_uri();?>/css/<?php echo $colour_scheme; ?>.css" type="text/css" media="screen"> <?php } add_action( 'wp_head', 'colorpalette_add_customizer_css' );
Note the added forward slash (as
get_template_directory_uri()
doesn’t append one.Yeah I get a very similar error on the latest version. That being said, it is an improvement because I couldn’t actually authorise with dropbox in 1.7.0 ??
I’m also getting a weird SSL error with the SMTP e-mail when I use a gmail account.
[WARNING] fsockopen() [function.fsockopen]: SSL operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL routines:func(119):reason(252)
2011-04-04 17:44.13: [WARNING] fsockopen() [function.fsockopen]: Failed to enable crypto
2011-04-04 17:44.13: [WARNING] fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.gmail.com:25 (Unknown error)
2011-04-04 17:44.13: [ERROR] Can not send mail: SMTP Error: Could not connect to SMTP host.You’re *so* close with this plugin. It’s already incredible. Fixing these few bugs would make it absolutely stunning. Genuine thanks for all of your hard work.
Forum: Plugins
In reply to: [plugin: BackWPup] Not able to backup to dropboxI’ve been doing a bit of debugging based on my problem. I’ve edited your $message output on line 115 of libs>dropbox>dropbox.php to give me the output of certain things.
When I output
self::API_URL.self::API_VERSION_URL
I get
If I output
$req_req
I get:
$content
outputs nothing.
$ch
outputs
Resource id #129
and perhaps interestingly,
$req_req->sign_request($this->OAuthSignatureMethod, $this->OAuthConsumer, NULL)
outputs
Invalid response.
Hope that helps a little.
Forum: Plugins
In reply to: [plugin: BackWPup] Not able to backup to dropboxHi there, I don’t know if this helps, but the DropBox connection from “wp Time Machine, version: 1.9.16” plugin works just fine for me. — it has nowhere near amazing options that your plugin does, though (i.e. practically none).
Perhaps that will help, I’m not sure.
Forum: Plugins
In reply to: [plugin: BackWPup] Not able to backup to dropboxHi there, firstly, _amazing_ plugin. The only thing I’m having problems with is dropbox. When I press the ‘authenticate’ button I get the following error with version 1.6.2:
Fatal error: Uncaught exception ‘DropboxException’ with message ‘(0) Invalid response.’ in /location/of-/my/wp/wp-content/plugins/backwpup/app/libs/dropbox/dropbox.php:116 Stack trace: #0 /location/of-/my/wp/wp-content/plugins/backwpup/app/options-save.php(575): Dropbox->oAuthRequestToken() #1 /location/of-/my/wp/wp-content/plugins/backwpup/app/php-functions.php(149): backwpup_save_job() #2 /location/of-/my/wp/wp-includes/plugin.php(395): backwpup_options_load() #3 /location/of-/my/wp/wp-admin/admin.php(147): do_action(”) #4 {main} thrown in /location/of-/my/wp/wp-content/plugins/backwpup/app/libs/dropbox/dropbox.php on line 116
That’s on a multisite install. If I run the backup process, it creates the backups fine, and the logs, it’s just it can’t ‘do’ the dropbox authentication. Any ideas?
Forum: Plugins
In reply to: manage_posts_custom_column not workingNicolas, I think with the latest stable release of WP, if your post type has hierarchical => true, then the custom columns don’t work. Try setting it to false and see if they work.
FWIW, I think this is ‘fixed’ in the betas of 3.1.
You can also add column sorting via AJAX – wont work in 3.0.* but will work in 3.1 like so:
// Add the sorting SQL for the themes function my_themes_price_column_orderby($orderby, $wp_query) { global $wpdb,$post; $wp_query->query = wp_parse_args($wp_query->query); if ( 'price' == @$wp_query->query['orderby'] ) { $orderby = "(SELECT meta_value FROM $wpdb->postmeta WHERE post_id = $wpdb->posts.ID AND meta_key = '_price_of_theme') " . $wp_query->get('order'); } if ( 'DemoURL' == @$wp_query->query['orderby'] ) { $orderby = "(SELECT meta_value FROM $wpdb->postmeta WHERE post_id = $wpdb->posts.ID AND meta_key = '_demo_location_of_theme') " . $wp_query->get('order'); } if ( 'ID' == @$wp_query->query['orderby'] ) { $orderby = "(SELECT distinct post_id FROM $wpdb->postmeta WHERE post_id = $wpdb->posts.ID) " . $wp_query->get('order'); } return $orderby; } add_filter('posts_orderby', 'my_themes_price_column_orderby', 10, 2);
Forum: Requests and Feedback
In reply to: What Should 2011 Hold for WordPress?I’d love WordPress to really focus on becoming even more developer-friendly than it already is. By this I mean a really big push on the codex docs with up-to-date, best-practice examples as well as ensuring that all of the old WPMU-related bits and bobs have been updated for MS.
On top of that, I’d kiss the person (on the lips, if they so desired) who introduced taxonomy meta. I know there are plugins out there, but, as it stands (and as far as I understand it), taxonomies are the only ‘limited’ content within WP at the moment. Different plugins have implemented different ideas, most use a new db table (which is probably the ‘right’ thing to do) but, as such, may cause problems if the core team decide to implement this in the future (please, please do).
There’s a million and one ‘new features’ that every Tom, Dick and Harry will want, but I honestly believe WP should take a breath, consolidate, ensure everything is ‘up-to-date’. mrmist’s idea of a PHP4 code cleanup is a good example of what I mean. Set yourselves up for adding a plethora of new nicknacks by getting everything you currently have both easy-to-use and up-to-date.
Other random things that I will +1 to are:
- Remove inline CSS Styles
- Making the admin area easy to skin
- ‘built-in’ SEO – custom titles, meta descriptions and keywords
Whatever you folks do will be brilliant, useful and be done with best intentions so I will genuinely be happy with whatever you do (as long as it’s Taxonomy Meta. *ahem* ?? )
Forum: Themes and Templates
In reply to: After attempting a second status update, WP gets angry…Ah! Of course, that makes sense. Nice one, Spencer. I imagine there’s some sort of filter somewhere which can deactivate this. I’ll have a look around and post back if I find one.
Forum: Plugins
In reply to: [Plugin: IM8 Box Hide] This error occurs when accessing the plugin!Hi,
Small errors too on lines 45 and 48 of im8-box-hide.php:
Replace:
foreach ($hide[$user_role]['post'] as $box => $value) foreach (array('normal', 'advanced', 'side') as $context) remove_meta_box($box, 'post', $context); foreach ($hide[$user_role]['page'] as $box => $value) foreach (array('normal', 'advanced', 'side') as $context) remove_meta_box($box, 'page', $context);
with
if($hide[$user_role]['post']){ foreach ($hide[$user_role]['post'] as $box => $value) foreach (array('normal', 'advanced', 'side') as $context) remove_meta_box($box, 'post', $context); } if($hide[$user_role]['page']){ foreach ($hide[$user_role]['page'] as $box => $value) foreach (array('normal', 'advanced', 'side') as $context) remove_meta_box($box, 'page', $context); }
Seems to fix the similar issues (this is on WordPress 3.0 btw).
Will you be implementing options for custom post types? Just a thought – I manage them myself at the moment and create/hide the meta boxes when I actually create the custom post types, but others may find this handy! Thanks for a great plugin.
Forum: Plugins
In reply to: Using WP’s ThickBox in a pluginA hack has also been found, so if you don’t mind editing core:
Just comment out or delete line 1267:
if ( $send )
in /wp-admin/includes/media.php
This should the allow the ‘insert into post’ button to appear when a file is uploaded in the overlay. (This wasn’t found by me but just trying to keep all the info in one place)
Forum: Plugins
In reply to: Using WP’s ThickBox in a pluginAn absolute ninja friend of mine who is wise in the ways of javascript (amongst many other disciplines) has hacked and scratched away and has come up with this as a replacement for the script.js file in the tutorial from my first post:
This ONLY works for the html uploader – i.e. it doesn’t work for the Flash uploader, mainly because the flash uploader doesn’t refresh the page.
However, this adds the ‘Insert’ button when a user uploads a file and passes the url back to your form when the button is pressed.
This could possibly be extended by someone with some time finding out what function the Flash uploader calls and then writing some further javascript wrapper functions akin to the one in the file above.
You could also probably easily adjust it so that the ‘insert’ button is displayed always (i.e. before a file has been uploaded) and this would probably make it work for the flash uploader, too. Hope this helps! And I hope we get to a final conclusion soon!
Forum: Plugins
In reply to: Using WP’s ThickBox in a pluginI’ve done a bit more digging around and found the _insert_into_post_button($type)() function on line 2175 in /wp-admin/includes/media/php. I _think_ it’s because that the first if() function within that is returning false and hence not actually outputting the button.
Not entirely sure what to do with this information, though ??
For ease:
function _insert_into_post_button($type) { if ( !post_type_supports(get_post_type($_GET['post_id']), 'editor') ) return ''; if ( 'image' == $type ) return ' <tr> <td></td> <td> <input type="button" class="button" id="go_button" style="color:#bbb;" onclick="addExtImage.insert()" value="' . esc_attr__('Insert into Post') . '" /> </td> </tr> '; return ' <tr> <td></td> <td> <input type="submit" class="button" name="insertonlybutton" value="' . esc_attr__('Insert into Post') . '" /> </td> </tr> '; }
Forum: Plugins
In reply to: add a “count bubble” in menuHi Corsonr. We never managed to find a non-hacky way of doing it which is why reverted to the rather ugly way mentioned above. I wonder if one of the core devs could spread some light on the best method of going about adding this functionality to a plugin – especially with v3.0 right around the corner.
Forum: Requests and Feedback
In reply to: New Default WordPress Theme?As noted by Jane, the original default theme was an impressive and wondrous thing, 5 years ago. This is precisely what I think the 2010 theme should be. It should impress and serve (as many have noted) as an example of how to write a clean, neat, useful design.
A HTML5 Doctype surely is a given, one would hope. As is thorough and well-written inline documentation.
I would also like to see an options page which offers the user a selection of seemingly basic changes (such as to have a main menu with categories or pages) combined with somewhat ‘advanced’ options (perhaps a colour selector, or perhaps allowing a switch in the position of the sidebar) (Yes, that is the correct spelling of colour ?? )
Without wanting to reiterate what many people have said before me, I genuinely think this is a big deal for WordPress 3.0.
In the beginning, WordPress began as a tool to help produce better typographic output. It is therefore imperative that the ‘flagship’ theme should make excellent use of typography. Relatively simple things such as a vertical rhythm baseline, full declaration of the spectrum of available elements. Perhaps utilising a CSS Reset to help cross-browser compatibility. I’m not an advocate of CSS frameworks, but the developer could do worse than to look at the typography in the blueprint one.
I would hope that the theme will take advantage of some of the excellent 2.9 advances (such as how to use the post thumbnails for example).
I concur wholeheartedly with Jane’s idea for having custom page templates for a non-blog front page. This could hopefully open up a whole new area of people producing several page templates in their themes which can only be a positive thing.
I’m not sure I agree with making it a ‘framework’ as such. I’m not sure this will get utilised the way most people would think it would. An example as to how to create a theme and precisely how to use some of the advanced (and basic, of course) functions that WP offers ‘out of the box’ is a much better way forward imho.
If you really wanted to push the boat out, you could produce a couple of child themes which show people how to use these excellent little tools.
I honestly could go on for a very long time. I wont bore you all! Good luck to the person (Jane?) who will be reading and analysing all of these forum posts!