cat_ID] = $stylewp_cat->cat_name; } $categories_tmp = array_unshift($stylewp_categories, "Select a category:"); $options = array ( array( "name" => "

General Settings

", "type" => "heading"), array( "name" => "Activate News Ticker?", "desc" => "Check to activate the RSS news ticker on your frontpage
(See users guide for setup instructions)

", "id" => $shortname."_showticker", "std" => "true", "type" => "checkbox"), array( "name" => "Activate Pages Menu?", "desc" => "Check to activate your 'Pages' menu

", "id" => $shortname."_showpagesmenu", "std" => "true", "type" => "checkbox"), array( "name" => "Activate Categories Menu?", "desc" => "Check to activate your 'Categories' menu

", "id" => $shortname."_showcatsmenu", "std" => "true", "type" => "checkbox"), array( "name" => "Activate Todays Date?", "desc" => "Check to activate the date and time in your header

", "id" => $shortname."_showdate", "std" => "true", "type" => "checkbox"), array( "name" => "More News Title", "desc" => "Edit the more news block.

", "id" => $shortname."_haveyouread", "std" => "Have you read?", "type" => "text"), array( "name" => "Show 'Top' link?", "desc" => "Check to activate the 'top' link in your footer

", "id" => $shortname."_showtop", "std" => "true", "type" => "checkbox"), array( "name" => "Edit 'Top' text", "desc" => "Edit the 'top' link text.


", "id" => $shortname."_toplink", "std" => "Back to the Top", "type" => "text"), array( "name" => "

Google Analytics

", "type" => "heading"), array( "name" => "Analytics Code", "desc" => "Paste your Google analytics code here or
leave blank to deactivate this setting.

", "id" => $shortname."_analytics", "std" => "", "type" => "textarea"), array( "name" => "

META Settings

", "type" => "heading"), array( "name" => "Keywords", "desc" => "Give your site some META keywords

", "id" => $shortname."_keywords", "std" => "Enter keywords seperated with a comma", "type" => "textarea"), array( "name" => "Description", "desc" => "Give your site a META description


", "id" => $shortname."_description", "std" => "Enter a description for the search engines", "type" => "textarea"), array( "name" => "

Members Menu

", "type" => "heading"), array( "name" => "Home Link", "desc" => "Give this link a suitable title.

", "id" => $shortname."_toplinks1", "std" => "WPSN.com", "type" => "text"), array( "name" => "Admin Link", "desc" => "Give this link a suitable title.

", "id" => $shortname."_toplinks3", "std" => "MyWPSN", "type" => "text"), array( "name" => "Profile Link", "desc" => "Give this link a suitable title.

", "id" => $shortname."_toplinks4", "std" => "Profile", "type" => "text"), array( "name" => "Register Link", "desc" => "Give this link a suitable title.

", "id" => $shortname."_toplinks5", "std" => "Register", "type" => "text"), array( "name" => "Password Link", "desc" => "Give this link a suitable title.


", "id" => $shortname."_toplinks6", "std" => "Forgot Password?", "type" => "text"), array( "name" => "

Search Settings

", "type" => "heading"), array( "name" => "Search Tagline", "desc" => "Add a suitable tagline above your frontpage search field.

", "id" => $shortname."_searchtagline", "std" => "Try the powerful WPSN search:", "type" => "text"), array( "name" => "Search field text", "desc" => "Add some text to your search field.

", "id" => $shortname."_searchline", "std" => "Search our site . . .", "type" => "text"), array( "name" => "Selected Search Text", "desc" => "Add some text above your selected search area.

", "id" => $shortname."_searchestagline", "std" => "Selected WPSN searches:", "type" => "text"), array( "name" => "Search Term #1", "desc" => "Add a single-word search term here.

", "id" => $shortname."_search1", "std" => "Rankings", "type" => "text"), array( "name" => "Search Term #3", "desc" => "Add a single-word search term here.

", "id" => $shortname."_search3", "std" => "Fantasy", "type" => "text"), array( "name" => "Search Term #4", "desc" => "Add a single-word search term here.

", "id" => $shortname."_search4", "std" => "Picks", "type" => "text"), array( "name" => "Search Term #5", "desc" => "Add a single-word search term here.

", "id" => $shortname."_search5", "std" => "Injuries", "type" => "text"), array( "name" => "Search Term #6", "desc" => "Add a single-word search term here.

", "id" => $shortname."_search6", "std" => "Projections", "type" => "text"), array( "name" => "Search Term #7", "desc" => "Add a single-word search term here.

", "id" => $shortname."_search7", "std" => "Rookies", "type" => "text"), array( "name" => "Search Term #2", "desc" => "Add a single-word search term here.

", "id" => $shortname."_search2", "std" => "Blogs", "type" => "text"), array( "name" => "Search Term #8", "desc" => "Add a single-word search term here.


", "id" => $shortname."_search8", "std" => "Superbowl", "type" => "text"), array( "name" => "

Frontpage Static Links

", "type" => "heading"), array( "name" => "Sub-Link #1", "desc" => "Give this link a suitable title.

", "id" => $shortname."_lbox1txt", "std" => "Watch: Implications", "type" => "text"), array( "name" => "Sub-Link URL #1", "desc" => "Enter the link destination.

", "id" => $shortname."_lbox1url", "std" => "#", "type" => "text"), array( "name" => "Sub-Link #3", "desc" => "Give this link a suitable title.

", "id" => $shortname."_lbox3txt", "std" => "Zoom Gallery", "type" => "text"), array( "name" => "Sub-Link URL #3", "desc" => "Enter the link destination.

", "id" => $shortname."_lbox3url", "std" => "#", "type" => "text"), array( "name" => "Sub-Link #4", "desc" => "Give this link a suitable title.

", "id" => $shortname."_lbox4txt", "std" => "Giants 41 - 45 Redskins", "type" => "text"), array( "name" => "Sub-Link URL #4", "desc" => "Enter the link destination.

", "id" => $shortname."_lbox4url", "std" => "#", "type" => "text"), array( "name" => "Sub-Link #5", "desc" => "Give this link a suitable title.

", "id" => $shortname."_lbox5txt", "std" => "Leap of faith", "type" => "text"), array( "name" => "Sub-Link URL #5", "desc" => "Enter the link destination.

", "id" => $shortname."_lbox5url", "std" => "#", "type" => "text"), array( "name" => "Sub-Link #6", "desc" => "Give this link a suitable title.

", "id" => $shortname."_lbox6txt", "std" => "Bulls 99 - 103 Lakers", "type" => "text"), array( "name" => "Sub-Link URL #6", "desc" => "Enter the link destination.

", "id" => $shortname."_lbox6url", "std" => "#", "type" => "text"), array( "name" => "Sub-Link #7", "desc" => "Give this link a suitable title.

", "id" => $shortname."_lbox7txt", "std" => "NFL Europa LIVE!", "type" => "text"), array( "name" => "Sub-Link URL #7", "desc" => "Enter the link destination.

", "id" => $shortname."_lbox7url", "std" => "#", "type" => "text"), array( "name" => "

Selectable News Block

", "type" => "heading"), array( "name" => "Item #1", "desc" => "Select the category this area will display news from.

", "id" => $shortname."_fl1l", "std" => "Select a category:", "type" => "select", "options" => $stylewp_categories), array( "name" => "Item #3", "desc" => "Select the category this area will display news from.

", "id" => $shortname."_fl3l", "std" => "Select a category:", "type" => "select", "options" => $stylewp_categories), array( "name" => "Item #4", "desc" => "Select the category this area will display news from.

", "id" => $shortname."_fl4l", "std" => "Select a category:", "type" => "select", "options" => $stylewp_categories), array( "name" => "

Latest News Links

", "type" => "heading"), array( "name" => "Link #1", "desc" => "Give this link a suitable title.

", "id" => $shortname."_newslink1", "std" => "Latest News", "type" => "text"), array( "name" => "Link #3", "desc" => "Give this link a suitable title.

", "id" => $shortname."_newslink3", "std" => "Rumor Central", "type" => "text"), array( "name" => "Link #3 Destination", "desc" => "Paste the destination URL for this link.

", "id" => $shortname."_newslink3url", "std" => "#", "type" => "text"), array( "name" => "Link #4", "desc" => "Give this link a suitable title.

", "id" => $shortname."_newslink4", "std" => "On WPSN TV", "type" => "text"), array( "name" => "Link #4 Destination", "desc" => "Paste the destination URL for this link.

", "id" => $shortname."_newslink4url", "std" => "#", "type" => "text"), array( "name" => "

Promotional Settings

", "type" => "heading"), array( "name" => "
Block #1
", "type" => "heading"), array( "name" => "Block Title", "desc" => "Give this block a title.


", "id" => $shortname."_ptitle", "std" => "Featured Promotional Block", "type" => "text"), array( "name" => "Left Title", "desc" => "Enter a header for this block.

", "id" => $shortname."_p1h1", "std" => "This is a suitable title for this block", "type" => "text"), array( "name" => "Left Image", "desc" => "Enter the URL to your chosen image.

", "id" => $shortname."_p1img", "std" => "http://stylewp.com/assets/author_1.jpg", "type" => "text"), array( "name" => "Left Contents", "desc" => "Enter some relevant text here.

", "id" => $shortname."_p1txt", "std" => "This is some text to accompany the above image and is controlled using the built-in theme control panel.", "type" => "textarea"), array( "name" => "Left Destination", "desc" => "Enter the destination URL here.


", "id" => $shortname."_p1url", "std" => "#", "type" => "text"), array( "name" => "Right Title", "desc" => "Enter a header for this block.

", "id" => $shortname."_p3h1", "std" => "This is a suitable title for this block", "type" => "text"), array( "name" => "Right Image", "desc" => "Enter the URL to your chosen image.

", "id" => $shortname."_p3img", "std" => "http://stylewp.com/assets/author_3.jpg", "type" => "text"), array( "name" => "Right Contents", "desc" => "Enter some relevant text here.

", "id" => $shortname."_p3txt", "std" => "This is some text to accompany the above image and is controlled using the built-in theme control panel.", "type" => "textarea"), array( "name" => "Right Destination", "desc" => "Enter the destination URL here.


", "id" => $shortname."_p3url", "std" => "#", "type" => "text"), array( "name" => "
Block #3
", "type" => "heading"), array( "name" => "Block Title", "desc" => "Give this block a title.


", "id" => $shortname."_pbtitle", "std" => "Another Promotional Block", "type" => "text"), array( "name" => "Destination", "desc" => "Enter the destination URL here.

", "id" => $shortname."_pburl", "std" => "#", "type" => "text"), array( "name" => "Image", "desc" => "Enter your chosen image URL.

", "id" => $shortname."_pbimg", "std" => "http://stylewp.com/assets/400_promo.jpg", "type" => "text"), array( "name" => "Alt Text", "desc" => "Enter some relevant text which is used as the image alt.


", "id" => $shortname."_pbalt", "std" => "This is a promotional block", "type" => "text"), array( "name" => "

Inner Pages Control

", "type" => "heading"), array( "name" => "Author Sub-Text", "desc" => "Edit the line of text underneath each authors name.

", "id" => $shortname."_authorsub", "std" => "for WPSN.com", "type" => "text"), array( "name" => "Published", "desc" => "Edit the published date text.

", "id" => $shortname."_publishedon", "std" => "Published:", "type" => "text"), array( "name" => "Show Tags?", "desc" => "Check to show tags under each news item

", "id" => $shortname."_showtags", "std" => "true", "type" => "checkbox"), array( "name" => "Show Gravatars?", "desc" => "Check to activate Gravatar support for your comments

", "id" => $shortname."_showava", "std" => "true", "type" => "checkbox"), array( "name" => "Related Items", "desc" => "Edit the Related Items header text.

", "id" => $shortname."_siderelated", "std" => "Related News Headlines", "type" => "text"), array( "name" => "Latest Items", "desc" => "Edit the Latest Items header text.

", "id" => $shortname."_sidelatest", "std" => "WPSN Latest", "type" => "text"), array( "name" => "How Many Latest Items?", "desc" => "Select how many Latest Items to show in your sidebar.", "id" => $shortname."_sidebarlatest", "std" => "Select a Number:", "type" => "select", "options" => $sidebarlatest), array( "name" => "

Advertisement Settings

", "type" => "heading"), array( "name" => "Spot #1", "desc" => "Paste your 238x90 ad code above.

", "id" => $shortname."_banner1", "std" => "", "type" => "textarea"), array( "name" => "Spot #3", "desc" => "Paste your 447x380 ad code above.

", "id" => $shortname."_banner3", "std" => "", "type" => "textarea"), array( "name" => "Spot #4", "desc" => "Paste your 400x60 ad code above.

", "id" => $shortname."_banner4", "std" => "", "type" => "textarea"), array( "name" => "Spot #5", "desc" => "Paste your 400x360 ad code above.

", "id" => $shortname."_banner5", "std" => "", "type" => "textarea"), array( "name" => "Spot #6 Title", "desc" => "Edit the title text above this ad spot.

", "id" => $shortname."_sponsoredby", "std" => "WPSN Recommended Sponsors", "type" => "text"), array( "name" => "Spot #6", "desc" => "Paste your 360x360 ad code above.

", "id" => $shortname."_banner6", "std" => "", "type" => "textarea"), array( "name" => "Show Spot #7?", "desc" => "Check to activate this banner spot

", "id" => $shortname."_show7", "std" => "true", "type" => "checkbox"), array( "name" => "Spot #7", "desc" => "Paste your 345x160 ad code above.

", "id" => $shortname."_banner7", "std" => "\"banner", "type" => "textarea"), array( "name" => "Show Spot #2?", "desc" => "Check to activate this banner spot

", "id" => $shortname."_show2", "std" => "true", "type" => "checkbox"), array( "name" => "Spot #2", "desc" => "Paste your 345x160 ad code above.

", "id" => $shortname."_banner2", "std" => "\"banner", "type" => "textarea"), array( "name" => "Show Spot #8?", "desc" => "Check to activate this banner spot

", "id" => $shortname."_show8", "std" => "true", "type" => "checkbox"), array( "name" => "Spot #8", "desc" => "Paste your 345x160 ad code above.

", "id" => $shortname."_banner8", "std" => "\"banner", "type" => "textarea"), array( "name" => "Show Spot #9?", "desc" => "Check to activate this banner spot

", "id" => $shortname."_show9", "std" => "true", "type" => "checkbox"), array( "name" => "Spot #9", "desc" => "Paste your 345x160 ad code above.

", "id" => $shortname."_banner9", "std" => "\"banner", "type" => "textarea"), array( "name" => "Show Spot #10?", "desc" => "Check to activate this banner spot

", "id" => $shortname."_show10", "std" => "true", "type" => "checkbox"), array( "name" => "Spot #10", "desc" => "Paste your 345x160 ad code above.

", "id" => $shortname."_banner10", "std" => "\"banner", "type" => "textarea"), array( "name" => "Show Spot #11?", "desc" => "Check to activate this banner spot

", "id" => $shortname."_show11", "std" => "true", "type" => "checkbox"), array( "name" => "Spot #11 Title", "desc" => "Edit the title text above this ad spot.

", "id" => $shortname."_sptext", "std" => "Sponsored Links", "type" => "text"), array( "name" => "Spot #11", "desc" => "Paste your 447x380 ad code above.

", "id" => $shortname."_banner11", "std" => "\"banner", "type" => "textarea"), array( "name" => "

Featured Video Settings

", "type" => "heading"), array( "name" => "Show Video?", "desc" => "Check to activate the featured video spot on
the frontpage.

", "id" => $shortname."_showvideo", "std" => "true", "type" => "checkbox"), array( "name" => "Embed Code", "desc" => "Paste your chosen video embed code here.
(Be sure to resize the video to 345x300)


", "id" => $shortname."_featuredvideo", "std" => "", "type" => "textarea"), array( "name" => "

Copyright Settings

", "type" => "heading"), array( "name" => "Years", "desc" => "Enter the years of copyright

", "id" => $shortname."_copyyear", "std" => "1992 - 3009", "type" => "text"), array( "name" => "URL", "desc" => "Enter the full URL to copyright holders site

", "id" => $shortname."_copyurl", "std" => "http://www.google.com", "type" => "text"), array( "name" => "Name", "desc" => "Enter the copyright holders company name

", "id" => $shortname."_copyco", "std" => "Your Great Company, LLC", "type" => "text"), array( "name" => "Rights", "desc" => "Enter the rights reserved text

", "id" => $shortname."_copyrights", "std" => "All rights reserved.", "type" => "text"), ); function mytheme_add_admin() { global $themename, $shortname, $options; if ( $_GET['page'] == basename(__FILE__) ) { if ( 'save' == $_REQUEST['action'] ) { foreach ($options as $value) { if($value['type'] != 'multicheck'){ update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }else{ foreach($value['options'] as $mc_key => $mc_value){ $up_opt = $value['id'].'_'.$mc_key; update_option($up_opt, $_REQUEST[$up_opt] ); } } } foreach ($options as $value) { if($value['type'] != 'multicheck'){ if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }else{ foreach($value['options'] as $mc_key => $mc_value){ $up_opt = $value['id'].'_'.$mc_key; if( isset( $_REQUEST[ $up_opt ] ) ) { update_option( $up_opt, $_REQUEST[ $up_opt ] ); } else { delete_option( $up_opt ); } } } } header("Location: themes.php?page=functions.php&saved=true"); die; } else if( 'reset' == $_REQUEST['action'] ) { foreach ($options as $value) { if($value['type'] != 'multicheck'){ delete_option( $value['id'] ); }else{ foreach($value['options'] as $mc_key => $mc_value){ $del_opt = $value['id'].'_'.$mc_key; delete_option($del_opt); } } } header("Location: themes.php?page=functions.php&reset=true"); die; } } add_theme_page($themename." Options", "$themename Options", 'edit_themes', basename(__FILE__), 'mytheme_admin'); } function mytheme_admin() { global $themename, $shortname, $options; if ( $_REQUEST['saved'] ) echo '

'.$themename.' settings saved.

'; if ( $_REQUEST['reset'] ) echo '

'.$themename.' settings reset.

'; ?>

options

" /> $option) { $radio_setting = get_settings($value['id']); if($radio_setting != ''){ if ($key == get_settings($value['id']) ) { $checked = "checked=\"checked\""; } else { $checked = ""; } }else{ if($key == $value['std']){ $checked = "checked=\"checked\""; }else{ $checked = ""; } }?> />
/> $option) { $pn_key = $value['id'] . '_' . $key; $checkbox_setting = get_settings($pn_key); if($checkbox_setting != ''){ if (get_settings($pn_key) ) { $checked = "checked=\"checked\""; } else { $checked = ""; } }else{ if($key == $value['std']){ $checked = "checked=\"checked\""; }else{ $checked = ""; } }?> />

:   ', ']]>', $content); $content = strip_tags($content); if (strlen($_GET['p']) > 0) { echo "

"; echo $content; echo " "."Read More →"; echo "

"; } else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) { $content = substr($content, 0, $espacio); $content = $content; echo "

"; echo $content; echo "..."; echo " ".$more_link_text.""; echo "

"; } else { echo "

"; echo $content; echo " "."Read More →"; echo "

"; } } ?>