WordPress.org

Ready to get started?Download WordPress

Forums

P2 + attachments (22 posts)

  1. nonletter
    Member
    Posted 5 years ago #

    Yo

    do you know any customization of P2 that enables users to upload attachments from the common P2 fast homepage posting textboxes?

  2. noel
    Member
    Posted 5 years ago #

    It's a feature high up on the dev list :)

  3. Rishi
    Member
    Posted 5 years ago #

    Hey Noel,

    Do you have a trac site for P2's development, or do you have an estimate as to when the next version of P2 will be released?

  4. feastoffools
    Member
    Posted 5 years ago #

    Would be great to allow people to paste a video URL, upload a photo or post a link like Facebook does.

  5. dlopeman
    Member
    Posted 5 years ago #

    YES - I posted in a similar thread, too...

    The jist of that was: PLEASE HURRY!!!

    THANKS noel - YOU ROCK - THANKS for your work.

  6. feastoffools
    Member
    Posted 5 years ago #

    Yes, I think we're waiting- but isn't there some way to do this already?

  7. dlopeman
    Member
    Posted 5 years ago #

    So i found this (Ajax uploader):
    http://valums.com/ajax-upload/

    I'm trying to just make a simple button to do the upload... part of the problem, though, is tieing it to the post. Uploading is easy.

    So then I played with trying to tear up the Dashboard files... Well what a friggin mess!! Holy Carp. (yes - a fish). I have to load 5 to 10 different JS's and stuff and more stuff and style sheets... and I'm lost before I began...

    I found it using TinyMCE... so I thought of running down that path...

    For someone who knows this code, it really doesn't seem like it would be hard... time consuming, yes - but not hard.

    I'm not a programmer - I'm more of a hacker - I'll hack your crap and make it work the way I want!! LOL Know enough to really screw it all up.

    I just want a picture to attach to the post - ONE picture only - using file extensions jpg gif png... that Ajax Uploader can do it. I want it sized with contraints around 600px by 600px... proportionately (there's already a plugin for that part)

    well - I'm going to get back at it. I'll let yous know when I got it figured out. Feel free to lend me any clues (like what code to yank from where...)

  8. dlopeman
    Member
    Posted 5 years ago #

    Hey - Look what I found:
    http://wordpress.org/extend/plugins/wordpress-comment-images/

    I think I'll hack this.

  9. dlopeman
    Member
    Posted 5 years ago #

    Nevermind - not what we are looking for. The hunt/hack goes on.

  10. dlopeman
    Member
    Posted 4 years ago #

    ALRIGHTY noisey ones!!! I found something worthy!!!

    Post-from-site

    They did it!!! Way to go Kelly Dwan!!
    http://wordpress.org/extend/plugins/post-from-site/

    Now to hack it into P2...

  11. noel
    Member
    Posted 4 years ago #

    This feature will appear in the next P2 release. Coming out around the time WordPress 2.9 is released.

  12. dlopeman
    Member
    Posted 4 years ago #

    OH - nice - well i will have to look at it!
    Thanks!

    I've already created my own solution, if you look at some of the other threads that talk about this, you'll see what I've been able to do.

    Also, if you want to try out what I did, check out my site:
    WomenDrinkingBeer.com

  13. dlopeman
    Member
    Posted 4 years ago #

    And welcome back Noel. We thought we lost you!!!

  14. dlopeman
    Member
    Posted 4 years ago #

    And one more thing: Mine works on a bunch of browsers with one exception that I've seen (and surprising, actually)
    Firefox!!

    Find my other thread where I talk about this.

    I did more work on this past night and I discovered that ONLY FireFox handles the PATHS differently. It really is a path issue, as it accesses the backend php in a different directory...

    i.e. FF accesses the backend at the current (./) directory rather than the web root directory (which is /opt/wordpress)

    So... I'm pretty close!

    And then I'll add the beauty CSS and crap!!! Woo hoooo.

  15. dlopeman
    Member
    Posted 4 years ago #

    OK - and read all the other updated threads.

    I'm going to check out your SVN version progress. I could just end up abandoning all the HARD work I did!!! LOL

    So, for what I did, there was just one file touched: post-form.php

    and 2 added files... for the backend AJAX looking upload, resize, and thumbnail parts...

    Just tell me, Noel, if you want them. I can email them or something. I saw that you like to receive the "diffs" ... well a diff may be moot, as I pretty much re-wrote the whole file! Plus a bunch of JS in it (which could probably be a separate file, or put the functions in functions.php... later maybe)

  16. dlopeman
    Member
    Posted 4 years ago #

    So I downloaded the whole directory structure on your SVN, Noel.

    The page doesn't show anything. I look at the source and see it only gets UP to the part where it start grabbing all the media stuff in header.php:


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title> TESTING</title>
    <link rel="alternate" type="application/rss+xml" title="TESTING RSS Feed" href="http://192.168.139.128/feed/" />
    <link rel="pingback" href="http://192.168.139.128/xmlrpc.php" />

    So it looks like its hanging on this:

    <?php
    if( is_site_admin() && is_home() ):
    include ABSPATH . '/wp-admin/includes/media.php';
    wp_enqueue_script('thickbox');
    wp_enqueue_style('thickbox');
    $media_upload_js = '/wp-admin/js/media-upload.js';
    wp_enqueue_script('media-upload', get_bloginfo('wpurl') . $media_upload_js, array( 'thickbox' ), filemtime( ABSPATH . $media_upload_js) );
    endif;
    ?>

    And it's funny that you are apparently making use of the wp-admin parts (media.php, etc...) - That is EXACTLY what I tried to do my first crack at this! I gave up.

    Another big reason I gave up is that it's my goal to ultimately eliminate the "backend" wp-admin area from everyone. So seeing the media library is NOT an option for me... And i never really liked that anyway, no matter what theme one uses!

    It should be more "facebook-like" and group the media library by users... which is where I will get my upload to soon. Create each directory as it's needed for the users who upload a picture. And then I could even sort by date and time... but do I REALLY think people will upload THAT many pictures!??!??! (well i hope so!)

  17. dlopeman
    Member
    Posted 4 years ago #

    Alright - so going back to MY upload script(s) for P2...

    I now have it working in ALL the major browsers (WOOO HOOOO!!!!):
    IE8, IE6, FF 3.5.3, Opera 9+10, Safari 4.0.3, and Google Chrome 3.0.195.21

    I will be uploading code changes to my Production site sometime today.

    My Javascript skills are getting stronger!

    "Drop the +1 Diskette of JavaScript?"
    "You can't. It seems to be cursed."

  18. ToreGu
    Member
    Posted 4 years ago #

    Interesting!

  19. dlopeman
    Member
    Posted 4 years ago #

    OK - not super-pretty yet, but it works. Try it out and let me know what everyone thinks! (and of any problems decide the obvious lack of prettiness!)

    http://www.womendrinkingbeer.com

  20. ToreGu
    Member
    Posted 4 years ago #

    Seems to be working most of the time. Once it didn't. It was a big JPG. Perhaps some inbuilt file limit?

    Prettier than before! :)

    Kul att se! Bra jobbat!

  21. Nobble
    Member
    Posted 4 years ago #

    Very cool, great work

    hope you share how you did it!

  22. dlopeman
    Member
    Posted 4 years ago #

    Thanks guys. I updated the code into production again last night (EST)... Looks like I'll be uploaded changes at night usually.

    It's started looking a lot prettier now. Take another peek!! LOL

    I somehow broke a couple little things, too! In IE6 it shows up MORE. The Share Socio buttons are way messed up! The Fade Effect after you enter a new post or comment is also broken now. It changes color, but won't fade. And a new comment just stays the new-post-color. My guess is that I'm not closing a DIV or something... or need a surrounding (container) DIV... I'll be working on it today.

    I wanted to push the code changes up anyway because it's really taking shape!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags