Forum Replies Created

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter thinkstorm

    (@thinkstorm)

    That solved it! I wonder what had happened … but Thank You for the quick reply, I take it 🙂 — THOR

    Thread Starter thinkstorm

    (@thinkstorm)

    no, but it needs to be in one of the files 😉 I figured out that the problem is memory allocated on my server for image operations. A setting i cannot change sufficiently, so I just upload smaller images as a workaround.

    Thread Starter thinkstorm

    (@thinkstorm)

    no, never… I also never figured it out 😉 sorry for the lag, didn’t add this to my favorites before…

    thinkstorm

    (@thinkstorm)

    Flyout menus are usually also not very good for accessibility by screen readers or braille bars.

    One suggestion for the future (before demolishing everything until 2.8 release date): make the interface greasemonkey-friendly, so people could use at least thick-client based scripting engines to adjust their layout…

    Mobile access and accessibility are both key for me.

    thinkstorm

    (@thinkstorm)

    !!! the flyout menus will be terrible to use from mobile devices !!!

    Forum: Plugins
    In reply to: OAuth

    any luck yet?

    yup, here, too… I just installed the new version – glad that I looked at the dashboard 🙂 I used the “cleanup” function on the settings page, and at least all the spam was gone…

    I’m curious what’s going to happen tonight 🙂

    Not quite: if you call http://www.playoutintelligence.com/asdasdasdasd, the 404 page will not redirect to http://www.playoutintelligence.com/404.php

    Maybe it’s also possible to check in the root index.php file whether is_404(), and then call <?php header("notfound.php", true, 404); ?>

    The reason why I suggest to look at the root index.php is that I’m not sure if you can call the header(..) function anywhere within a page. If I remember correctly, this has to happen before the <html> tag is written…

    I would, however, definitely recommend using 404.php if the name of the URL is not important to you…

    Cheers, Thorsten

    Thread Starter thinkstorm

    (@thinkstorm)

    Mea culpa: the function image_make_intermediate_size is of course defined in /wp-includes/media.php. The problem for my thumbnails seem to be the GD function imagecreatefromstring that is called within wp_load_image in /wp-admin/includes/image.php.

    This is a bit strange: when I use the file upload function within “write post”, JPGs are uploaded and thumbnails are created according to the Settings->Misc page. I am under the impression that media_handle_upload in /wp-admin/includes/media.php does call
    wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );
    which is the same call I am trying to do. However, my call fails, the upload call succeeds… back to the drawing board…

    I posted a dirty solution that updates title and alt attributes from the media library (WordPress 2.5)

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

    I am not sure if that works for WordPress 2.3.3, and it is really really dirty programming. Maybe someone can come up with a cleaner solution I don’t have more time to look into this.

    Cheers,
    Thorsten

    I posted a related solution (that is really really dirty right now, but works for me) at

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

    It basically uses information from the media library to update your title and alt attributes, so you can change the stuff there.

    I really really recommend you use this as a template for your own needs, I’m not sure how long this will last 😉

    Thread Starter thinkstorm

    (@thinkstorm)

    I posted a quick and dirty solution at http://www.playoutintelligence.com/wordpress/ :

    <?php
    /*
    Plugin Name: Lightbox 2
    Plugin URI: http://www.stimuli.ca/lightbox/
    Description: Used to overlay images on the current page. Lightbox JS v2.2 by <a href="http://www.huddletogether.com/projects/lightbox2/" title="Lightbox JS v2.2 ">Lokesh Dhakar</a>.
    Version: 2.5.0
    Author: Rupert Morris
    Author URI: http://www.stimuli.ca/
    */
    
    /* Where our theme reside: */
    $lightbox_2_theme_path = (dirname(__FILE__)."/Themes");
    update_option('lightbox_2_theme_path', $lightbox_2_theme_path);
    /* Set the default theme to Black */
    add_option('lightbox_2_theme', 'Black');
    
    /* options page */
    $options_page = get_option('siteurl') . '/wp-admin/admin.php?page=lightbox-2/options.php';
    /* Adds our admin options under "Options" */
    function lightbox_2_options_page() {
    	add_options_page('Lightbox Options', 'Lightbox 2', 10, 'lightbox-2/options.php');
    }
    
    function lightbox_styles() {
        /* The next lines figures out where the javascripts and images and CSS are installed,
        relative to your wordpress server's root: */
        $lightbox_2_theme_path = (dirname(__FILE__)."/Themes");
        $lightbox_2_theme = urldecode(get_option('lightbox_2_theme'));
        $lightbox_style = (get_bloginfo('wpurl')."/wp-content/plugins/lightbox-2/Themes/".$lightbox_2_theme."/");
        $lightbox_path =  get_bloginfo('wpurl')."/wp-content/plugins/lightbox-2/lightbox2/";
    
        /* The xhtml header code needed for lightbox to work: */
    	$lightboxscript = "
    	<!-- begin lightbox scripts -->
    	<script type=\"text/javascript\">
        //<![CDATA[
        document.write('<link rel=\"stylesheet\" href=\"".$lightbox_style."lightbox.css\" type=\"text/css\" media=\"screen\" />');
        //]]>
        </script>
    	<script type=\"text/javascript\" src=\"".$lightbox_path."prototype.js\"></script>
    	<script type=\"text/javascript\" src=\"".$lightbox_path."scriptaculous.js\"></script>
    	<script type=\"text/javascript\" src=\"".$lightbox_path."lightbox.js\"></script>
    	<!-- end lightbox scripts -->\n";
    	/* Output $lightboxscript as text for our web pages: */
    	echo($lightboxscript);
    }
    
    /* we want to add the above xhtml to the header of our pages: */
    add_action('wp_footer', 'lightbox_styles');
    add_action('admin_menu', 'lightbox_2_options_page');
    ?>

    the plugin has no options page, it is so dirty my eyes hurt, nine search and replaces with regular expressions that can go wrong, and I bet it slows down access times, too, and is probably not cacheable.

    Please fix 😉

    Thread Starter thinkstorm

    (@thinkstorm)

    I thought about it a bit more… since the image is inserted hardcoded in tinyMCE together with the A-tag, I guess I need two hooks,

    • tinyMCE Insert Image Hook, which puts a custom WordPress Plugin tag within the title and/or alt attribute
    • post load hook, which replaces any the custom WordPress Plugin tag for the title and/or alt attribute tag within A-tag / IMG-tag with a lookup of its value from the database

    I never programmed anything for WordPress yet, can someone please point me into the right direction in which .php files I would need to change code or how to add custom hooks (so wordpress updates don’t become a pain)?

    Cheers,
    Thorsten

    I am using WordPress in a very basic manner, maybe a blog entry every week. For me a lot of things got easier, but I can see that a lot of plugins (like Flexible Upload) are not working anymore.

    Well Ajax is “cool”, but the way it is implemented with the picture upload and browsing not really efficient – the space is too small to browse through the gallery, and loading takes a long time (and my flexible upload plugin doesn’t work anymore in the AJAX overlay…).

    I wonder when I will forget to set categories and tags because I forgot to scroll down…

Viewing 14 replies - 1 through 14 (of 14 total)