darrellberry
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: 2.5 doesn’t allow square brackets in HTML ‘rel’ tagsthanks guys — the ‘gallery’ tag for shadowbox is arbitrary, so i change that and it works… weird to run into a ‘namespace collision’ within 5 mins of upgrade… maybe as a matter of principle, all WP-related tags etc should start wp- (like much of the code does/did!) — much less likely IMHO to run into naming collisions with other tools if WP used wp-gallery, for example!
anyways
thanks!
d
Forum: Themes and Templates
In reply to: search widget not displaying….which site are you looking at? (as i didnt mention the URL, i’m betting you are looking at the site of the template creator, not ours!)
the problem is at http://www.filmnoirrecords.com
thanks for your interest!
d
Forum: Plugins
In reply to: network analysis of tag cloudsThere’s an example of my stuff here:
http://www.bigshinything.com/tag-cloud-network-analysis-2005
Forum: Plugins
In reply to: Kitten’s ‘show category posts’ plugin and WP 2.0ok — this is something to do with the way you have changed what metadata is available for other than the currently displayed posts. this changed between 1.4 and 1.5, and it looks like you’ve chnged it again. see http://wordpress.org/support/topic/34268 for the issue i hit between 1.4 and 1.5 — looks like the behaviour is now different again. sigh. any tips? this is a showstopper for us at the moment!
thanks
Forum: Plugins
In reply to: post_meta_cache and 1.5.1ok solved. this quirk has aactually been implemented PROPERLY in 1.5 — its possible to call something like:
<?php $array= get_post_custom($thepostid); $vals=$array[‘previewimage’]; ?>
and have this return correct values, it seems, even if the post in question isn’t one touched in the main loop.
cool!
Forum: Plugins
In reply to: post_meta_cache and 1.5.1ok i found where this is defined (wp-includes/template-functions-post.php). However, it appears to be assigned quite differently than in 4.2.2, and I can’t quite see how to hack the definition so that its populated with info for ALL posts, rather than just the current one.
What I have working in 4.2.2 is the following — a site with a main (feature) story and two miniblogs in colums on the side. One of them includes preview images, defined via a custom tag called ‘preview_image’ which is set to the URL of a preview image, if one exists. If so, then the image is displayed in the miniblog. If not, the excerpt is instead. The miniblogs are generated with kitten’s ‘show category posts’ plugin.
The code I have in 4.2.2 is (for the miniblog with the preview images):
<?php if ($scp_posts) : foreach ($scp_posts as $post) : start_wp(); ?>
<!– for each post, check to see if it has a defined preview image (URL in the ‘previewimage’ tag –>
<?php $thepostid = $post->ID; $vals = $post_meta_cache[$thepostid][‘previewimage’]; ?><!– if so, show the preview images and link them to the story –>
<?php if ($vals) : foreach ($vals as $val) : ?>
<h3>” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”><?php the_title(); ?></h3>
” title=”Permanent Link: <?php the_title(); ?>”><img class=”previewimage” src=”<?php echo $val ?>” alt=”<?php the_title(); ?>”/>
<?php endforeach; ?>
<?php else: ?><!– otherwise show the excerpt instead –>
<h3>” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”><?php the_title(); ?></h3><?php the_excerpt(); ?>
<?php endif; ?><?php endforeach; ?>
…the only way this works is with a hacked wp-blog-headers.php, where the query which generates $meta_list is modifed as below, to populate the list with the metadata for ALL posts, rather than the ones displayed in the main loop. the reason for this is that the show_category_posts is looping over a bunch of posts which AREN’T in the main loop, and hence the test to see if they have a particular tag defined won’t otherwise work, as the matadata array won’t be posulated with their information — follow?!
The hack in wp-blog-header.php is this:
// Get post-meta info
//
// db hack 20050301: removed selction WHERE post_id IN($post_id_list)
// in the following query to return ALL metadata for ALL posts, not just the ones in the
// main part of the page — so that the show_category_list indexes can make use of them
//if ( $meta_list = $wpdb->get_results(“
SELECT post_id,meta_key,meta_value
FROM $tablepostmeta
ORDER BY post_id,meta_key
“, ARRAY_A) ) {Now that’s all fine in 4.2.2, and you can see the whole thing working at http://www.bigshinything.com — the ‘creative’ column is generated by this hackand the above loop.
The problem is how to replicate this behavious in 1.5.1. The code in template-functions-post.php seems optimised so that it doesn’t have access to what in 4.2.2 is called $tablepostmeta in the same way, and i’m damned if i can see who to tweak the code to return all the data i need for this to work. alternatively, i can’t work ou a different loop in index.php to achieve the same reult in 1.5.1 without hacking this.
I hope that’s sufficient explanation — if not, please let me know. Again, a quick look at the site should show what I’m trying to achieve — remember the key here is that i use SCP to display the images which URLs are stored in a custom tag (‘preview_image’) if that tag is defined, or the exceprt if not, in the column laballed ‘creative’ on the site.
All help appreciated!
Thanks
– Darrell
Forum: Fixing WordPress
In reply to: my index.php breaks rss on upgrade from 1.2.2 -> 1.5.1ok, patched wp-blog-header.php as suggested elsewhere (http://trac.wordpress.org/file/trunk/wp-blog-header.php?rev=2600&format=raw) and now i get (from ?feed=rss2):
arning: Cannot modify header information – headers already sent by (output started at /usr/local/apache/htdocs/wordpress/cluster/index.php:10) in /usr/local/apache/htdocs/wordpress/cluster/wp-rss2.php on line 10
http://cluster.othermaps.com mediated space etc. Sun, 15 May 2005 21:08:27 +0000 http://wordpress.org/?v=1.5.1 en http://cluster.othermaps.com/?p=233 http://cluster.othermaps.com/?p=233#comments Fri, 13 May 2005 12:46:42 +0000 site admin Visual Arts http://cluster.othermaps.com/?p=233 http://cluster.othermaps.com/?feed=rss2&p=233 http://cluster.othermaps.com/?p=232 http://cluster.othermaps.com/?p=232#comments Fri, 13 May 2005 11:07:42 +0000 site admin General http://cluster.othermaps.com/?p=232 http://cluster.othermaps.com/?feed=rss2&p=232 http://cluster.othermaps.com/?p=231 http://cluster.othermaps.com/?p=231#comments Thu, 05 May 2005 21:13:46 +0000 Darrell Berry Mobile http://cluster.othermaps.com/?p=231 http://cluster.othermaps.com/?feed=rss2&p=231 http://cluster.othermaps.com/?p=230 http://cluster.othermaps.com/?p=230#comments Fri, 29 Apr 2005 14:00:07 +0000 site admin Music http://cluster.othermaps.com/?p=230 http://cluster.othermaps.com/?feed=rss2&p=230 http://cluster.othermaps.com/?p=222 http://cluster.othermaps.com/?p=222#comments Fri, 29 Apr 2005 10:20:18 +0000 Darrell Berry Calendaring Business http://cluster.othermaps.com/?p=222 http://cluster.othermaps.com/?feed=rss2&p=222 http://cluster.othermaps.com/?p=216 http://cluster.othermaps.com/?p=216#comments Fri, 29 Apr 2005 08:04:33 +0000 site admin Tools and Tech Music http://cluster.othermaps.com/?p=216 http://cluster.othermaps.com/?feed=rss2&p=216 http://cluster.othermaps.com/?p=225 http://cluster.othermaps.com/?p=225#comments Wed, 20 Apr 2005 12:09:38 +0000 Darrell Berry Business http://cluster.othermaps.com/?p=225 http://cluster.othermaps.com/?feed=rss2&p=225 http://cluster.othermaps.com/?p=224 http://cluster.othermaps.com/?p=224#comments Fri, 01 Apr 2005 12:02:49 +0000 Darrell Berry Business http://cluster.othermaps.com/?p=224 http://cluster.othermaps.com/?feed=rss2&p=224 http://cluster.othermaps.com/?p=223 http://cluster.othermaps.com/?p=223#comments Tue, 01 Mar 2005 11:41:40 +0000 Darrell Berry Business http://cluster.othermaps.com/?p=223 http://cluster.othermaps.com/?feed=rss2&p=223 http://cluster.othermaps.com/?p=213 http://cluster.othermaps.com/?p=213#comments Sun, 13 Feb 2005 21:39:35 +0000 Darrell Berry Calendaring Business http://cluster.othermaps.com/?p=213 http://cluster.othermaps.com/?feed=rss2&p=213so its DIFFERENT
but not CORRECTall thoughts appreciated
Forum: Plugins
In reply to: programatically posting drafts?of course! it was posting those as drafts for the user who emailed them in, not for the site admin (which i was logged in as) — obvious!
thanks
Forum: Fixing WordPress
In reply to: Getting 1 Category of Posts on Indexthis seems to work for me:
<?php if (empty($_GET[‘cat’])) $cat=”1″; ?>
Forum: Fixing WordPress
In reply to: Getting 1 Category of Posts on Indexdid you ever find an answer to this? i have the same need…?
thxForum: Fixing WordPress
In reply to: $cat var not working in wordpress 1.5did you every find a way to do that? i’m looking for the same thing…
Forum: Plugins
In reply to: Hack Request: Email Digesthi
i’m currently using Brian’s email nonotifier, and while it is good, i would prefer to be able to generate a say daily or weekly update email rather than one-per-post. Anyone got any ideas?
thanks