Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter fungusw

    (@fungusw)

    So, to use the technique illustrated in this article, I had to build my thumbs url this way:

    if( get_the_post_thumbnail( $post->ID ) ) {
    				// Default thumb
    				$default_img = get_the_post_thumbnail( $post->ID, 'thumbnail' );
    				// Monochrome thumb
    				$img_data = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID, 'thumbnail' ) );
    				$img_thumb_url = $img_data[0];
    				$ext = pathinfo( $img_thumb_url, PATHINFO_EXTENSION );
    				$img_dir = wp_upload_dir();
    				$bw_img_thumb_url = $img_dir[ 'url' ] . '/' . basename( $img_thumb_url, ".$ext" ) . '-bw.' . $ext;
    				$bw_img = '<img class="bw" src="' . $bw_img_thumb_url . '" />';
    			}

    I am sure my lousy multi-useless-stages can be written more elegantly by anyone who knows better ??

    And Otto’s technique works with the regular wp calls as long as you give a size a couple of pixels bigger to the monochrome version, and style it to the same size as the thumbnail with css.

    Hope it helps someone out ??

    Thread Starter fungusw

    (@fungusw)

    ok.

    Stupid markup mistake ??

    img scr instead of img src!

    This got the default image working, but not all.

    So the solution works:

    if the_post_thumbnail() or get_the_post_thumbnail() doesn’t work because your custom image (my b&w thumbnail in this scenario) has the same size as another image size (like thumbnail, medium or large), you can build its url with basename and an appended string on your filename.

    I suppose you also can create your custom image (my b&w thumb) 1px larger so that you can use the_post_thumbnail(), and resize it with css in your gallery ?? which I am going to try now.

    Thread Starter fungusw

    (@fungusw)

    So, to put things in a few points:

    -> The black and white image has “-bw” appended to filename before the extension;

    -> the black and white image has the same size as the thumbnail;

    -> The b&w image IS created by the system, on upload, but the the_post_thumbnail() function and alternative functions do not pull it ( the_post_thumbnail( ‘thumbnail’ ) works, but the_post_thumbnail( ‘thumbnail-bw’ ) doesn’t ).

    I tried to display the b&w image by building a direct link to it (domain.com/wp-content/uploads/the_damn_file-bw.jpg), which WORKS if you copy / paste it in browser, but DOES NOT from the WP site!

    The main question here is not “How to make a BW version of thumb”, but WHY that perfectly working URL is NOT showing the image when on my WP front page, and WHY it’s link is not clickable in FF source view like any other existing image URL??

    Sorry, just noticed the table structure in the db:

    Theres a column: blog_id, where the default 3 events have a value NULL.

    And if you post events from a subsite, this column reflect blog’s ID.

    So I suppose everything is ready in the plugin to make an event global, right?

    Only thing is I can’t see anything on the Edit Event page that can control the value of that column…

    Ideal implementation for this would be to be able to post an event in a subsite, which would be only displayed in subsite, with an option to make it global, in which case it would be displayed in all subsites…

    I see where it can be tricky though. Should the data be put in each subsite’s post tables? in main site post table? in a special table?

    Perhaps when some events are posted in subsite1, and set as “global”, Events Manager on subsite2 could send notification that x numbers of events are set as global, giving opportunity to “import” them. A bit like the comments moderation queue. This way, it’s like double posting, but without having to double post! And could be most friendly with table structure?

    Thread Starter fungusw

    (@fungusw)

    Update:

    – I Deactivated Simple Facebook Connect
    – I installed manually the like button as xfbml
    > Same problem

    – I ended up installing the iframe code, things got into place. Got to see how it plays with avatars ??

    Thread Starter fungusw

    (@fungusw)

    Ok, I am monologuing a bit here, I’ll just use this thread as a personal diary of my adventures with the facebook iframe position absolute ??

    I noticed that leaving position:absolute AND adding right:0 or left:0 also puts the iframe correctly in place.

    Is there ANY way at all I can edit or modify the facebook iframe styles? perhaps from FB developers?

    Thread Starter fungusw

    (@fungusw)

    As quite a few iframes get generated by the SFC plugin, I tried to getElementByID.
    Trouble is the iframe’s ID changes each time it’s loaded.

    Again, it seems to only happen in Safari (Mac), and deselecting the position: absolute; style from the iframe resolves the problem. The problem is I can’t change that style as it’s generated by Facebook.

    The problem is the FB Fan box is displayed outside the column it’s intended to sit in. The box, on the other hand, is correctly displayed on FF, Chrome, Opera (Mac).

    If anybody encountered this behavior, thanks to let me know your thoughts.

    Thread Starter fungusw

    (@fungusw)

    Failed attempt to force a change from position:absolute to position:relative with js:

    function changeElementPosition() {
    var yo = document.getElementByTagName("iframe");
    yo.style.position = "relative";
    }

    Was considering feeding this to only Safari, had it worked, while looking for a better solution. It did not, and I am wondering if it has to do with the iframe being buried in the fb:fan tag (I can only see and somewhat manipulate the iframe inside with devtools on safari or firebug).

    Looking at my plugins now, I only have Events Manager displaying things on that page, and WP Polls installed but still unused. I’ll try to deactivate them and watch for changes. I’ll update this soon.

    Thread Starter fungusw

    (@fungusw)

    in deed, tested and working ^^ thanks!

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