WordPress.org

Ready to get started?Download WordPress

Forums

P2 Theme post form modification; adding title and image upload form? (13 posts)

  1. sammael
    Member
    Posted 4 years ago #

    P2 theme is wonderful!

    i am new on php and wordpress. i am building a web site, i really love P2 theme but i need to modify post form. i want to add title and image upload form (the form will add image not only link)

    i need post form like that

    i need posts like that

    is it possible? anyone can help me?

  2. dlopeman
    Member
    Posted 4 years ago #

    YUP - seems to be what EVERYONE wants!!! You'll just have to wait with the rest of us! LOL

  3. dlopeman
    Member
    Posted 4 years ago #

    Nice picture, BTW

    I've made a form just like yours - i can get the image to upload - but I don't know how to insert the PATH into the post...

  4. dlopeman
    Member
    Posted 4 years ago #

    Actually - we wouldn't even need the picture to be a PATH/URL in the actual post. I never really liked that... It should be another element, like the TITLE, TAGS, CATAGORY, ... call it PICTURE... and maybe generate a THUMB for those who want it......

  5. dlopeman
    Member
    Posted 4 years ago #

    GUESS WHAT I CAN DO???? IMAGE UPLOAD IN P2

    hahaha

    Once I promote to production, I post my link again...

    (It's a hack, but it works! And it's REALLY complicated!)

  6. dlopeman
    Member
    Posted 4 years ago #

    OK - DONE:
    http://www.womendrinkingbeer.com

    Create a user and give it a try.

  7. kiaso
    Member
    Posted 4 years ago #

    1. Short code for Image
    2. Short Code for URL
    3. Short Code for Videos
    4. Add titles
    5. Edit titles
    6. Delete Post without leaving the page
    7. Assign Categories, Posts with videos are assigned Video Category automatically
    8. Adds SEO links (Hacked Smart SEO Plugin)
    Check this post http://www.kisaso.com/technology/p2-wordpress-theme-ported/

  8. Dwarshak
    Member
    Posted 4 years ago #

    Heres another example of a p2 themed wordpress blog with the ability to upload pictures to posts. Seems like dlopeman did it alot better than me.

    CollegeEnvironments.com

  9. dlopeman
    Member
    Posted 4 years ago #

    Thanks for the compliment, Dwarshak! And thanks for the posting! Your "Body Shot" picture forced me to enact another enhancement!! CensorshipSux. I wrote some quick code to allow a user to "Click to See" the potentially offensive picture!

    Sorry ... I was not offended... and I didn't erase it... just had to think of others...

    And it looks pretty cool - go back and check it out!
    http://www.womendrinkingbeer.com

  10. dlopeman
    Member
    Posted 4 years ago #

    SO... looking at Kiaso's post... I can:
    1. add image... no coding needed - just choose your picture and it uploads and inserts proper code. Future enhancements will not require the code insertion - it will do it upon SUBMIT!
    2. Don't care about URL's... I think...
    3. You can add YOUTUBE video using httpv:// ... I just haven't mentioned it on my site yet! It is a wordpress plugin.
    4. Titles - there's a separate FIELD - and it's a required field
    5. Hmmmm - can't do that. Nice... but I can't because it's a separate field... his is in the TEXTAREA, which you CAN edit, of course...
    6. YES - I just did this today! I will post how in another post of the similar subject. I set mine so ONLY ADMIN's can... I'll post ADMIN and USER versions... pretty simple, actually.
    7. I don't do catagories yet
    8. Does that mean the Permalink?? I had it, but took it out. Don't want navigation off the main page(s)... yet....

  11. dlopeman
    Member
    Posted 4 years ago #

    hmmmmm - don't see where this was asked... so I'll post in a couple places:

    Delete button accomplished:

    Add this into your entry.php file:

    <?php if (current_user_can('edit_post', $post->ID)) echo "| <a href='" . wp_nonce_url("/wp-admin/post.php?action=delete&post=$id", 'delete-post_' . $post->ID) . "'>Delete post</a>" ?>

    OR FOR JUST ADMIN delete-ability:

    <?php if (current_user_can('level_10')) echo "| <a href='" . wp_nonce_url("/wp-admin/post.php?action=delete&post=$id", 'delete-post_' . $post->ID) . "'>Delete post</a>" ?>

    (keep in mind that upgrading P2 will wipe out your changes!)

  12. Erin B.
    Member
    Posted 4 years ago #

    Hi, I tried @dlopeman's fix for adding "delete" to entry.php and found it didn't quite work (perhaps this fix was for an older version of P2). In any case, this seems to work:

    <?php if ( current_user_can('delete_post', get_the_id() ) ) : ?>
     | <a href="<?php echo ( get_delete_post_link( get_the_id() ) ) ?>" class="post-delete-link" rel="<?php the_ID() ?>"><?php _e( 'Delete', 'p2' ) ?></a>
    <?php endif; ?>

    Also, if you are worried about losing this on updates of P2, I recommend using child themes. Google it, it's the best thing ever if you are making significant changes to themes like P2!

  13. richardginn
    Member
    Posted 4 years ago #

    Where does that code go supposed to go ebellempire so it does not mess up the entry.php file????

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags