Archive for the ‘Code’ Category

CodeIgniter data not posting

I have been working in this PHP MVC framework called CodeIgniter for the past few weeks. I learned yesterday, that if some of your post data is missing. It is most likely because CodeIgniter auto-closed your form due to bad markup. I have something like the following:

<fieldset>
<?php echo form_open(‘somecontroller/some_function’); ?>
… some form fields ….
</fieldset>
<fieldset>
… some more form fields …
</fieldset>
<?php echo form_close(); ?>

Guess who wasn’t getting all of the data posted? This guy! CI auto-closed the form at the first </fieldset> tag. Remember kids, always open your forms and close your form outside of any tags that might close before the form closes. Like this:

<?php echo form_open(‘somecontroller/some_function’); ?>
<fieldset>
… some form fields ….
</fieldset>
<fieldset>
… some more form fields …
</fieldset>
<?php echo form_close(); ?>

hostgator banner

bulk edit wordpress posts

I needed a fast and officiant way to edit all of my wordpress posts in bulk the other day. So I wrote a script that looks for a certain search string in a post and replaces that search string with another string. Fast efficient and easy to auto-edit all of your word press posts. Just remove the .txt extension, configure the search and replace varz, upload to the directory containing your wp-config.php file, and access with your web client. REMEMBER TO REMOVE THIS POWERFUL SCRIPT AFTER USE! http://vraidsys.com/article-includes/editposts.php.txt

working with MySpace Custom Application Activities

Over the past day or so, I have been doing some update/maintenance work on the I Am Super Rich MySpace application for Solitech GmbH. (You can also find its Facebook counterpart under the name I Am Rich.) I’ve done work on these application before, and have had success in picking up the code really quick, but I now have to transition the MySpace edition over the OpenSocial 0.8 to get the application to post on users’ event feeds. The (now old) 0.8 OpenSocial spec was released sometime in January 2009 on MySpace, and update from the really old 0.7 OpenSocail spec. Along with the 0.8 release on MySpace came the opening of Activity Feed functionality to 3rd party developers.

Here is what is required to get Applications posting to users’ event feeds:

  1. your MySpace app must be running in the 0.8 OpenSocial framework
  2. MySpace app must make use of the templating engine for Activies
  3. MySpace app must not be using old/deprecated 0.7 OpenSocial Javascript. This was a real problem for the IMSR app … had to hunt through several hundred lines of Javascript. Check out this seriously helpful MySpace developer wiki entry on transitioning your app to 0.8.

 

Return top