Standing on the shoulders of Giants

Post on 20-Jan-2015

1.431 views 2 download

Tags:

description

This is the talk i gave at Wordcamp India which explains how we used Wordpress to build RadioVeRVe(http://radioverve.com)

Transcript of Standing on the shoulders of Giants

Building a radio site on wordpress

Building a radio site on wordpress

In the beginning...

Textpattern

We moved because...

Extensibility

Well known CMS

PluginsFrom scratch butt to land on moon

That lovely community

After about 6 months of work...

Design 3

Learnt some important lessons

Deal with multiple databases

define('IC_DB_NAME', 'phqueue');define('IC_DB_USER', 'phqueue');define('IC_DB_PASSWORD', 'blahblah');define('IC_DB_HOST', 'localhost');

if( !function_exists('switch_to_icecast_db') ) { function switch_to_icecast_db() { $connect = mysql_connect(IC_DB_HOST, IC_DB_USER, IC_DB_PASSWORD); mysql_select_db(IC_DB_NAME} }}

Ze plugins are Fscked in wp_head

Programmatic Pages

$my_post = array();$my_post['post_title'] = $artist_name;$my_post['post_type']='page';$my_post['post_author']=$user_id;$my_post['post_status'] = 'publish';$my_post['post_parent']='32';$postid=wp_insert_post( $my_post );

if($postid){ $sql="insert into {$wpdb->prefix}postmeta (post_id,meta_key,meta_value) VALUES('$postid','_wp_page_templat\e','artistinfo.php')"; $wpdb->query($sql);}

Ninja foo

add_action('load-profile.php', 'rv_update_profile', 98);

Ninja Bar

$user = wp_authenticate($username, $password); if(!is_wp_error($user)){ wp_signon(array('user_login'=>$username, 'user_password'=>$password,'remember'=>'true')); echo "1"; }else

wp_enqueue

huge thanks to everyone who makes

wp happen!

One can see further standing on

shoulders of giants!

Thanks