330 posts
  • Author Level 6
  • Collector Level 1
  • 3 Years of Membership
  • Exclusive Author
PersianArt
says
hi, I need list of all the Alias Names and created slider and needed code is this?
$slider = new RevSlider();
$arrSliders = $slider->getArrSliders();

but I have this error “Catchable fatal error: Object of class RevSlider could not be converted to string in …”

rev author said “you must doing something wrong, or you are doing it before the revolutio slider files are included”

I did not understand what I must do. have you any suggestion

thanks

330 posts
  • Author Level 6
  • Collector Level 1
  • 3 Years of Membership
  • Exclusive Author
PersianArt
says

no any suggestion?

1368 posts
  • Weekly Top Seller
  • 5 Years of Membership
  • Author Level 6
  • Beta Tester
+5 more
Smartik
says
Yes I know, the author told me the same and is not working. Here is how I did:
function all_rev_sliders_in_array(){
    if (class_exists('RevSlider')) {
        $theslider     = new RevSlider();
        $arrSliders = $theslider->getArrSliders();
        $arrA     = array();
        $arrT     = array();
        foreach($arrSliders as $slider){
            $arrA[]     = $slider->getAlias();
            $arrT[]     = $slider->getTitle();
        }
        if($arrA && $arrT){
            $result = array_combine($arrA, $arrT);
        }
        else
        {
            $result = false;
        }
        return $result;
    }
}

all_rev_sliders_in_array() will return and array alias=>Title

330 posts
  • Author Level 6
  • Collector Level 1
  • 3 Years of Membership
  • Exclusive Author
PersianArt
says

Yes I know, the author told me the same and is not working. Here is how I did:
function all_rev_sliders_in_array(){
    if (class_exists('RevSlider')) {
        $theslider     = new RevSlider();
        $arrSliders = $theslider->getArrSliders();
        $arrA     = array();
        $arrT     = array();
        foreach($arrSliders as $slider){
            $arrA[]     = $slider->getAlias();
            $arrT[]     = $slider->getTitle();
        }
        if($arrA && $arrT){
            $result = array_combine($arrA, $arrT);
        }
        else
        {
            $result = false;
        }
        return $result;
    }
}

all_rev_sliders_in_array() will return and array alias=>Title

thank you so much, it works correctly :)

by
by
by
by
by
by