Tagged: php RSS

  • John 3:00 am on July 18, 2009 Permalink | Reply
    Tags: php, ,   

    Plugin Crazy! 

    So after creating my first proper plugin, post-to-facebook, I decided to have a go at creating another one. This one was created after I set up a blog for my dad to post updates and photos to so that he wouldn’t have to resend the same emails to different people. The after giving him a brief overview of how to post items and upload photos I noticed that the images he was uploaded were to large to be correctly displayed, when using the light box plugin. So from this I decided to write a plugin that would allow for the maximum size an uploaded image can be, and if it is larger it is resized. I’ll submit it to wordpress for download. This plugin is ideal for people who don’t want to worry about resizing their images before they post them to wordpress, this is ideal with. The plugin homepage is can be found on the page resize-on-upload-plugin

     
  • John 10:35 pm on July 14, 2009 Permalink | Reply
    Tags: php, ,   

    ‘Post to Facebook’ Wordpress Plugin 

    post-to-facebook screenshot

    After wanting to be able to post stuff to my facebook account from my blog for no other reason than “I Can”, I looked around at the plugins that exist at the moment. The ones that I found worked but they were not what I wanted. The closest I got was the plugin Publish To Facebook. What I didn’t like about this plugin was that it highjacked the publish/update button. What I wanted was the ability to press a button and publish to facebook for only the posts that choose. So I decided to write my own plugin, that add a button to the edit page to do just this.

    The can for the moment the source code can be checked out from bazaar repository, then simply upload the folder to the wp-content/plugins and you’re good to go. If you don’t like or use bazaar you can download the tar ball.

    Download: post-to-facebook.tar.gz

    bzr branch http://bzr.yeticode.co.uk/post-to-facebook
    
     
    • Karol 3:59 pm on July 15, 2009 Permalink | Reply

      Hey John,
      For some reason your plugin doesn’t work on my blog. Should I change something, some settings?
      Im using WP 2.8, could that be a reason?

      Cheers
      Karol

      • John 4:12 pm on July 15, 2009 Permalink | Reply

        What browser are you using? I have only tested it in Firefox 3.5 as I don’t have IE installed at the moment. Are you getting any errors?

        The expected result should be is that once the “Post To Facebook” button is pressed it reloads the page with a in browser popup window for the information to post to your facebook account. Is this not appearing or is there no button to press.

        Thanks for the feedback.

        • Bill 4:47 pm on July 15, 2009 Permalink | Reply

          Same issue here – no popup appears, all that happens is a screen refresh. Tested on IE7 on Windows, and FireFox on the Mac. WP 2.8.1.

          • John 4:51 pm on July 15, 2009 Permalink | Reply

            Ok I’m going to have to wait til I get home from work so I can get to a machine with a version of IE. I’ll hopefully get it fixed soon. Thanks for the feedback hopefully I can get this sorted.

    • Karol 4:00 pm on July 16, 2009 Permalink | Reply

      I’ve updated WP to 2.8.1 but still same symptoms as Bill’s. Screen refresh and that’s it.
      Tested on Google Chrome and Firefox, on Vista.

      Thanks

      • John 4:11 pm on July 16, 2009 Permalink | Reply

        What version of the plugin is it running, I made some changes last night. The current version is 1.0.3, i changed the version so I’m not sure if it will appear as plugin that has been updated. Additionally do you know if you host allows you to use session variables? As without it, it would explain the behaviour your are seeing. I’ll try and create a fresh install of wordpress this evening again to try and figure out what the problem is, as I have many plugins that are making it hard to discover why its not working

        • Karol 5:24 pm on July 16, 2009 Permalink | Reply

          I’ve updated the plug in, but still havin problems. Now i get this wornings all over my WP: Warning: session_start() [function.session-start]: open(/home/53712/data/tmp/sess_0b25d1ce1ecd2681560d6bcbbd5d60ac, O_RDWR) failed: No such file or directory (2) in /nfs/c03/h03/mnt/53712/domains/karolbednarczyk.com/html/wp-content/plugins/post-to-facebook/post-to-facebook.php on line 11

          Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /nfs/c03/h03/mnt/53712/domains/karolbednarczyk.com/html/wp-content/plugins/post-to-facebook/post-to-facebook.php:11) in /nfs/c03/h03/mnt/53712/domains/karolbednarczyk.com/html/wp-content/plugins/post-to-facebook/post-to-facebook.php on line 11

          • John 8:41 pm on July 16, 2009 Permalink | Reply

            I’ve just commited an update (1.0.4) so that the plugin does not use session variables. Hopefully this will work. If not I’ll keep at it.

            Thanks

            • Karol 8:57 pm on July 16, 2009 Permalink

              Is it updated on WP site? I’m updating through WP Dashboard panel, saves me all login’ to servers etc.

              BTW Thanks Johny, for all that work.

            • Karol 12:02 pm on July 17, 2009 Permalink

              Just checked, it works!
              Thanks a lot!

    • Ed 3:34 pm on August 13, 2009 Permalink | Reply

      I have multiple bloggers on my site. will the plugin recognize the different people and post to their individual facebook accounts? That is what I would like to do. Or will all things go to the same facebook account regardless of the author?
      Thanks
      Ed

      • John 11:39 am on August 14, 2009 Permalink | Reply

        It depends on who is using the blog at the time, as it will use the persons own facebook account. If they do not have an active session with facebook it will ask them to login otherwise it will allow them to submit it directly. So this won’t cause a problem unless you are sharing a single computer, or have multiple facebook accounts.

  • John 6:43 pm on April 1, 2009 Permalink | Reply
    Tags: php, , ,   

    Simple SVN WordPress Widget 

    After getting bored on working on my final year project I decided to take a look at creating widgets word my blog. There are SVN hooks on my repositories that store the commit details in a SQL database. I thought I would create a widget that would pull out the last message and display it.

    /*
    Plugin Name: LastCommit
    Plugin URI: http://blog.yeticode.co.uk/
    Description: Gets Last Commit Message
    Author: John Tindell
    Version: 1
    Author URI: http://blog.yeticode.co.uk/
    */
    function lastCommit_widget() {
    
    	$server = 'localhost';
    	$link = mssql_connect($server, 'username', '************');
    	echo '
    
  • '; echo "

    Last Commit

    "; if($link) { mssql_select_db('svnyeti', $link); $query = mssql_query('select top 1 * from SVNLog order by liLogEntryPk desc', $link); $row = mssql_fetch_array($query); print '

    ' . $row['lszLogEntry'] . '

    '; } echo '
  • '; } function init_lastCommit(){ register_sidebar_widget("LastCommit", "lastCommit_widget"); } add_action("plugins_loaded", "init_lastCommit");

    When I get more time I will develop this a bit more.

     
    • Glenn Bennett 3:26 pm on April 9, 2009 Permalink | Reply

      John,

      I would be easy to make the widget a bit more theme friendly by using my new tool over at widgetifyr.com.

      If you get a chance to try it please let me know what you think.

      Glenn

c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
esc
cancel