|
11-04-2010, 20:46 | #1 |
Absinthe
Join Date: Jan 2007
Location: Chester
Posts: 2,345
|
PHP unexpected end... can anyone see it?
right, i've got this php functions file for wordpress that i've had to decrypt and it wont run because of an unexpected end.
Code:
<?php $themename = "WPSN"; $shortname = "stylewp"; $stylewp_categories_obj = get_categories('hide_empty=0'); $stylewp_categories = array(); $sidebarlatest = array("Select a Number:","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50"); foreach ($stylewp_categories_obj as $stylewp_cat) { $stylewp_categories[$stylewp_cat->cat_ID] = $stylewp_cat->cat_name; } $categories_tmp = array_unshift($stylewp_categories, "Select a category:"); $options = array ( array( "name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">General Settings</h3></div>", "type" => "heading"), array( "name" => "Activate News Ticker?", "desc" => "Check to activate the RSS news ticker on your frontpage<br />(See users guide for setup instructions)<br /><br />", "id" => $shortname."_showticker", "std" => "true", "type" => "checkbox"), array( "name" => "Activate Pages Menu?", "desc" => "Check to activate your 'Pages' menu<br /><br />", "id" => $shortname."_showpagesmenu", "std" => "true", "type" => "checkbox"), array( "name" => "Activate Categories Menu?", "desc" => "Check to activate your 'Categories' menu<br /><br />", "id" => $shortname."_showcatsmenu", "std" => "true", "type" => "checkbox"), array( "name" => "Activate Todays Date?", "desc" => "Check to activate the date and time in your header<br /><br />", "id" => $shortname."_showdate", "std" => "true", "type" => "checkbox"), array( "name" => "More News Title", "desc" => "Edit the more news block.<br /><br />", "id" => $shortname."_haveyouread", "std" => "Have you read?", "type" => "text"), array( "name" => "Show 'Top' link?", "desc" => "Check to activate the 'top' link in your footer<br /><br />", "id" => $shortname."_showtop", "std" => "true", "type" => "checkbox"), array( "name" => "Edit 'Top' text", "desc" => "Edit the 'top' link text.<br /><br /><br />", "id" => $shortname."_toplink", "std" => "Back to the Top", "type" => "text"), array( "name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Google Analytics</h3></div>", "type" => "heading"), array( "name" => "Analytics Code", "desc" => "Paste your Google analytics code here or<br />leave blank to deactivate this setting.<br /><br />", "id" => $shortname."_analytics", "std" => "", "type" => "textarea"), array( "name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">META Settings</h3></div>", "type" => "heading"), array( "name" => "Keywords", "desc" => "Give your site some META keywords<br /><br />", "id" => $shortname."_keywords", "std" => "Enter keywords seperated with a comma", "type" => "textarea"), array( "name" => "Description", "desc" => "Give your site a META description<br /><br /><br />", "id" => $shortname."_description", "std" => "Enter a description for the search engines", "type" => "textarea"), array( "name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Members Menu</h3></div>", "type" => "heading"), array( "name" => "Home Link", "desc" => "Give this link a suitable title.<br /><br />", "id" => $shortname."_toplinks1", "std" => "WPSN.com", "type" => "text"), array( "name" => "Admin Link", "desc" => "Give this link a suitable title.<br /><br />", "id" => $shortname."_toplinks2", "std" => "MyWPSN", "type" => "text"), array( "name" => "Profile Link", "desc" => "Give this link a suitable title.<br /><br />", "id" => $shortname."_toplinks3", "std" => "Profile", "type" => "text"), array( "name" => "Register Link", "desc" => "Give this link a suitable title.<br /><br />", "id" => $shortname."_toplinks4", "std" => "Register", "type" => "text"), array( "name" => "Password Link", "desc" => "Give this link a suitable title.<br /><br /><br />", "id" => $shortname."_toplinks5", "std" => "Forgot Password?", "type" => "text"), array( "name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Search Settings</h3></div>", "type" => "heading"), array( "name" => "Search Tagline", "desc" => "Add a suitable tagline above your frontpage search field.<br /><br />", "id" => $shortname."_searchtagline", "std" => "Try the powerful WPSN search:", "type" => "text"), array( "name" => "Search field text", "desc" => "Add some text to your search field.<br /><br />", "id" => $shortname."_searchline", "std" => "Search our site . . .", "type" => "text"), array( "name" => "Selected Search Text", "desc" => "Add some text above your selected search area.<br /><br />", "id" => $shortname."_searchestagline", "std" => "Selected WPSN searches:", "type" => "text"), array( "name" => "Search Term #1", "desc" => "Add a single-word search term here.<br /><br />", "id" => $shortname."_search1", "std" => "Rankings", "type" => "text"), array( "name" => "Search Term #2", "desc" => "Add a single-word search term here.<br /><br />", "id" => $shortname."_search2", "std" => "Fantasy", "type" => "text"), array( "name" => "Search Term #3", "desc" => "Add a single-word search term here.<br /><br />", "id" => $shortname."_search3", "std" => "Picks", "type" => "text"), array( "name" => "Search Term #4", "desc" => "Add a single-word search term here.<br /><br />", "id" => $shortname."_search4", "std" => "Injuries", "type" => "text"), array( "name" => "Search Term #5", "desc" => "Add a single-word search term here.<br /><br />", "id" => $shortname."_search5", "std" => "Projections", "type" => "text"), array( "name" => "Search Term #6", "desc" => "Add a single-word search term here.<br /><br />", "id" => $shortname."_search6", "std" => "Rookies", "type" => "text"), array( "name" => "Search Term #7", "desc" => "Add a single-word search term here.<br /><br />", "id" => $shortname."_search7", "std" => "Blogs", "type" => "text"), array( "name" => "Search Term #8", "desc" => "Add a single-word search term here.<br /><br /><br />", "id" => $shortname."_search8", "std" => "Superbowl", "type" => "text"), array( "name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Frontpage Static Links</h3></div>", "type" => "heading"), array( "name" => "Sub-Link #1", "desc" => "Give this link a suitable title.<br /><br />", "id" => $shortname."_lbox1txt", "std" => "Watch: Implications", "type" => "text"), array( "name" => "Sub-Link URL #1", "desc" => "Enter the link destination.<br /><br />", "id" => $shortname."_lbox1url", "std" => "#", "type" => "text"), array( "name" => "Sub-Link #2", "desc" => "Give this link a suitable title.<br /><br />", "id" => $shortname."_lbox2txt", "std" => "Zoom Gallery", "type" => "text"), array( "name" => "Sub-Link URL #2", "desc" => "Enter the link destination.<br /><br />", "id" => $shortname."_lbox2url", "std" => "#", "type" => "text"), array( "name" => "Sub-Link #3", "desc" => "Give this link a suitable title.<br /><br />", "id" => $shortname."_lbox3txt", "std" => "Giants 31 - 34 Redskins", "type" => "text"), array( "name" => "Sub-Link URL #3", "desc" => "Enter the link destination.<br /><br />", "id" => $shortname."_lbox3url", "std" => "#", "type" => "text"), array( "name" => "Sub-Link #4", "desc" => "Give this link a suitable title.<br /><br />", "id" => $shortname."_lbox4txt", "std" => "Leap of faith", "type" => "text"), array( "name" => "Sub-Link URL #4", "desc" => "Enter the link destination.<br /><br />", "id" => $shortname."_lbox4url", "std" => "#", "type" => "text"), array( "name" => "Sub-Link #5", "desc" => "Give this link a suitable title.<br /><br />", "id" => $shortname."_lbox5txt", "std" => "Bulls 99 - 102 Lakers", "type" => "text"), array( "name" => "Sub-Link URL #5", "desc" => "Enter the link destination.<br /><br />", "id" => $shortname."_lbox5url", "std" => "#", "type" => "text"), array( "name" => "Sub-Link #6", "desc" => "Give this link a suitable title.<br /><br />", "id" => $shortname."_lbox6txt", "std" => "NFL Europa LIVE!", "type" => "text"), array( "name" => "Sub-Link URL #6", "desc" => "Enter the link destination.<br /><br />", "id" => $shortname."_lbox6url", "std" => "#", "type" => "text"), array( "name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Selectable News Block</h3></div>", "type" => "heading"), array( "name" => "Item #1", "desc" => "Select the category this area will display news from.<br /><br />", "id" => $shortname."_fl1l", "std" => "Select a category:", "type" => "select", "options" => $stylewp_categories), array( "name" => "Item #2", "desc" => "Select the category this area will display news from.<br /><br />", "id" => $shortname."_fl2l", "std" => "Select a category:", "type" => "select", "options" => $stylewp_categories), array( "name" => "Item #3", "desc" => "Select the category this area will display news from.<br /><br />", "id" => $shortname."_fl3l", "std" => "Select a category:", "type" => "select", "options" => $stylewp_categories), array( "name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Latest News Links</h3></div>", "type" => "heading"), array( "name" => "Link #1", "desc" => "Give this link a suitable title.<br /><br />", "id" => $shortname."_newslink1", "std" => "Latest News", "type" => "text"), array( "name" => "Link #2", "desc" => "Give this link a suitable title.<br /><br />", "id" => $shortname."_newslink2", "std" => "Rumor Central", "type" => "text"), array( "name" => "Link #2 Destination", "desc" => "Paste the destination URL for this link.<br /><br />", "id" => $shortname."_newslink2url", "std" => "#", "type" => "text"), array( "name" => "Link #3", "desc" => "Give this link a suitable title.<br /><br />", "id" => $shortname."_newslink3", "std" => "On WPSN TV", "type" => "text"), array( "name" => "Link #3 Destination", "desc" => "Paste the destination URL for this link.<br /><br />", "id" => $shortname."_newslink3url", "std" => "#", "type" => "text"), array( "name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Promotional Settings</h3></div>", "type" => "heading"), array( "name" => "<h4 style=\"color:#cc0000;\">Block #1</h4></div>", "type" => "heading"), array( "name" => "Block Title", "desc" => "Give this block a title.<br /><br /><br />", "id" => $shortname."_ptitle", "std" => "Featured Promotional Block", "type" => "text"), array( "name" => "Left Title", "desc" => "Enter a header for this block.<br /><br />", "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.<br /><br />", "id" => $shortname."_p1img", "std" => "http://stylewp.com/assets/author_1.jpg", "type" => "text"), array( "name" => "Left Contents", "desc" => "Enter some relevant text here.<br /><br />", "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.<br /><br /><br />", "id" => $shortname."_p1url", "std" => "#", "type" => "text"), array( "name" => "Right Title", "desc" => "Enter a header for this block.<br /><br />", "id" => $shortname."_p2h1", "std" => "This is a suitable title for this block", "type" => "text"), array( "name" => "Right Image", "desc" => "Enter the URL to your chosen image.<br /><br />", "id" => $shortname."_p2img", "std" => "http://stylewp.com/assets/author_2.jpg", "type" => "text"), array( "name" => "Right Contents", "desc" => "Enter some relevant text here.<br /><br />", "id" => $shortname."_p2txt", "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.<br /><br /><br />", "id" => $shortname."_p2url", "std" => "#", "type" => "text"), array( "name" => "<h4 style=\"color:#cc0000;\">Block #2</h4></div>", "type" => "heading"), array( "name" => "Block Title", "desc" => "Give this block a title.<br /><br /><br />", "id" => $shortname."_pbtitle", "std" => "Another Promotional Block", "type" => "text"), array( "name" => "Destination", "desc" => "Enter the destination URL here.<br /><br />", "id" => $shortname."_pburl", "std" => "#", "type" => "text"), array( "name" => "Image", "desc" => "Enter your chosen image URL.<br /><br />", "id" => $shortname."_pbimg", "std" => "http://stylewp.com/assets/300_promo.jpg", "type" => "text"), array( "name" => "Alt Text", "desc" => "Enter some relevant text which is used as the image alt.<br /><br /><br />", "id" => $shortname."_pbalt", "std" => "This is a promotional block", "type" => "text"), array( "name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Inner Pages Control</h3></div>", "type" => "heading"), array( "name" => "Author Sub-Text", "desc" => "Edit the line of text underneath each authors name.<br /><br />", "id" => $shortname."_authorsub", "std" => "for WPSN.com", "type" => "text"), array( "name" => "Published", "desc" => "Edit the published date text.<br /><br />", "id" => $shortname."_publishedon", "std" => "Published:", "type" => "text"), array( "name" => "Show Tags?", "desc" => "Check to show tags under each news item<br /><br />", "id" => $shortname."_showtags", "std" => "true", "type" => "checkbox"), array( "name" => "Show Gravatars?", "desc" => "Check to activate <a href=\"http://gravatar.com\">Gravatar</a> support for your comments<br /><br />", "id" => $shortname."_showava", "std" => "true", "type" => "checkbox"), array( "name" => "Related Items", "desc" => "Edit the Related Items header text.<br /><br />", "id" => $shortname."_siderelated", "std" => "Related News Headlines", "type" => "text"), array( "name" => "Latest Items", "desc" => "Edit the Latest Items header text.<br /><br />", "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" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Advertisement Settings</h3></div>", "type" => "heading"), array( "name" => "Spot #1", "desc" => "Paste your <b>728x90</b> ad code above.<br /><br />", "id" => $shortname."_banner1", "std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner1.gif\" /></a>", "type" => "textarea"), array( "name" => "Spot #2", "desc" => "Paste your <b>336x280</b> ad code above.<br /><br />", "id" => $shortname."_banner2", "std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner2.gif\" border=\"0\" /></a>", "type" => "textarea"), array( "name" => "Spot #3", "desc" => "Paste your <b>300x50</b> ad code above.<br /><br />", "id" => $shortname."_banner3", "std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner3.gif\" border=\"0\" /></a>", "type" => "textarea"), array( "name" => "Spot #4", "desc" => "Paste your <b>300x250</b> ad code above.<br /><br />", "id" => $shortname."_banner4", "std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner4.gif\" border=\"0\" /></a>", "type" => "textarea"), array( "name" => "Spot #5 Title", "desc" => "Edit the title text above this ad spot.<br /><br />", "id" => $shortname."_sponsoredby", "std" => "WPSN Recommended Sponsors", "type" => "text"), array( "name" => "Spot #5", "desc" => "Paste your <b>250x250</b> ad code above.<br /><br />", "id" => $shortname."_banner5", "std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner5.gif\" border=\"0\" /></a>", "type" => "textarea"), array( "name" => "Show Spot #6?", "desc" => "Check to activate this banner spot<br /><br />", "id" => $shortname."_show6", "std" => "true", "type" => "checkbox"), array( "name" => "Spot #6", "desc" => "Paste your <b>234x150</b> ad code above.<br /><br />", "id" => $shortname."_banner6", "std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner6.gif\" border=\"0\" alt=\"banner 6\" /></a>", "type" => "textarea"), array( "name" => "Show Spot #7?", "desc" => "Check to activate this banner spot<br /><br />", "id" => $shortname."_show7", "std" => "true", "type" => "checkbox"), array( "name" => "Spot #7", "desc" => "Paste your <b>234x150</b> ad code above.<br /><br />", "id" => $shortname."_banner7", "std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner7.gif\" border=\"0\" alt=\"banner 7\" /></a>", "type" => "textarea"), array( "name" => "Show Spot #8?", "desc" => "Check to activate this banner spot<br /><br />", "id" => $shortname."_show8", "std" => "true", "type" => "checkbox"), array( "name" => "Spot #8", "desc" => "Paste your <b>234x150</b> ad code above.<br /><br />", "id" => $shortname."_banner8", "std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner8.gif\" border=\"0\" alt=\"banner 8\" /></a>", "type" => "textarea"), array( "name" => "Show Spot #9?", "desc" => "Check to activate this banner spot<br /><br />", "id" => $shortname."_show9", "std" => "true", "type" => "checkbox"), array( "name" => "Spot #9", "desc" => "Paste your <b>234x150</b> ad code above.<br /><br />", "id" => $shortname."_banner9", "std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner9.gif\" border=\"0\" alt=\"banner 9\" /></a>", "type" => "textarea"), array( "name" => "Show Spot #10?", "desc" => "Check to activate this banner spot<br /><br />", "id" => $shortname."_show10", "std" => "true", "type" => "checkbox"), array( "name" => "Spot #10", "desc" => "Paste your <b>234x150</b> ad code above.<br /><br />", "id" => $shortname."_banner10", "std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner10.gif\" border=\"0\" alt=\"banner 10\" /></a>", "type" => "textarea"), array( "name" => "Show Spot #11?", "desc" => "Check to activate this banner spot<br /><br />", "id" => $shortname."_show11", "std" => "true", "type" => "checkbox"), array( "name" => "Spot #11 Title", "desc" => "Edit the title text above this ad spot.<br /><br />", "id" => $shortname."_sptext", "std" => "Sponsored Links", "type" => "text"), array( "name" => "Spot #11", "desc" => "Paste your <b>336x280</b> ad code above.<br /><br />", "id" => $shortname."_banner11", "std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner11.gif\" border=\"0\" alt=\"banner 11\" /></a>", "type" => "textarea"), array( "name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Featured Video Settings</h3></div>", "type" => "heading"), array( "name" => "Show Video?", "desc" => "Check to activate the featured video spot on<br />the frontpage.<br /><br />", "id" => $shortname."_showvideo", "std" => "true", "type" => "checkbox"), array( "name" => "Embed Code", "desc" => "Paste your chosen video embed code here.<br />(Be sure to resize the video to 234x200)<br /><br /><br />", "id" => $shortname."_featuredvideo", "std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_featuredvideo.gif\" border=\"0\" /></a>", "type" => "textarea"), array( "name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Copyright Settings</h3></div>", "type" => "heading"), array( "name" => "Years", "desc" => "Enter the years of copyright<br /><br />", "id" => $shortname."_copyyear", "std" => "1997 - 2009", "type" => "text"), array( "name" => "URL", "desc" => "Enter the full URL to copyright holders site<br /><br />", "id" => $shortname."_copyurl", "std" => "http://www.google.com", "type" => "text"), array( "name" => "Name", "desc" => "Enter the copyright holders company name<br /><br />", "id" => $shortname."_copyco", "std" => "Your Great Company, LLC", "type" => "text"), array( "name" => "Rights", "desc" => "Enter the rights reserved text<br /><br />", "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 '<div id="message" class="updated fade"><p><strong>'.$themename.' settings saved.</strong></p></div>'; if ( $_REQUEST['reset'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings reset.</strong></p></div>'; ?> <div class="wrap"> <h2><?php echo $themename; ?> options</h2> <form method="post"> <table class="optiontable"> <?php foreach ($options as $value) { switch ( $value['type'] ) { case 'text': option_wrapper_header($value); ?> <input style="width:400px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ( get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /> <?php option_wrapper_footer($value); break; case 'select': option_wrapper_header($value); ?> <select style="width:240px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>"> <?php foreach ($value['options'] as $option) { ?> <option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option> <?php } ?> </select> <?php option_wrapper_footer($value); break; case 'textarea': $ta_options = $value['options']; option_wrapper_header($value); ?> <textarea name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" style="width:400px;height:100px;"><?php if( get_settings($value['id']) != "") { echo stripslashes(get_settings($value['id'])); }else{ echo $value['std']; }?> exact error: Parse error: syntax error, unexpected $end in /home/marksweb/public_html/wordpress/wp-content/themes/wpsn/functions.php on line 854 that line being the last line of the file |
11-04-2010, 20:50 | #2 |
Screaming Orgasm
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
|
What I do with this sort of error is comment out a big chunk of the code (enough to make the error go away), and then start un-commenting. You'll soon find the problem.
|
12-04-2010, 08:49 | #3 |
Vodka Martini
Join Date: Sep 2008
Location: Beverley
Posts: 749
|
Yeah. Or the other way I used to code debug was to output a new number every couple of lines to see where it's getting to.
Last edited by Aboobie; 12-04-2010 at 09:20. |
11-04-2010, 21:14 | #4 |
Absinthe
Join Date: Jan 2007
Location: Chester
Posts: 2,345
|
yeah I've been trying that, but as of yet I've not managed to figure it out.
Anybody else ever had experience with these encrypted files? the encryption syntax is; Code:
<?php $_F=__FILE__;$_X='encrypted text';eval(base64_decode('rubbish'));?> |
12-04-2010, 00:21 | #5 |
Dubious
Join Date: Sep 2008
Location: Northampton
Posts: 1,571
|
<h3 style=\"color:#1c1c1c;\">
that bit?
__________________
Look at your signature, now back to mine, now back to yours, now back to mine.
Sadly, yours isn't mine. But if you stopped writing about other things and made this your signature, yours could be like mine. Look down, back up. Where are you? You're on Boat Drinks, reading the signature your signature could be like. I'm on a computer. |
12-04-2010, 01:24 | #6 |
Absinthe
Join Date: Jan 2007
Location: Chester
Posts: 2,345
|
I thought so but that turned into a t_string error
Code:
Parse error: syntax error, unexpected T_STRING, expecting ')' in /home/marksweb/public_html/wordpress/wp-content/themes/wpsn/functions.php on line 22 *edit* It appears that there is simply just a load of code missing after the decryption oh well. will have to try and sort it. Last edited by Joe 90; 12-04-2010 at 02:11. |
12-04-2010, 08:44 | #7 |
Vodka Martini
Join Date: Sep 2008
Location: Beverley
Posts: 749
|
Sorry; not had chance to have a thorough look but a html escape character problem?
<#39;> for ' and <#34;> for " |
12-04-2010, 08:58 | #8 |
Screaming Orgasm
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
|
Oh yes, I do that a fair bit too. Commenting is more useful for compilation errors or where there are few clues, numbering is more useful when you have some idea where the problem might be and can at least run the thing.
|