AntonShevchuk / wp-constructor

Wordpress Constructor Theme for those who want to create a unique blog design quickly and effortlessly
https://wordpress.org/themes/constructor/
0 stars 0 forks source link

Slideshow on front page #126

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It's not a bug, it's a feature:
1. Wanted to have a slideshow on the front page, no matter that is home, a 
page, a single article
2. Not "clickable" within constructor

What version of the ... are you using?
1. Wordpress: 3.0.3
2. Constructor:

this code should do the trick for a front page, which is a static page:

    /**
     * get_constructor_slideshow
     *
     * @access  public
     * @param   boolean  $in In or Out of content container
     * @return  rettype  return
     */
    function getSlideshow($in = false)
    {
        if (!$this->_options['slideshow']['flag']) {
            return false;
        }

// NEXT LINE CHANGED
        if (is_page() && !is_front_page() && !$this->_options['slideshow']['onpage'])    return false;
        if (is_single() && !$this->_options['slideshow']['onsingle'])  return false;
        if (is_archive()&& !$this->_options['slideshow']['onarchive']) return false;

        if ( $in && $this->_options['slideshow']['layout'] == 'over') return false;
        if (!$in && $this->_options['slideshow']['layout'] == 'in')   return false;

        $size = $this->getSlideshowSize();

        echo '<div id="slideshow" style="height:'.$size['height'].'px;width:'.$size['width'].'px">';

        // switch statement for true
        switch (true) {
            case (isset($this->_options['slideshow']['id']) && $this->_options['slideshow']['id']!='' && function_exists('nggShowSlideshow')):
                echo nggShowSlideshow((int)$this->_options['slideshow']['id'], $size['width'], $size['height']);
                break;

            default:
                $this->getDefaultSlideshow($size['width'], $size['height']);
                break;
        }        

        echo '</div>';
    }

Original issue reported on code.google.com by dmschm...@gmail.com on 12 Dec 2010 at 6:18

GoogleCodeExporter commented 9 years ago

Original comment by AntonShe...@gmail.com on 14 Dec 2010 at 7:40