ARTF : Customize this 'Tell a Friend' Plugin which is useful as SEO tool to drive traffic. You can use this plugin anywhere within your WordPress site as a link or a widget. [Plugin Settings]. Version: 0.5 Author: Anup Raj Author URI: http://anupraj.com.np/ */ /* options page */ $options_page = get_option('siteurl') . '/wp-admin/admin.php?page=anupraj-tell-friends/anupraj-tell-friends-options.php'; $ARTFpluginpath = get_option('siteurl').'/wp-content/plugins/anupraj-tell-friends'; /* Adds our admin options under "Options" */ function AnupRaj_Tell_Friends_options_page() { global $ARTFpluginpath; add_menu_page( 'Customize AnupRaj Tell Friends', 'Tell Friends', 1,"anupraj-tell-friends/anupraj-tell-friends-options.php",'',"$ARTFpluginpath/images/ARTF.ico" ); add_submenu_page('anupraj-tell-friends/anupraj-tell-friends-options.php','AnupRaj Tell Friends Customization', 'ARTF > Customize', 9, "anupraj-tell-friends/anupraj-tell-friends-options.php" ,'','' ); add_submenu_page('anupraj-tell-friends/anupraj-tell-friends-options.php','AnupRaj Tell Friends STATS', 'ARTF > Status', 9, "anupraj-tell-friends/anupraj-tell-friends-stats.php" ,'','' ); add_submenu_page('anupraj-tell-friends/anupraj-tell-friends-options.php','AnupRaj Tell Friends Help', 'ARTF > Help', 8, "anupraj-tell-friends/anupraj-tell-friends-help.php" ,'','' ); } function AnupRaj_Tell_Friends_head() { global $ARTFpluginpath; /* The next lines figures out where the javascripts and images and CSS are installed, relative to your wordpress server's root: */ $plugin_path = get_bloginfo('wpurl')."/wp-content/plugins/anupraj-tell-friends/"; /* The xhtml header code needed for gallery to work: */ $pluginscript = " \n"; /* Output $galleryscript as text for our web pages: */ $additionaljs=<<< EOX EOX; echo($pluginscript); echo($additionaljs); } function AnupRaj_Tell_Friends_divs(){ global $ARTFpluginpath; if(get_option('ARTF_custom_msg')==""){$ARTF_custom_msg="Hi! I just found this page. I believe the contents of the page is useful to view. Thanks";}else{$ARTF_custom_msg=get_option('ARTF_custom_msg');} $ARTFuniquetime = md5(uniqid(time())); $ARTFcustom_message=""; if(get_option('ARTFcustom_message')==false){ $ARTFcustom_message="
"; } if(get_option('ARTFantiSPAM')==""){$ARTFantiSPAM = "We hate SPAM, hence we don't store emails :)";}else{$ARTFantiSPAM = get_option('ARTFantiSPAM');} if(get_option('ARTFcusTitle')==""){$ARTFcusTitle = "Tell Your Friends";}else{$ARTFcusTitle = get_option('ARTFcusTitle');} $ARTFdivs =<<< EOY EOY; echo ($ARTFdivs); } /* we want to add the above xhtml to our pages: */ add_action('wp_head', 'AnupRaj_Tell_Friends_head'); add_action('admin_menu', 'AnupRaj_Tell_Friends_options_page'); add_action('wp_footer', 'AnupRaj_Tell_Friends_divs'); /* Widget */ class AnupRaj_Tell_Friends extends WP_Widget { function AnupRaj_Tell_Friends() { $widget_ops = array('description' => __('This is useful widget to drive traffic on your site. Drag this widget and drop on the sidebar(s) to use. You can customize its features through the option page.', 'AnupRaj_Tell_Friends') ); //Create widget $this->WP_Widget('AnupRaj_Tell_Friends', __('AnupRaj Tell Friends', 'AnupRaj_Tell_Friends'), $widget_ops); } function widget($args, $instance) { extract($args, EXTR_SKIP); $title = empty($instance['title']) ? __('', 'AnupRaj_Tell_Friends') : apply_filters('widget_title', $instance['title']); $parameters = array( 'title' => $title ); global $ARTFpluginpath; if(get_option('ARTFtext')==""){$ARTFtext="Tell A Friend";}else{$ARTFtext=get_option('ARTFtext');} echo $before_title .''.$ARTFtext.''.$after_title; } //end of widget //Widget options form function form($instance) { ?>

To Customize this widget go to the Option Page.

Plugin Homepage:
AnupRaj Tell Friends
Author: Anup Raj