WordPress.org

Ready to get started?Download WordPress

Forums

WP Vegas
[resolved] Settings doesn't save (13 posts)

  1. Cicero83
    Member
    Posted 1 year ago #

    Hello,

    Everything works perfect, I only have one problem.
    When I type in the Settings of Vegas Slides and I want to Save these settings. The fields returning empty.

    I made a Child-theme, could this be te problem?

    Cheers.

    http://wordpress.org/extend/plugins/vegas-fullscreen-background-slider/

  2. jamesdbruner
    Member
    Plugin Author

    Posted 1 year ago #

    What versions of the plugin and also what version of php are you running?

  3. Cicero83
    Member
    Posted 1 year ago #

    I'm running version 1.3 of the plugin on WP 3.5.1
    And PHP Version 5.3.22

    Hope you can help.

  4. jamesdbruner
    Member
    Plugin Author

    Posted 1 year ago #

    This one is still baffling me. Sorry for the slow reply, I've been crazy busy. Can you give me a link to your site?

  5. jamesdbruner
    Member
    Plugin Author

    Posted 1 year ago #

    Question for you... Is it giving you a "Cheatin uh?" error when you try to save or just refreshes the page and all the settings are empty?

  6. pepe42
    Member
    Posted 1 year ago #

    I have the same Issue...

    I´m running the version 1.3 of the plugin on WP 3.5.1 and PHP Version 5.3.1.

    I don´t get any error when saving..

  7. jamesdbruner
    Member
    Plugin Author

    Posted 1 year ago #

    Okay, see I'm new to the Settings API so it's probably something I did wrong. I'll look into it... Until then, the settings aren't necessary to use the plugin. You can use the shortcode and if you need it on every page you can do that to with do_shortcode.

  8. Cicero83
    Member
    Posted 1 year ago #

    I followed your advice, but it's makes it a lot easier for our customer that the settings can be saved :)
    I hope you can find a solution, but take your time. You created a nice plugin though!

  9. aaron.fitzell
    Member
    Posted 1 year ago #

    your checking process is a bit different me and a mate have hacked around the coding to make it work .... quite simple but my advice to you is to go back to basics and check your _keys ... particularly lines 82-86 in index.php and then the functions in options any of the check_ functions need a revamp for a quick hack around to those that want to use it now (although you can just modify the shortcode yourself) you can use this code (changing it for each function thats already there)where id is replace them with the name of function at present.... ie fade delay overlay etc etc ....

    if(get_option('id_key') === false){
    		add_option('id_key',  $input['ID']);
    	    }
    	return $input['ID'];

    good luck !

  10. jamesdbruner
    Member
    Plugin Author

    Posted 1 year ago #

    So you're saying instead of

    $fade = get_option('fade');

    I should use

    if(get_option('fade') === false){
        $fade = get_option('fade');
    }
        return $input['Fade'];

    Correct?

  11. jamesdbruner
    Member
    Plugin Author

    Posted 1 year ago #

    One more question... How would you go about doing the checkboxes? Or am I overthinking it..

    $arrows = get_option('arrows');
      if($arrows == 0){
       $arrows = 'no';
      }
      if($arrows == 1){
       $arrows = 'yes';
      }

    Should be

    if(get_option('arrows') === false){
    $arrows = get_option('arrows');
      if($arrows == 0){
       $arrows = 'no';
      }
      if($arrows == 1){
       $arrows = 'yes';
      }
    }
    return $input['Arrows'];

    Is that right..?

  12. aaron.fitzell
    Member
    Posted 1 year ago #

    no the check boxes work fine. just the inputs that a text boxes werent getting passed properly .
    I'll post the code we did below :)
    Index.php Lines 83 to 87

    $fade = get_option('fade_key');
    $delay = get_option('delay_key');
    $title = get_option('title_key');
    $overlay = get_option('overlay_key');
    $arrows = get_option('arrows');

    Options.php lines 107 to 194

    <?php
        }
    
        public function check_fade($input){
    
            if(get_option('fade_key') === false){
    		add_option('fade_key',  $input['Fade']);
    	    }
    	return $input['Fade'];
        }
    
      public function check_delay($input){
    
         if(get_option('delay_key') === false){
    		add_option('delay_key',  $input['Delay']);
    	    }
    	return $input['Delay'];	  }
    
    public function check_overlay($input){ 
    
     if(get_option('overlay_key') === false){
    		add_option('overlay_key',  $input['Overlay']);
    	    }
    	return $input['Overlay'];	 }
    
      public function check_title($input){ 
    
    	    if(get_option('title_key') === false){
    		add_option('title_key',  $input['Title']);
    	    }
    	return $input['Title'];
    	  }
    
       public function check_arrows($input){
    
       if( isset($input['Arrows'])){$Arrows = $input['Arrows']; 	}
    
       if ( !isset( $Arrows['arrows'] ) ) {
         $Arrows = 0;
         add_option('arrows', $Arrows);
       } 
    
        if ( $input['Arrows'] == 1 ) {
            $Arrows = 1;
          update_option('arrows', $Arrows);
        } else {
            $Arrows = 0;
          update_option('arrows', $Arrows);
        }
       return $Arrows;
    }
    
       public function check_autoplay($input){
    
        if( isset($input['Autoplay'])){$Autoplay = $input['Autoplay']; 	}
    
        if ( $input['Autoplay'] == 1 ) {
            $Autoplay = 1;
          update_option('autoplay', $Autoplay);
        } else {
            $Autoplay = 0;
          update_option('autoplay', $Autoplay);
        }
       return $Autoplay;
    }
    
       public function check_global($input){
    
        if( isset($input['Global'])){$Global = $input['Global']; 	}
    
        if ( $input['Global'] == 1 ) {
            $Global = 1;
          update_option('global', $Global);
        } else {
            $Global = 0;
          update_option('global', $Global);
        }
       return $Global;
    }
    
        public function check_id($input){
    
         if(get_option('id_key') === false){
    		add_option('id_key',  $input['ID']);
    	    }
    	return $input['ID'];
        }

    This is a temporary work around that will work, i'll try and find out a way for you to check the strings before theyre submitted (probably a isnumeric()tag for the numbers) the overlay url doesnt need to be checked because if it isnt correct it wont work anyway

  13. jamesdbruner
    Member
    Plugin Author

    Posted 10 months ago #

    If anyone's still having trouble saving settings after updating to version 1.4 would you let me know by creating a new topic. I'm marking this one as resolved since it's a couple months old and since I've addressed the issue in version 1.4 so you should only need to update to resolve the issue.

    Thanks, James

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags