MyLinks2

Options relating to the MyLinks2 Plugin.
Please enter your API key, and choose layout options. Click Save Changes once done.

'; } function plugin_section_text2() { echo '

MyLinks2 uses the website thumbnail service from ShrinkTheWeb. You will need to obtain an API key.
The basic service offers 5,000 image hits per month and it\'s free. If you have a busy site, you can upgrade your API key.

Need to find your API key? See http://www.shrinktheweb.com/content/where-can-i-find-my-api-key.html

 

Please note MyLinks2 and it\'s creators are not affiliated with ShrinkTheWeb in any way.

'; } function plugin_setting_api_key() { $options = get_option('mylinks2_plugin_options'); echo ""; } function plugin_setting_img_size() { $items = array("mcr"=>"Micro 75x56", "tny"=>"Tiny 90x68", "vsm"=>"Very small 100x75", "sm"=>"Small 120x90", "lg"=>"Large 200x150", "xlg"=>"Extra Large 320x240"); $options = get_option('mylinks2_plugin_options'); echo ""; } function plugin_setting_thumb_layout() { //$items = array("Left", "Right"); $items = array("left"=>"Left Layout", "right"=>"Right Layout"); $options = get_option('mylinks2_plugin_options'); echo ""; } // validate our options function plugin_options_validate($input) { $options = get_option('mylinks2_plugin_options'); $options['api_key'] = trim($input['api_key']); if(!preg_match('/^[a-z0-9]{6,}$/i', $options['api_key'])) { $options['api_key'] = 'error'; } $options['img_size'] = trim($input['img_size']); if(!preg_match('/^[a-z0-9]{2,}$/i', $options['img_size'])) { $options['img_size'] = 'error'; } $options['thumb_layout'] = trim($input['thumb_layout']); if(!preg_match('/^[a-z0-9]+$/i', $options['thumb_layout'])) { $options['thumb_layout'] = 'error'; } return $options; }