Hello,
I added another picture slideshow by following the instructions of Ujval Shah, the 4th image actually appears on the site, but in the back office does not show the description to put the image 4, tried to solve cleaning the cache on my website and my explorer but still the same problema.

Any help or advice appreciated.

Thanks,

Jéssica

Comments

saurabh.dhariwal’s picture

For adding 4th slide's description in slider, you require to change in theme.settings.php (sites/all/theme/bluez/theme.settings.php).

Find below code

$form['bluez_settings']['slideshow']['slide3']['slide3_desc'] = array(
    '#type' => 'textfield',
    '#title' => t('Slide Description'),
    '#default_value' => theme_get_setting('slide3_desc', 'bluez'),
  );

And add the below code after the above code.

'#type' => 'fieldset',
    '#title' => t('Slide 4'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['bluez_settings']['slideshow']['slide4']['slide4_title'] = array(
    '#type' => 'textfield',
    '#title' => t('Slide Title'),
    '#default_value' => theme_get_setting('slide4_title', 'bluez'),
  );
  $form['bluez_settings']['slideshow']['slide4']['slide4_desc'] = array(
    '#type' => 'textfield',
    '#title' => t('Slide Description'),
    '#default_value' => theme_get_setting('slide4_desc', 'bluez'),
  );

This would lead towards setting up your 4th slide's description which is available at admin/appearance/settings/bluez and related changes in template.php and page--front.tpl.php.

Hope this helps you.

Thanks!

Ujval Shah’s picture

Following Files need to update:

  1. bluez/template.php
  2. bluez/theme-settings.php
  3. bluez/templates/page--front.tpl.php

1. template.php

add below code after line number : 69

$vars['slide4_title'] = theme_get_setting('slide4_title', 'bluez');

add below code after line number : 73

$vars['slide4_desc'] = theme_get_setting('slide4_desc', 'bluez');

add below code after line number : 85
$vars['img4'] = base_path() . drupal_get_path('theme', 'bluez') . '/images/slideshow/slide-image-4.jpg';

add below code after line number : 107

$image4var = array(
    'path' => $vars['img4'],
    'alt' => $vars['slide4_title'],
    'title' => $vars['slide4_title'],
    'attributes' => array('class' => 'slide-img'),
  );
  $vars['slideimage4'] = theme('image', $image4var);

2. theme-settings.php

Add below code after line number : 85

$form['bluez_settings']['slideshow']['slide4'] = array(
    '#type' => 'fieldset',
    '#title' => t('Slide 4'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['bluez_settings']['slideshow']['slide4']['slide4_title'] = array(
    '#type' => 'textfield',
    '#title' => t('Slide Title'),
    '#default_value' => theme_get_setting('slide4_title', 'bluez'),
  );
  $form['bluez_settings']['slideshow']['slide4']['slide4_desc'] = array(
    '#type' => 'textfield',
    '#title' => t('Slide Description'),
    '#default_value' => theme_get_setting('slide4_desc', 'bluez'),
  );


3. page--front.tpl.php

add below code after line number : 123

<?php print $slideimage4; ?>

add below code after line number : 150

<?php if ($slide4_title || $slide4_desc):?>
          <div class="descriptions" style="display: none;">
            <div class="desc">
              <div class="desc_top"><?php print $slide4_title; ?></div>
              <div class="desc_bottom"><?php print $slide4_desc; ?></div>
            </div>  
          </div>
          <?php endif; ?>

add below code after line number : 163

<a rel="4" href="#"></a>

PS :
1. Do not forget to upload new image slide-image-4.jpg
2. After doing above changes do not forget to clear the cache of the site from admin/config/development/performance

Ujval Shah’s picture

Status: Active » Closed (fixed)