Posts by OriginalEXE

1533 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says

Who’s pumped for tonight!? Walt vs. Hank, let’s get it on!

Thanks for remainder, can’t wait how it ends.

1533 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says
1533 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says
1533 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says


Same goes for Wordpress over WordPress :D (Envato is guilty of that too, just check the page title on CodeCanyon).
http://codex.wordpress.org/Function_Reference/capital_P_dangit

http://capitalp.org/

Yeah, I know about it, the function would actually be useful in the forums :)

1533 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says

Same goes for Wordpress over WordPress :D (Envato is guilty of that too, just check the page title on CodeCanyon).

1533 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says


This is the variable holding post id for wp.media:
wp.media.model.settings.post.id
Try setting it to 0
Yup, this did the trick :) Thanks a lot for the help!
No problem ;)
1533 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says

This is the variable holding post id for wp.media:

wp.media.model.settings.post.id

Try setting it to 0

1533 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says

Thanks a lot for the helps guys! However, I think the solutions posted here are exactly what I already have in my theme (i.e. uploading the images into their corresponding fields in the post / page).

What I still can’t figure out is, how do I upload an image such that it will not be ‘assigned’ to the ID of the post where it was uploaded? I want to create an upload button where the images uploaded using that button will not appear in the attachments retrieved via get_posts as outlined here. Anyone has any idea how this can be achieved, or there are alternatives to doing it?

Still, I appreciate all the help given thus far :)
It won’t get binded to post/page, I use it in theme options panel without problems.

It shows up like this: http://pbrd.co/195DLg6

Note that it says “Unattached” in the list.

If you don’t want it in get_posts list, just filter it by meta key (ie, check if it’s assigned to post id or not).

1533 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says

Here is what I use in my framework:

 // WordPress media manager
    var tl_theme_media_frame;
    var formlabel = 0;

    jQuery( 'body' ).on( 'click.tl_themeOpenMediaManager', '.tl_button_field_image_upload', function( e ) {

        e.preventDefault();

        formlabel = jQuery( this ).parent();

        if ( tl_theme_media_frame ) {

            tl_theme_media_frame.open();
            return;

        }

        tl_theme_media_frame = wp.media.frames.tl_theme_media_frame = wp.media({

            className: 'media-frame tl_theme-media-frame',
            frame    : 'select',
            multiple : false,
            library  : {
                type: 'image'
            },

        });

        tl_theme_media_frame.on( 'select', function(){

            var media_attachment = tl_theme_media_frame.state().get( 'selection' ).first().toJSON();

            formlabel.find( 'input[type="text"]' ).val( media_attachment.url );
            formlabel.find( 'img' ).attr( 'src', media_attachment.url );
            formlabel.children( '.tl_field_image_wrap' ).fadeIn().css( 'display', 'inline-block' );

        });

        tl_theme_media_frame.open();

    });

You will notice the formlabel var but that’s only what I use to place selected image inside input field, let me know if something is unclear.

1533 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says

For those that say that my idea is stupid, have a look the recent update of woothemes support terms & pricing ;)

+1

by
by
by
by
by
by