Warning: Table './myalbums_ddblock/watchdog' is marked as crashed and should be repaired query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";N;s:8:\"%message\";s:30:\"Function split() is deprecated\";s:5:\"%file\";s:63:\"/home/myalbums/public_html/ddblock/modules/filter/filter.module\";s:5:\"%line\";i:895;}', 3, '', 'http://ddblock.myalbums.biz/node/849', 'https://www.google.co.in/', '122.172.25.84', 1397538078) in /home/myalbums/public_html/ddblock/includes/database.mysql.inc on line 128

Warning: Table './myalbums_ddblock/watchdog' is marked as crashed and should be repaired query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";N;s:8:\"%message\";s:30:\"Function split() is deprecated\";s:5:\"%file\";s:63:\"/home/myalbums/public_html/ddblock/modules/filter/filter.module\";s:5:\"%line\";i:895;}', 3, '', 'http://ddblock.myalbums.biz/node/849', 'https://www.google.co.in/', '122.172.25.84', 1397538078) in /home/myalbums/public_html/ddblock/includes/database.mysql.inc on line 128
How to create a basic dynamic display block image slideshow with links to other pages | Dynamic display block slideshow module for Drupal

How to create a basic dynamic display block image slideshow with links to other pages

Description:

In this option, one node is created for the slideshow with images as attachments. (using core upload module)
In the body of the node HTML code will be used to add the slides:

   <div class="slides">
    <div class="slide">
     <a href="link to node"><img src="link to image"></a>
    </div>
    <div class="slide">
     <a href="link to node"><img src="link to image"></a>
    </div> 
    <div class="slide">
     <a href="link to node"><img src="link to image"></a>
    </div> 
   </div>

The "link to image" will need to be changed to the link of the uploaded images and the "link to node" to the page on the site or to a page on another Internet site, where you want to link to.
The ddblock slideshow block will be configured to get the node we created for that slideshow.
For each slideshow a new ddblock needs to be created to select the node.
This solution is useful for one or a few slideshows with more static content on your site.

If you want a solution where each slide (each slide is a node) has an image, links and maybe text on the image and a readmore button, you need to use the advanced option of the ddblock module. Advanced slideshow tutorial.

Content type name an node name

I will use the content type: "ddblock images with links to other pages", the node: "ddblock images with links" and a ddblock named: "ddblock image-link slideshow". I advise you to use the same names to make this tutorial work. When you have the slideshow working you can use your own names for the content type, node and ddblock.

Links refer to the existing tutorial on this site.

Installation:

Follow the detailed Installation instruction on how to install the required modules to make the: ddblock image slideshow with links to other pages.

Create a content type

Path to create content type:

  1. Go to Admin > Content management > Content types.

Add content type

  1. Click Add content type button.
  2. Fill in the following fields:
    • Name - e.g ("ddblock images with links to other pages").
    • Type - e.g ("ddblock_images_with_links").
    • Description - (optional).
  3. Click Save content type button.

Create a node to provide content for the slideshow

Path to create a node:

  1. Go to Admin > Create content > "ddblock images with links to other pages".

Create node

  1. Fill in the following fields:
    1. Title - e.g ("ddblock images with links").
    2. Insert the following code in the Body for using 3 slides.
         <div class="slides">
          <div class="slide">
           <a href="link to node"><img src="link to image"></a>
          </div>
          <div class="slide">
           <a href="link to node"><img src="link to image"></a>
          </div> 
          <div class="slide">
           <a href="link to node"><img src="link to image"></a>
          </div> 
         </div>
  2. Attach images to your node.
    Attach 3 images to the node (You need to have upload module enabled to attach files).
  3. Uncheck the 'List' checkbox next to each image.
  4. Change "link to node" and "link to image".

    You need to change "link to node" and "link to image" to real URLS

    "link to node" - Link to a node or other URL. E.g ("node/1 to link to node 1 or http://themes.myalbums.biz to link to a page on another Internet site.)

    "link to image" - Path to image to show in the slideshow. (copy the link from the attached images)

  5. Change Input format to Full HTML.
  6. Make the node Published.
  7. Click Save button.

Adding more slides
For this: "ddblock image slideshow with links to other pages" only 3 slides will show. If you want more slides to show for the image slideshow copy and paste the code below after the end tag of the <div class="slide">.

  <div class="slide">
   <a href="link to node"><img src="link to image"></a>
  </div> 
 

Enable the content type for the dynamic display block module

Before you can use the content type with the dynamic display block module you have to enable it.

Path to enable content type in the settings pages of the dynamic display block:

  1. Go to Admin > Site configuration > Dynamic display block.
  2. Click Settings tab.

Enable content type

  1. Enable: "ddblock images with links to other pages" under Content types.
  2. Click Save configuration button.

Add a block for the: "ddblock image slideshow with links to other pages"

Path to add a block:

  1. Go to Admin > Site configuration > Dynamic display block.
    1. Add block
    2. Fill in Block title text field - e.g ("ddblock image-link slideshow").
    3. Click Add block button.

    Configure block - "ddblock image-link slideshow"

    You can use two path to configuring a block:

    1. Go to Admin > Site building > Blocks > "ddblock image-link slideshow".
    2. Go to Admin > Site configuration > Dynamic display block > "ddblock image-link slideshow".

    Configure the block

    1. Choose Content type under Input type select box fieldset.
    2. Choose "ddblock_images_with_links" under Content type select box fieldset.
    3. Choose the node you made, e.g ("ddblock images with links").
    4. Set the other settings.

      Notes:

      1. Change Content container to div.slide.
      2. Uncheck the Next checkbox.
      3. You can u use a number pager or prev/next pager. Check the Use Pager checkbox.
      4. Choose a pager.
    5. Click Save block button.

    Display Dynamic display block slideshow:

    You can place your block - "ddblock image-link slideshow" in either a region of your theme or in a node.

    In the Display advanced Dynamic display block slideshow tutorial page you can find more information how to display the slideshow on your site.

    Styling the slideshow
    You can style the slideshow by overriding the node.tpl.php template file.
    Create a copy of the node.tpl.php file and rename it to node-[Content-type-name].tpl.php.

    FAQ
    When the node title of the node where you place the ddblock in, is show between the slides, you have two option to remove the node title:

    You can remove (hide) the title with CSS, e.g.:

    #ddblock-ddblock-[ddblock_nr] h2{display:none}

    replace [ddblock-nr] with the number of the ddblock slideshow block, so it becomes:
    #ddblock-ddblock-3 h2{display:none}

    or

    You can remove the title by overriding the node.tpl.php template file.
    create a node-[Content-type-name].tpl.php file by copying the node.tpl.php file and remove the title.

    Remove the line like the following from the node-[Content-type-name].tpl.php file:

      <?php if ($page == 0): ?>
      <h2 class="title"><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
      <?php endif; ?>

Comments

I'm new to Drupal, and I am

I'm new to Drupal, and I am trying to make this work in Drupal 7. I am having a hard time finding suitable directions, so I'm trying to do my best to translate the Drupal 6 instructions. (If anyone knows of really detailed *advanced* instructions for slideshows in Drupal 7, that would be the best.)
Pretty early on in these instructions, I get terribly lost.

I can "Attach images to your node." by using the Image field. Not sure if that's right.
But I can't do any of this because the buttons/boxes simply don't exist:
>>>Uncheck the 'List' checkbox next to each image.
>>>Change "link to node" and "link to image".
>>>You need to change "link to node" and "link to image" to real URLS

>>>"link to node" - Link to a node or other URL. E.g ("node/1 to link to node 1 or http://themes.myalbums.biz to link to a page on another Internet site.)

>>>"link to image" - Path to image to show in the slideshow. (copy the link from the attached images)

Help? :-)

Works great!

I used cck imagefield instead of attachment, and I excluded the field from display. Thank you for writing the article.

thanks

Thanks for this clear explanation. Worked right out of the box !

Thanks!

I tried the template route and it worked fine. Thanks a lot for that and thanks for the great module!