alanft
Forum Replies Created
-
Forum: Plugins
In reply to: Plugin relocate-upload – Not quite working in 2.7i have to update the wording on the main page! the menu doesn’t appear in the media library listing, but you should see a folder menu in the ‘edit media’ page when you click through to edit a specific item in the library, or in the ‘insert into post’ view too (which was what i really meant by ‘media library’ in the original description).
i see it on my 2.8.5 install. did you have it working ok on 2.8.4 and this has just broken in 2.85?
Forum: Plugins
In reply to: Widget Logic – Just plain doesn’t workdoes the problem persist if you (temporarily) switch to the default theme? if not, then it’s something in your theme.
does your theme have a page.php file? if so, does it do any custom query stuff in which case:
have you tried setting the wp_reset_query option?
Forum: Plugins
In reply to: Widget Logic and Arthemia Premium themethe latest version of WL has an option that calls wp_reset_query without you having to edit your theme.
i’d love to know if that option fixed things without you having to edit your theme
Forum: Plugins
In reply to: [Plugin: Widget Logic] Thank you for the great pluginaw shucks again. thanks!
once in a while i’ve asked if anyone has any suggestions on what i could do to improve WL. the text box could be a bit bigger (a resizeable textarea perhaps) is as much as anyone has ever suggested.
i’ve been working out how to make a sort of ‘Library’ feature that helps the PHP-noobs without making it extra complex. the idea being that alongside the text field is a simple drop-down of ‘named’ options that have been ticked in a list of pre-canned conditions listed in a settings page.
but when i started making the interface it just seemed MORE complicated to get things going.
Forum: Plugins
In reply to: [Plugin: Widget Logic] Thank you for the great pluginwell thank you very much.
even on category pages?
you can troubleshoot using echo “current cat ID= $cat” and something like print_r($recentPosts).
good luck.
most of what you say is true. but you don’t need one instance of each plugin for each category. you just need to change the code to show the current category, which is in the global $cat.
instead of using WL to replace the text of a specific widget, try knocking up a PHP widget that only shows recent posts of category X:
this post here http://forum.bytesforall.com/showthread.php?t=865 has the right idea. all you have to do is replace
$recentPosts->query('showposts=5&cat=-XX,-YY,-ZZ');
with
$recentPosts->query('showposts=5&cat=$cat');possibly add a global $cat in there to get the current category.
good luck
Forum: Plugins
In reply to: post order by discussion/activity(talking to myself)
i might work this up into a plugin now that i’ve got it listing posts by
recent_posts (the standard ‘blog view’)
recent_commentsmost_views
least_viewsmost_comments
least_commentsForum: Plugins
In reply to: post order by discussion/activityjust in case anyone ever googles back to this, here’s what i’m trialling at the mo, and it’s working ok, though not strongly tested…
the code below in my functions.php gives an ordered by recent comment date with 25 results per page when you add ?bboard to the URL of the home page or an archive page.
if (isset($_GET['bboard'])) { add_filter('posts_fields', 'bboard_posts_fields'); add_filter('posts_join_request', 'bboard_posts_join_paged'); add_filter('posts_groupby', 'bboard_posts_groupby'); add_filter('posts_orderby', 'bboard_posts_orderby'); add_filter('post_limits', 'bboard_post_limits'); } function bboard_posts_fields($fields) { return $fields.", MAX(comment_date) as max_comment_date, max(comment_ID) as latest_comment_id"; } function bboard_posts_join_paged($join) { global $wpdb; return $join." INNER JOIN wp_comments ON ( $wpdb->posts.ID = $wpdb->comments.comment_post_ID AND comment_approved=1) "; } function bboard_posts_groupby($groupby) { if ($groupby=="") $groupby.=" wp_posts.ID"; return $groupby; } function bboard_posts_orderby($orderby) { return "max_comment_date desc"; } function bboard_post_limits($limits) { global $wp_query; $q=$wp_query->query_vars; if ($q['paged'] && $q['paged']>1) $offset = "offset ".(25*($q['paged']-1)); return "LIMIT 25 $offset"; }within the loop, to get the content of that latest comment use
$comment=get_comment($post->latest_comment_id);and then you can use standard comment tags like comment_excerpt() and get_comment_date() as normal
Forum: Plugins
In reply to: post order by discussion/activitythanks, i might end up using it as a make-do for now, but it’s still not quite what i was after. [edit] i’m not sure i CAN get it to work. may be able to use some of the code in it though
i’m going to have a bash to see if i can get the effect i’m after using the filters like posts_orderby.
Forum: Plugins
In reply to: post order by discussion/activitythanks. i checked that c2c plugin and i realise on re-reading my initial post that i was being far from clear.
what i am after is something that will change the standard Loop to show posts in a ‘most recent comment’ order rather than the usual blog standard order of ‘most recently posted’.
Forum: Fixing WordPress
In reply to: Looking for a good Search plugini use an HTML input type=’search’ which on apple’s safari looks and ACTS like a standard OSX search with no need for a submit. hitting return just seems to work on IE and firefox too.
I make the text ‘Search’ appears in the box when nothing has been typed in it yet with this in the footer:
<script> function do_search_box() { search_box=document.getElementById('search'); search_box.value="Search"; search_box.onfocus= function(){ if (this.value=="Search") this.value=''; } search_box.onblur= function(){ if (this.value=="") this.value='Search'; } } if (navigator.vendor.indexOf('Apple') == -1) do_search_box(); </script> <!--[if IE ]> <script> do_search_box() </script> <![endif]-->(where id=search on the input box too) there is probably a more elegant/compact way of doing this
Forum: Fixing WordPress
In reply to: Looking for a good Search plugini don’t recall having to do much to set it up TBH. i got the “Search box code” from google and pasted into the plugins settings page, and i *think* the only other thing i did was to change the search form to action=’/search/’
[edit] oh and some css fiddling to integrate the appearance of the results.
Forum: Fixing WordPress
In reply to: Looking for a good Search pluginwhat about outsourcing it to google custom search? http://www.google.com/cse/
i use this plugin to simplify the setup
http://aleembawany.com/projects/wordpress/google-custom-search-plugin/