code

Integrating SMS Solution to Drupal Websites

SMS List Block

Reaching out to the targeted audience, is one of the goal for any business. here is a list of modules which will allow your website to interact with your audience

  • SMS Framework : Provides a extensible API that facilitates communication between Drupal and various SMS gateways.
    • SMS Actions : Provides an action for sending outgoing messages and the ability to define custom triggers for incoming messages.
    • SMS Blast : Allows bulk text messages to be sent to registered users.
  • SMS List : Manages Subscriptions, and send text messages when needed

SMS Gateways

Other then the module mentioned above you will need an active subscription to a SMS Gateway to send or recieve SMS and a module which can integrate these gateways, Drupal modules for the following SMS Gateways are available

  • Clickatell (International Support over 200 Networks) (Included in Core)
  • MySMSMantra (Only for Indian Numbers)

To Test the service you can even use Email Gateways or Log Only Mode availaable in SMS Framework. A complete list of Supported Gateways is available here.

 

Random Link for Wordpress Blogs

I recently started my Photo Blog, after various considerations i choosed Wordpress for it, currently i have more than 20 photos posted on it which is not actually a big number but i found that the older images or posts will never be seen to the readers as they don't appear on the frontpage for more than 4-5 days, which created a requirement of creating a Random Link on frontpage to show a Random post to the user if he wants to and this began search for a module or a plugin as its said in wordpress.

But No Luck i found various plugins but i needed something very very simple so i thought going by the code which lead me using the following code in my header.php to create a Random Post link

<?php
$randomPost = $wpdb->get_var("SELECT guid FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' ORDER BY rand() LIMIT 1");
echo '<a href="'.$randomPost.'">>>Random Image<<</a>';
?>

The above code is quite simple and does exactly what is needed to generate a random post link for your wordpress blog.