Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

Paste Description for parse error

this is the error: Parse error: syntax error, unexpected T_STRING in /kunden/207600_79115/webseiten/freiburgstimmtein/wp-content/themes/summ/functions.php on line 1

I#M not good in php bus it this poosible?
Any solutions?
Thx Matt

parse error
Wednesday, May 16th, 2012 at 5:02:58am MDT 

  1. <?php
  2. /**
  3. * @package WordPress
  4. * @subpackage Summ
  5. */
  6.  add_theme_support( 'automatic-feed-links' );
  7.  
  8.  if ( ! isset( $content_width ) ) $content_width = 900;
  9.         /** -----------------------------------------------
  10.                  * custom background
  11.         */
  12.  add_custom_background();
  13.         define('HEADER_TEXTCOLOR', '111111');
  14.         define('HEADER_IMAGE', '%s/images/default_header.jpg'); // %s is the template dir uri
  15.         define('HEADER_IMAGE_WIDTH', 1000); // use width and height appropriate for your theme
  16.         define('HEADER_IMAGE_HEIGHT', 138);
  17.         /** -----------------------------------------------
  18.                  * LOCALIZATION
  19.         */
  20. load_theme_textdomain('Summ', get_template_directory() . '/languages');
  21.         /** -----------------------------------------------
  22.                  * gets included in the site header
  23.         */
  24. function header_style() {
  25.     ?><style type="text/css">
  26.         #header {
  27.             background: url(<?php header_image(); ?>);
  28.         }
  29.                 .siteName a,.description{color:#<?php header_textcolor() ?>}
  30.     </style><?php
  31. }
  32.         /** -----------------------------------------------
  33.                  * gets included in the admin header
  34.         */
  35. function admin_header_style() {
  36.     ?><style type="text/css">
  37.         #headimg {
  38.             width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
  39.             height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
  40.         }
  41.     </style><?php
  42. }
  43. add_custom_image_header('header_style', 'admin_header_style');
  44.     register_sidebar( array(
  45.                 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
  46.                 'after_widget' => '</li>',
  47.                 'before_title' => '<span class="widget-title">',
  48.                 'after_title' => '</span>',
  49.         ));
  50.         /** -----------------------------------------------
  51.                  * Theme uses wp_nav_menu() in one location. Chack if function exist
  52.         */
  53. if( function_exists('register_nav_menus') )
  54. register_nav_menus( array(
  55.                 'primary' => __( 'Primary Navigation', 'Summ' ),
  56. ) );
  57.  
  58.     /**
  59.      * Return older post
  60.      *
  61.      * @return mixed If not NULL
  62.      */
  63. function older_post_exists()
  64.     {
  65.         static $older;
  66.         if (empty($older)) {
  67.             if (is_attachment()) {
  68.                 global $post;
  69.                 $older = &get_post($post -> post_parent);
  70.             } else {
  71.                 $older = &get_previous_post();
  72.             }
  73.         }
  74.         return $older;
  75.     }
  76.     /**
  77.      * Return newer post
  78.      *
  79.      * @return mixed If not NULL
  80.      */
  81. function newer_post_exists()
  82.     {
  83.         static $newer;
  84.         if (empty($newer)) $newer = &get_next_post();
  85.         return $newer;
  86.     }
  87.  
  88.         /** -----------------------------------------------
  89.          * custom comments
  90.         */
  91. function custom_comments($comment, $args, $depth) {
  92. $GLOBALS['comment'] = $comment;
  93. ?>
  94. <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
  95.         <div id="comment-<?php comment_ID(); ?>">
  96. <span class="avatarx"><?php echo get_avatar($comment,$size='40',$default='<path_to_url>' ); ?></span>
  97. <div class="message_head">
  98. <span class="name"><?php comment_author_link() ?></span>
  99. <span class="reply"><?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?></span>
  100. <br/>
  101. <span class="date"><?php printf( __( '%1$s at %2$s', 'Summ' ), get_comment_date(),  get_comment_time() ); ?></span>
  102. <div class="cmt_text"><?php comment_text(); ?></div>
  103.         </div>
  104. </div> 
  105. <?php }
  106.  
  107.  
  108.  
  109. // Theme Options
  110. function Summ_theme_options(){
  111.         $items = array (
  112.                 array(
  113.                         'id' => 'logo_src',
  114.                         'name' => __('Logo image', 'Summ'),
  115.                         'desc' => __('Put your logo image address here (max size: 280px*100px). If empty, display blog title with text.', 'Summ')
  116.                 ),
  117.                 array(
  118.                         'id' => 'rss_url',
  119.                         'name' => __('RSS URL', 'Summ'),
  120.                         'desc' => __('Put your full rss subscribe address here.(with http://). If empty, auto-set system defaults.', 'Summ')
  121.                 ),
  122.                 array(
  123.                         'id' => 'excerpt_check',
  124.                         'name' => __('Excerpt?', 'Summ'),
  125.                         'desc' => __('If the home page and archive pages to display excerpt of post, check.', 'Summ')
  126.                 ),
  127.                 array(
  128.                         'id' => 'desc',
  129.                         'name' => __('Disable the site description','Summ'),
  130.                         'desc' => __('Disabling this will remove the site description.', 'Summ')
  131.                 )
  132.         );
  133.         return $items;
  134. }
  135.  
  136. add_action( 'admin_init', 'Summ_theme_options_init' );
  137. add_action( 'admin_menu', 'Summ_theme_options_add_page' );
  138. function Summ_theme_options_init(){
  139.         register_setting( 'Summ_options', 'Summ_theme_options', 'Summ_options_validate' );
  140. }
  141. function Summ_theme_options_add_page() {
  142.         add_theme_page( __( 'Theme Options' , 'Summ'), __( 'Theme Options' , 'Summ'), 'edit_theme_options', 'theme_options', 'Summ_theme_options_do_page' );
  143. }
  144.  
  145. function Summ_default_options() {
  146.         $options = get_option( 'Summ_theme_options' );
  147.         foreach ( Summ_theme_options() as $item ) {
  148.                 if ( ! isset( $options[$item['id']] ) ) {
  149.                         $options[$item['id']] = '';
  150.                 }
  151.         }
  152.         update_option( 'Summ_theme_options', $options );
  153. }
  154. add_action( 'init', 'Summ_default_options' );
  155.  
  156. function Summ_theme_options_do_page() {
  157.         if ( ! isset( $_REQUEST['updated'] ) )
  158.                 $_REQUEST['updated'] = false;
  159. ?>
  160.         <div class="wrap">
  161.                 <?php screen_icon(); echo "<h2>" . sprintf( __( '%1$s Theme Options', 'Summ' ), get_current_theme() )    . "</h2>"; ?>
  162.                 <?php if ( false !== $_REQUEST['updated'] ) : ?>
  163.                 <div class="updated fade"><p><strong><?php _e( 'Options saved', 'Summ' ); ?></strong></p></div>
  164.                 <?php endif; ?>
  165.                 <form method="post" action="options.php">
  166.                         <?php settings_fields( 'Summ_options' ); ?>
  167.                         <?php $options = get_option( 'Summ_theme_options' ); ?>
  168.                         <table class="form-table">
  169.                         <?php foreach (Summ_theme_options() as $item) { ?>
  170.                                 <?php if ($item['id'] == 'rss_url' || $item['id'] == 'logo_src') { ?>
  171.                                 <tr valign="top" style="margin:0 10px;">
  172.                                         <th scope="row"><?php echo $item['name']; ?></th>
  173.                                         <td>
  174.                                                 <input name="<?php echo 'Summ_theme_options['.$item['id'].']'; ?>" type="text" value="<?php if ( $options[$item['id']] != "") { echo $options[$item['id']]; } else { echo ''; } ?>" size="80" />
  175.                                                 <br/>
  176.                                                 <label class="description" for="<?php echo 'Summ_theme_options['.$item['id'].']'; ?>"><?php echo $item['desc']; ?></label>
  177.                                         </td>
  178.                                 </tr>
  179.                                 <?php } else { ?>
  180.                                 <tr valign="top" style="margin:0 10px;">
  181.                                         <th scope="row"><?php echo $item['name']; ?></th>
  182.                                         <td>
  183.                                                 <input name="<?php echo 'Summ_theme_options['.$item['id'].']'; ?>" type="checkbox" value="true" <?php if ( $options[$item['id']] ) { $checked = "checked=\"checked\""; } else { $checked = ""; } echo $checked; ?> />
  184.                                                 <label class="description" for="<?php echo 'Summ_theme_options['.$item['id'].']'; ?>"><?php echo $item['desc']; ?></label>
  185.                                         </td>
  186.                                 </tr>
  187.                                 <?php } ?>
  188.                         <?php } ?>
  189.                         </table>
  190.                         <p class="submit">
  191.                                 <input type="submit" class="button-primary" value="<?php _e( 'Save Options', 'Summ' ); ?>" />
  192.                         </p>
  193.                 </form>
  194.         </div>
  195. <?php
  196. }
  197. function Summ_options_validate($input) {
  198.         foreach ( Summ_theme_options() as $item ) {
  199.                 $input[$item['id']] = wp_filter_nohtml_kses($input[$item['id']]);
  200.         }
  201.         return $input;
  202. }

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

worth-right
fantasy-obligation