Forum Replies Created

Viewing 15 replies - 1 through 15 (of 60 total)
  • Same here, I need this for a site I have just launched.

    Thread Starter Dickie

    (@dickie)

    Sorry… just found other thread…

    http://wordpress.org/support/topic/415162

    Dickie

    (@dickie)

    I had some odd issues after I updated… but after I deleted ALL the menus and started again, it all worked perfectly.

    Forum: Plugins
    In reply to: All in one Seo plugin bug

    It might be a long shot, but I have noticed that the description tags and keyword tags generated by AIO SEO are not technically compliant, as it closes the tag without a space preceding it…
    e.g

    <meta name="description" content="content"/>

    where it should be

    <meta name="description" content="content" />

    Now this might not actually affect anything, but who knows…

    Forum: Fixing WordPress
    In reply to: 2.5 Gallery Help

    Unfortunately the [gallery] shortcode only shows images that are uploaded to (and associated with) THIS post… at the moment there is no way to show ALL pictures.
    Hopefully this is something that will be changed later as I also need a way to organise galleries.
    At the moment a picture is associated with 1 post only, and therefore can only appear in the gallery that is associated with that post.

    Hope this helps

    Forum: Fixing WordPress
    In reply to: [gallery]
    Dickie

    (@dickie)

    Or better still, rather than hack the core code…
    write a plugin to do it…

    Something like this should do the trick, copy all the code and paste into a file called gallerycss.php, make sure you have no white space before or after the php tahs (<? and ?>), upload to your plugins folder and activate. (At your own risk)

    <?php
    /*
    Plugin Name: Move Gallery CSS from body to head
    Plugin URI: http://wordpress.org/support/topic/164825?replies=5#post-722329
    Description: Removes the Gallery CSS declaration and adds into the head
    Author: Dickie
    Version: 1.0
    Author URI:
    */
    
    function test_gallery_removecss($css)
    {
    	// Note you still need to return the start div
    	return '<div class=\'gallery\'>';
    }
    
    function test_gallery_addcss()
    {
    	// Note this is limited to 3 wide column width only
    	echo '<style type=\'text/css\'>
    			.gallery {
    				margin: auto;
    			}
    			.gallery-item {
    				float: left;
    				margin-top: 10px;
    				text-align: center;
    				width: 33%;
    			}
    			.gallery img {
    				border: 2px solid #cfcfcf;
    			}
    			.gallery-caption {
    				margin-left: 0;
    			}
    		</style>';
    }
    add_filter('gallery_style', 'test_gallery_removecss');
    add_action('wp_head','test_gallery_addcss');
    ?>

    Note though that using this you would no longer be able to use the column reference in the gallery shortcode, as that is calculated into the CSS code we have just overridden.
    (e.g. [gallery columns="4"] ), to do that you need to change the %age width in the css in the plugin.

    Forum: Fixing WordPress
    In reply to: [gallery]
    Dickie

    (@dickie)

    It’s worse than that as well… because the CSS is added to the content, it is added for every post that uses it.
    This means that if you have different layout/css for different gallery pages (e.g. 3/4 column layout [gallery columns="3"] etc.) Then when viewing an archive, or an overall blog view when more than one post is on a page at a time, then the last shown post will override the gallery style… Not good.

    Forum: Fixing WordPress
    In reply to: gallery issues
    Dickie

    (@dickie)

    The navigation thumbnails need to be added to your theme template file, you will find an example in the standard Kubrick theme (Default) in the
    image.php file

    Just add this code into your theme

    <div class="navigation">
    	<div class="alignleft"><?php previous_image_link() ?></div>
    	<div class="alignright"><?php next_image_link() ?></div>
    </div>

    Dickie

    (@dickie)

    What I don’t understand is why the single quotes around ‘attachment’ and ‘image/%’ are not escaped as well???

    I tried replacing the double quotes around the orderby with single quotes and the same problem still existed.
    i.e it produced this
    SELECT DISTINCT * FROM wp_posts WHERE 1=1 AND post_type = 'attachment' AND wp_posts.post_parent = 5 AND (post_mime_type LIKE 'image/%') GROUP BY wp_posts.ID ORDER BY \'menu_order ASC, ID ASC\' DESC

    Odd

    Dickie

    (@dickie)

    Be careful though, as apparently that patch can screw up gallery that previously worked… so we need to find a solution that works for everyone. But as it is, if you are having that problem then this should get you out of a mess for the time being.
    I will try to keep you informed as to progress on a full solution

    Dickie

    (@dickie)

    Done a bit more digging and opened a ticket

    Dickie

    (@dickie)

    Update:
    I have found an SQL error in my error_log file…

    [31-Mar-2008 07:27:27] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\"menu_order ASC, ID ASC\" DESC' at line 1 for query SELECT DISTINCT * FROM wp_posts WHERE 1=1 AND post_type = 'attachment' AND wp_posts.post_parent = 10 AND (post_mime_type LIKE 'image/%') GROUP BY wp_posts.ID ORDER BY \"menu_order ASC, ID ASC\" DESC made by get_posts

    Will need to look into this a bit more… not sure what is wrong, although it looks like it might be a quotes thing…

    Dickie

    (@dickie)

    I have the same problem… on my main hosting I did an svn switch to 2.5 in two different installs and they both exhibit the same problem (absolutely nothing where the gallery should be)

    On the other hand I know it works because a 2.5 install works fine on my WAMP setup and has done as I have tracked the 2.5 development.

    I was looking for anyone else having this problem yesterday, but did not spot this post!

    For info I am hosted on Site5

    I was going to do some debugging tonight to see if I can get to the bottom of this…

    At least I’m glad to see I am not alone

    Dickie

    (@dickie)

    Sorry… Ignore

    Unfortunately that doesn’t work, the code that displays the post up to the “more” tag stips all html from the post, so all images will disappear.
    I had this problem on my site too…

Viewing 15 replies - 1 through 15 (of 60 total)