CGI Interactions
A blog about interactive communications for marketers, designers and developers

SlideShare: Spread the Love

June 29th, 2009 . by Social Gal

How can SlideShare be used as a business leads tool? Inspire others? Tell a story? I feel as though SlideShare is often overlooked as a community platform where people can connect about their interests and share information. Although it can be a great place to simply upload web content, doing so doesn’t allow SlideShare to fully flex its community muscles. Below are a few tips on how to optimize the platform as part of a larger marketing plan:

Create Dynamic Content:  Create presentations that are dynamic and include links to related sites within the presentation. This can help drive traffic to your website, other online content (such as Youtube videos), or give others credit if you use a quote or other content that can be linked to online.

Become Involved with SlideShare Community: Once you have set up your profile, search for other users with similar interests and “favorite” their presentations. Also, make comments on people’s work you like or have an opinion about. By doing this you can start conversations within the SlideShare community and strengthen your online network.

Spread the Love: Other social networks such as LinkedIn and Facebook are very SlideShare friendly and have applications that allow you to share your work. Upload presentations onto other social networking platforms to reach your established community. In addition, other people who don’t use SlideShare can find your information there and find out a little bit more about who you are or what your company does.

Push the Boundaries: Recently I watched a  webinar by Hubspot on “How to Use Online Video for Inbound Marketing.” In the webinar the presenters, Karen Rubin and Mike Vlope, used their usual pod casting format, while users could flip through their SlideShare presentation. It was great! I was able to listen and flip at either my own pace or theirs and even stop the audio and go back later when it was convenient for me. The dynamic use of the platform made the information easily socialized and presentable online.

 

 

The point to remember is that SlideShare is more than just a place for content creation. With PowerPoint being such an easy way to share information with others,  the power of using SlideShare to create or expand a community presence increases your online marketing potential.

Are there any unique ways you use SlideShare that you have found useful in your marketing plans?

Posted in: CMO Corner, Digital Marketing, Insights, PowerPoint, Social Media Marketing

CLIO Interactive Awards 2009

June 26th, 2009 . by Social Gal
Clio logo

Clio logo

Every year CLIO releases its list of Gold, Silver, and Bronze winners for their awards in advertising, design, and interactive. These awards have been handed out for nearly five decades and is one of the most recognized global competitions. Not only are these awards meant to honor the winning designs, but also recognize the communication impact on modern culture. As interactive design becomes more advanced, CLIO has been keeping pace with the industry to recognize cutting edge work.

One of my favorites from the 2009 list of Gold Winners is GE’s “Plug Into the Smart Grid.” It combines clean logos, the newest in interactive technology, and promotes a message of environmental change.

Check out a full list of interactive winners here.

Is there anyone you think is missing?

Posted in: Industry News, News & Events

How to use simpleXML in PHP (guestbook example)

June 23rd, 2009 . by nixon

DOWNLOAD THE FILES FOR THIS TUTORIAL HERE

Who loves DOM programming? The answer: no one. We all know how powerful and almighty the DOM is when it comes to coding in the browser, but we also know how time consuming, confusing, and excessive it can also be. Sometimes I don’t want to rule the world like everyone else, sometimes I just want to get or change data from a basic ol’ XML file. We use simpleXML to power our totally awesome CMS system that can operate in a self contained way without a database to back it and it’s great.

I remember when I first got into experimenting with simpleXML I found a lot of the tutorials online a bit confusing, especially when it comes to learning how to edit the XML file. I’d like to try and make simpleXML simple to understand. First you have the basic task of reading some XML data. So we’re all on the same page when it comes to this, here is the XML file we’ll be working with:

guestbook.xml


Mr. Bill
Ohhhh nooooooo!

Bob Ross
If you've painted, you've made mud.

This is the outline of a very basic guest book you might have on a site. If you wanted to print all the comments and who made them, you could use this function:

READING THE XML

function getComments(){
$file = "guestbook.xml";
$xml=simplexml_load_file($file) or die("Unable to load XML!"); 

   foreach ($xml->comment as $comment) {

  echo "".$comment->who." - ";
   echo $comment->message."

";
   }

}

This will print:

Mr. Bill – Ohhhh nooooooo!

Bob Ross – If you’ve painted, you’ve made mud.

Simple! Now if you wanted to also make the posters name a link to their email address you could change that echo statement to this:


echo ''; echo $comment->who." - ";
echo $comment->message."

";

Adding New XML Blocks
See how easy it is to access attributes? Now, we’ll need a function to add new comments. Which would look something like this:

function newComment($name, $email, $message){
  $name = htmlspecialchars($name);
  $email = htmlspecialchars($email);
  $message = htmlspecialchars($message);

  $file = "guestbook.xml";

  $xml=simplexml_load_file($file) or die("Unable to load XML!");
  $time =time();
  $newPage = $xml->addChild('comment');
  $newPage->addAttribute('time',$time);
  $newPage->addAttribute('email',$email);

  $newPerson = $newPage->addChild('who',$name);

  $newPage->addChild('message',$message);

  file_put_contents($file, $xml->asXML());

}

To add new comments just pass the values to the function like this:

newComment("Strongbad", "strongbad@strong.com", "Ey' Steve!");

So easy!
Edit XML Data
Maybe you want to edit a comment? The function to do this is going to take advantage of the “time” attribute. The time attribute was set by php’s time() function which returns a unique time stamp, this will be our unique ID as this number will never be the same for two entries. This function will edit the tag data:

function editComment($newData, $time, $tag){
$file = "guestbook.xml";
$xml=simplexml_load_file($file) or die("Unable to load XML!");
   foreach ($xml->comment as $comment) {

  if($comment['time'] == $time){
    $comment->$tag = htmlspecialchars($newData);
    file_put_contents($file, $xml->asXML());
    }

}
}

Notice how it’s a generic function? I can edit the “message” or the “who” field just by altering the parameters I pass to the function:

//change the message
editComment("email, email, email", "1245428876", "message");

//change the who
editComment("the cheat", "1245428876", "who");

Flexibility is the name of the game. With a little imagination and a lot of arrays you can even make generic functions to add new blocks of XML into a file. Thinking about looping through arrays of child elements, or multidimensional arrays of child and grandchild elements… it can get nuts.

Editing Attributes and Xpath
Now the final bit you need to know how to do is change attributes, maybe we want to change the email address of a post. I use XPath with simpleXML to do this, as I find it to be the most stable way to get it done. This last function is a doosey, these 4 little lines of code can do so much.

function writeAttribute($file, $tag, $identifier,$indenftifierVal, $attribute, $value){

  $xml = simplexml_load_file($file) or die ("Unable to load XML file!");
       $result = $xml->xpath('//'.$tag.'[@'.$identifier.'=\''.$indenftifierVal.'\']');
  $result[0][$attribute] = $value;

  file_put_contents($file, $xml->asXML());

}

The power! The power! I’m trying to cram a lot in here, so bear with me. The goal of any professional developer is to get it done correctly, and quickly. By writing versatile functions like the one above you can cycle it from one project to the next with no redevelopment time. While the other functions we’ve been going over are one time shots that would need to be tweaked to manage XML you may have elsewhere on your site, this single function can edit any XML file you’ve got anywhere on your site by just changing the way you call it. Passed to the above function you have: the XML file you want to modify, the tag in the schema (“comment” in this case), the identifier attribute (“time” in this case), the identifier value (the value of “time” in what you want to modify), the attribute you wish to change, and the value you wish it to be changed to. PHEW!

To change the email address in the Bob Ross comment you’d call the function like this:


writeAttribute("guestbook.xml","comment","time","1245429810", "email", "bob@bobross.com");

Of course there are certain XML schemes that would require the function be tweaked, but the general idea to always remember when coding functions is re-usability.

That should cover it. Till next time, keep on keepin’ on.

Posted in: Development, FAQs / Tips & Tricks, Insights

« Previous Entries



home     |     about     |     disclaimer     |     cgi interactive
© - CGI Interactive - 76 Otis Street - Westboro, MA 01581 - 508.898.2500