Welcome to Redradar!

I'm Kelly, and I'll be your host today. I'm a recent grad trying to figure out life. I have interests and a resume, if you're looking for web developer (preferably in the Western MA area). I also have wordpress plugins & other projects; and sometimes I talk about interesting tech topics. I hope you enjoy your stay, and come back often! (alternately you can follow me on twitter, or grab my RSS feed)

Log in?

Name:
Pass:
Show me?

Unveiling Post-From-Site!

Posted on Jun 03, 2009 at 09:31 PM

“Post-From-Site: Add a new post directly from your website – no need to go to the admin side.”

Version 1.9.0

Released 9.22.09

Download!

This new wordpress plugin allows you to post straight from your front-end (i.e. website) – perfect for a quick update! Also useful if you have multiple users and don’t need them to see the admin side of things (this is the reason the plugin was initially developed).

Just put the function in your template file wherever you want to quickpost link to show up, and there it will be! Once clicked on, a box will pop up and you can type your post there. You need to give it a title and content (or else it won’t post), you can also choose to add it to categories, or (if allowed in the settings) attach an image. After hitting post you may need to refresh to see the new post, but your post will be there.

The code snippet you need is (this is also written on the settings page):

<?php if (function_exists('post_from_site')) {post_from_site();} ?>

On the settings page, you can customize the link text, background color, title/text color, and even add your own CSS to tailor pfs to your site.

In v1.6.20+, you can also generate custom links for posting to a specific category. These can be generated at the bottom of the settings page.

As for permissions, you can limit the categories pfs can post t0 and allow/disallow uploading of images. If you’d rather have pfs’s posts approved before they are visible, you can set the post status to ‘pending’ or ‘draft’. Same with the comment status, it can default to ‘open’ (allowing comments) or ‘closed’ (not allowing comments).

Adding images – custom placement

1.9.0 introduced a new tag, [!--image--], which you can type into your post content to control the placement of your image. Just add

[!--image--]

wherever you want the image to appear. You can even use the tag multiple times, if you want the image to show up in multiple places.

History/Notes/Changelog:

6.03.09: First version released!
6.22.09: 1.6.20 released – added/improved image support, added auto-detection of plugin file to avoid the error reported on v1.6.3, added category-specific links, cleaned up the code.

9.22.09: 1.9.0 released – continued improving image support, added ability to tag posts, create new categories and tags.

If you have any comments or questions, or requested features, let me know!

Current proposed features are (stared * features should be avalible in the next release):

  • AJAX form submission *
  • Multiple image support *
  • Integration with the WP gallery
  • A login box, so you truly never have to see the wordpress admin pages
  • Make a widget for even simpler integration.

If you’re commenting for help with an error, I can’t help unless you give me either a detailed description or a link to the not-working site. I do want to help, but I can’t if I don’t know what went wrong!

133 Comments

  1. Is it possible to:
    1) set the form so that it’s not a pop up window but rather is fixed on a given page?
    2) set it so that certain categories will automatically be set (but not seen by user)?
    THANKS,

    • I 2nd the 1st question I also want to be able to let users post from the front page…any way of doing that

  2. I’ve got the link but it does nothing, all the files in the download are in the post-from-site folder, pluggin activated.
    code inserted at end of header.

    Would be nice to be able to make it in the menubar with a highlighted box too. For starters though I would love it to work!!

    thanks so much.
    Reid

  3. i am using latest plugin with wp 2.9.1 and i get js errors in ff and IE.
    pfsopen is undefined
    function onclick(event) {
    2 pfsopen(“1Clicktoaddanarticle”);
    3 }
    any info about this error? thanks

  4. hi expert,

    I tried to use yours, but i cannot post it unless i am logged on.
    can you give some input?

  5. Yes I have same problem : error onpage

    I don’t know What wrong I follow instrution installation

    I use wordpress 2.9.2

    I see this site and try to click QuickPost at this right page it ok.

    Somebody Please tell more about this.

  6. its not working …

  7. Its not working … no pop up plz fix it !

  8. This works great for me. Wonderful plugin!

    I’m looking forward to the updates. In the meantime I’ll code up my own widget for easy sidebar inclusion, and look into converting from popup to embedded form. You’ve done the hard part, thanks!

    -Phillip

  9. Hello,

    I’ve just automatically installed post form site 1.9 from wordpress to my blog WordPress 2.9.2.

    When I copy in:

    Either on a page or as a text box in a sidebar, nothing appears on screen. Any advice would be appreciate as I’d love to get this working :) (I’m not very techy!)

    Thanks!
    Elaine.

  10. Hey, when I install with the latest buddypress and wpmu I’m getting an error when I try to access any page of the site on wp-include/capabilities.php. The error occurs on the line where it states “$current_user = wp_get_current_user();”

    This plugin seems perfect for what I want to do. Let me know if you have any suggestions.

    Thanks!
    Brent

  11. Hello, I installed the plug in and configurated it.. now I have put the code in the side bar but when I go over it to click it and send a post, I don’t get a way to click on it,… so nothing happens, can you please check and tell me what could be happening?

    Any additional information you need, I’ll be pleased to send to you.

    Thank you very much.

    Cristina.

  12. April 7, 2010 at 2:42 am Silkchen says:

    Hello Kelly,

    this may be a stupid question, but were can i put the code you mention above for the plugin to work? I am using wp and bp, both latest versions, and your plugin is installed and activated – but doe nothing at all. Tried to put the code in the sidebar.php as well as the footer.php but I don’t see any change on my site.

    Please help! :-(
    Silke

  13. How do I include a confirmation message after the submit?

  14. Hello Kelly – sorry for the long comment and I hope there aren’t too many typos!

    I think I have resolved the issues reported by various users in these comments.

    I believe the issue only occurs when deploying the plugin on a local (or possibly only Windows based) server. I encountered the problem running it on a local test server (Wamp Apache MySQL php). The path creation code in function pfs_includes() does not work because it mixes the ‘/’ literal characters and ‘\’ from windows directories in the resultant strings. This is because the code uses __FILE__ as the source for the $path. In windows the path may be “C:\wamp\www\yoursite\wp-content\plugins\post-from-site”. So the final path produced in the source code for the served page is http://localhost/yoursite/wp-contentpluginspost-from-site/pfs_display.js (note that the ‘\’ from the windows style folder names have been ignored).

    In my humble opinion I think that the root for your path should be derived from: get_options(‘wpurl’).the-path-to-the-plugin-directory.pfs_display.js (note using wpurl rather than url as the root installation directory).

    In my crude fix I have assumed that the path to the plugins is standard (wp-content/plugins/post-from-site) and have made the code work as follows:
    function pfs_includes(){
    $pfsplugin_path = get_bloginfo(‘wpurl’) . ‘/wp-content/plugins/post-from-site’;
    // $path = split(‘wp-content’,__FILE__,2);
    wp_enqueue_script( ‘pfs_display’, $pfsplugin_path .’/pfs_display.js’);
    wp_enqueue_style( ‘pfs_style’, $pfsplugin_path .’/pfs_style.php’);
    ?>

    Now I’m no expert and I don’t think the above is particularly elegant but you might want to take a look and see if you agree that this is the solution. Also the function split is deprecated from php 5.3 so you may want to consider another route to creating the path.

    Now here’s my request: I’d like to be able to select more than one category and more than one tag for the Post created.
    I’m also working on making it only available, from a sidebar widget, to users logged on as Admin or Authors before allowing access to the Post window.

    I’ve not yet deployed this on my ‘live’ site but intend to if I can get it working in the way I want to. I’ll let you know.

    I hope this helps you and the other users.

    Bye for now
    Ian

    • Scratch those requests about Categories and Tags – I’ve just figured that using CTRL+left_click on the Categories and Tags allows you to select more than one. Thanks.

      Ian

  15. Hi Kelly,
    I am quite a newbie and was wondering how I can make the Post From Site link show as an attractive button like you have?
    Please help and thanks for your hard work making it,
    Nick
    x

  16. Call to undefined function wp_get_current_user() in /******/wp-includes/capabilities.php on line 969

  17. May 14, 2010 at 11:27 am Jonathan says:

    Trying to get this plugin to work with four browsers: Mac – Safari & FF, Windows – IE & FF. It works in all but Windows IE (surprise).

    I think Ian answered this question, but I don’t know enough about code for it to make sense.

    Any advice?

  18. May 14, 2010 at 12:50 pm Jonathan says:

    How can I change the font size in the link text?

  19. May 14, 2010 at 1:26 pm Jonathan says:

    Is it possible to set a maximum width for uploaded images?

  20. Hi, my problem is:
    The pop-up won’t pop-up! (aka there is a link, but clicking it does nothing.)

    My site is: bettable.it

    You will find this link
    Pubblica un articolo ORA, e accumuli punti!

    this is the post from site link.

    Thank you for your help!

Sorry, the comment form is closed at this time.

Powered by WordPress