tomgf
Forum Replies Created
-
Forum: Networking WordPress
In reply to: how to remove category base /blogThanks for the info, Hubert.
I had developed a plugin myself (back then when WP 2.x was the top version), interacting with $wp_rewrite.
Unfortunately, the plugin doesn’t work that well with the latest versions – my fault basically – particulary it has problems flushing the rules…
Knowing that you can just edit Super Admin > Sites > Edit to handle this was a good thing.
Forum: Plugins
In reply to: How do I use “new WP_Query()” within a plugin?I found a similar problem writing a widget plugin.
I was using this structrure:
<?php $my_query = new WP_Query('category_name=featured&showposts=1'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?> <!-- Do stuff... --> <?php endwhile; ?>I found out that the proper values (the ones that you want to call in the Do stuff space) are not in $post but in $my_query->post. Maybe was it also your case?
Forum: Plugins
In reply to: [Plugin: Audio Player] Version 2.0 beta releasedI was testing the plugin with WordPress 2.7.1, browsing on a Macintosh (both Safari and Firefox). I found two inconveniences:
a. couldn’t make it paste the proper code into the Link URL field using the Audio Player button.
if ($post->post_mime_type == 'audio/mpeg') { - $form_fields["url"]["html"] .= "<button type='button' class='button audio-player-" . $post->ID . "' value='[audio:" . attribute_escape($file) . "]'>Audio Player</button>"; + $form_fields["url"]["html"] .= "\t\t\t\t<button type='button' class='button audio-player-" . $post->ID . "' title='[audio:" . attribute_escape($file) . "]'>Audio Player</button>\r"; - $form_fields["url"]["html"] .= "<script type='text/javascript'> - jQuery('button.audio-player-" . $post->ID . "').bind('click', function(){jQuery(this).siblings('input').val(this.value);}); - </script>\n"; }b. Insert into post paste a link into the content
I added a new filter inside function AudioPlayer:
add_filter('media_send_to_editor', array(&$this, "media_send_to_editor"));and then, this function:
function media_send_to_editor( $html ) { if ( preg_match('/(\[audio:[^\]]+\])/i', $html, $matches) ) $html = $matches[1]; return $html; }These two changes made it work as I expected.
Forum: Fixing WordPress
In reply to: wp-cron is having mod_security error 500So far, my solution was to add this to every host running WP (either in Apache conf files – a recommende method – or in .htaccess):
<Files ~ "wp-cron\.php$"> <IfModule mod_security.c> SecFilterEngine Off </IfModule> Order Deny,Allow Deny from All Allow from my.own.IP.address </Files>Forum: Developing with WordPress
In reply to: Category ID from current URL nicenameUsing the code that you’ve posted, you’ll have the last category on the array (if you use
$current_name .= $category->cat_nameyou’ll have a concatenation of these values).What about using the function
get_category_by_path()?Just my two cents…
Forum: Fixing WordPress
In reply to: !Multiple installations – Advice on subdirectory / or WPUSIt all depends. You have to consider different things.
As far as I understand (and please correct me if I’m wrong):
– if you want to have different domains, you have to install several WPs
– if you want one domain with subdomains or sub-directories, WPMU will cut itThis is just the first consideration, I think.
Forum: Developing with WordPress
In reply to: Taxonomy: same slug, different taxonomyThanks for your comments. I have a clearer picture and know better where to look for a solution. Or – considering your arguments – rethink about content organization.
Forum: Developing with WordPress
In reply to: Taxonomy: same slug, different taxonomyI don’t have the intention of starting a discussion round # 10,001, but if this was discussed 10,000 times, how can it be that there isn’t a solution?
Nevertheless, I think in this case the taxonomy system is not fulfilling some basic needs. At least in my case.
I do care about the path names because I think that if there’s a logic behind the structure of the content this can – and maybe should – be reflected on breadcrumbs, path names, titles, etc.
Last – but not least – if this question doesn’t belong to the advanced forum, where does it belong then…? Is this a ‘Miscellaneous’ issue…?