Webcreations907 / WBC-Importer-extension

One click demo content importer extension for Reduxframework
GNU General Public License v2.0
66 stars 38 forks source link

Unable to import revolution slider #59

Open naumanahmed19 opened 8 years ago

naumanahmed19 commented 8 years ago

I have added zip in demo1 folder home-slider.zip but its not importing slider.

one more thing after data imported it removes demo1 folder. Any way to stop this?

Webcreations907 commented 8 years ago

Hello, Did you set up the function for importing sliders from the example-functions.php file?

After importing, it shouldn't delete or remove anything your folder should stay there.

zafarullahjoiya commented 7 years ago

Hi naumanahmed19,

Your issue has been resolved or not? Actually i am facing same issue with my theme.

Webcreations907 commented 7 years ago

@zafarullahjoiya is your demo folder being deleted as well? Or you just having issues with the importing of the slider?

zafarullahjoiya commented 7 years ago

@Webcreations907 Thank you for response really appreciate.

My issue is resolved ... i just replace the directory name like

          //If it's demo3 or demo5
        $wbc_sliders_array = array(
            'demo3' => 'someslidername.zip', //Set slider zip name
            'demo5' => 'anotherslider.zip', //Set slider zip name
        );

demo3 , demo5 to Main. ( main name is for root folder in which i have demo1 folder with content Eg: xml file, slider.zip etc ) This time i have just one demo. will it work for if i create another demo? because i can see in example-function.php we have array key with demo1,demo2

Thank you so much

Webcreations907 commented 7 years ago

@zafarullahjoiya The keys demo3,demo5,etc are the demo folder names, so you'd just change/add those to whatever your demo folders are named.

If you had demo folders named barber, salon, creative, etc then would be like below.

$wbc_sliders_array = array(
            'barber' => 'someslidername.zip', //Set slider zip name
            'salon' => 'anotherslider.zip', //Set slider zip name
                        'creative' => 'anotherslider.zip', //Set slider zip name
        );
zafarullahjoiya commented 7 years ago

Thanks i really appreciate that your value able feedback...

On Fri, Feb 17, 2017 at 10:19 AM, Webcreations907 notifications@github.com wrote:

@zafarullahjoiya https://github.com/zafarullahjoiya The keys demo3,demo5,etc are the demo folder names, so you'd just change/add those to whatever your demo folders are named.

If you had demo folders named barber, salon, creative, etc then would be like below.

$wbc_sliders_array = array( 'barber' => 'someslidername.zip', //Set slider zip name 'salon' => 'anotherslider.zip', //Set slider zip name 'creative' => 'anotherslider.zip', //Set slider zip name );

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Webcreations907/WBC-Importer-extension/issues/59#issuecomment-280726511, or mute the thread https://github.com/notifications/unsubscribe-auth/AKVNcsoeNYgenfzwK6S86oaM1nZUw8mBks5rdeSogaJpZM4HaLZD .

-- Web Developer

ashawkat commented 7 years ago

@zafarullahjoiya @Webcreations907 I would like to know where did you put the example function code in your theme or plugin. I'm trying to add this within my redux config file where the theme options are set which doesn't seems to work. After that I tried to put the code in functions.php which also is not working. I'm really in need to work this done. Can you help me?

zafarullahjoiya commented 7 years ago

@ashawkat you can put your code functions.php under this 'wbc_importer_after_content_import' hook.

$demo_sliders_array = array( 'roofer' => 'rs-roofer.zip', 'fitness' => 'rs-fitness.zip', );

  if ( isset( $demo_active_import[$current_key]['directory'] ) && !empty( $demo_active_import[$current_key]['directory'] ) && array_key_exists( $demo_active_import[$current_key]['directory'], $demo_sliders_array ) ) {
    $nmoye_slider_import = $demo_sliders_array[$demo_active_import[$current_key]['directory']];
    if ( file_exists( $demo_directory_path.$nmoye_slider_import ) ) {
      $slider = new RevSlider();
      $slider->importSliderFromPost( true, true, $demo_directory_path.$nmoye_slider_import );
    }
  }

This code is working for me.

ashawkat commented 7 years ago

@zafarullahjoiya I've tried to use the below code at my functions.php file. But it's not working for me. I've changed the function name though but it should work. Please take a look at the gist. https://gist.github.com/tishasub/0fe1dd18b70899432450a01e6691e11d If there's something I'm missing or doing wrong?