• Hi,

    I am getting this error but I don’t see where the issue is.

    Can you?

    <?php
    /**
    * @Start notification helper class
    * @return
    */
    
    if( !class_exists( 'CS_Notification_Helper' ) ) {
    	class CS_Notification_Helper{
    
    		public $message;
    
    		public function __construct() {
    			// Do Something here..
    		}
    
    		public function success( $message = 'No recored found' ) {
    			global $post;
    
    			$output	 = '';
    			$output	.= '<div class="col-md-12 cs-succ_mess"><p>';
    			$output	.= $message;
    			$output	.= '</p></div>';
    
    			echo force_balance_tags ( $output );
    		}
    
    		public function error( $message='No recored found' ) {
    			global $post;
    
    		   $output	 = '';
    		   $output	.= '<div class="col-md-12 cs-error"><p>';
    		   $output	.= $message;
    		   $output	.= '</p></div>';
    
    		   echo force_balance_tags ( $output ); 	
    
    		}
    
    		public function warning( $message='No recored found' ) {
    		  global $post;	
    
    		  $output	 = '';
    		  $output	.= '<div class="col-md-12 cs-warning"><p>';
    		  $output	.= $message;
    		  $output	.= '</p></div>';
    
    		 echo force_balance_tags ( $output );
    		}
    
    		public function informations($message='No recored found') {
    		  global $post;
    
    		  $output	 = '';
    		  $output	.= '<div class="col-md-12 cs-informations"><p>';
    		  $output	.= $message;
    		  $output	.= '</p></div>';
    
    		 echo force_balance_tags ( $output ); 
    
    		}
    	}
    }
    
    $cs_notification = new CS_Notification_Helper();
    global $cs_notification;
    ?>

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Is there no space between “if” and “(“? Try adding one.

    There’s nothing in that code that’s wrong. I’d guess that it’s going to have more to do with how you’re including that file in the site. What are you uisng to call that file? Something like include(), or require()?

    Thread Starter mrwrongusername

    (@mrwrongusername)

    I really don’t know because this is all new for me.
    I will have to contact theme support for this issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Parse error: syntax error, unexpected 'if' (T_IF)’ is closed to new replies.