Information
To make it possible to give different layouts to your slideshows an advanced Dynamic display block slideshow uses template files, Cascading style sheets and images. The combination of the template, CSS and images is called a Dynamic display block theme or ddblock theme.
ddblock theme directory structure
A ddblock theme has the following directory structure:
custom/ --modules/ ----ddblock/ ------ddblock-cycle-block-content.tpl.php ------ddblock-cycle-block-content-[ddblock-theme-name].tpl.php ------ddblock-cycle-pager-content.tpl.php ------ddblock-cycle-pager-content-[ddblock-theme-name].tpl.php ------images/ ------[ddblock-theme_name]/ --------[ddblock-theme-name].css --------images/
E.g. for the upright10 and chromatic-blue20l ddblock themes it would look like this:
custom/ --modules/ ----ddblock/ ------ddblock-cycle-block-content.tpl.php ------ddblock-cycle-block-content-chromatic-blue20l.tpl.php ------ddblock-cycle-block-content-upright10.tpl.php ------ddblock-cycle-pager-content.tpl.php ------ddblock-cycle-pager-content-chromatic-blue20l.tpl.php ------ddblock-cycle-pager-content-upright10.tpl.php ------images/ ------chromatic-blue20l/ --------chromatic-blue20l.css --------images/ ------upright10/ --------upright10.css --------images/
Installation
Note: Other free themes can also be downloaded from http://ddblock.myalbums.biz/download, we will periodically donate more ddblock theme via our Sunday - Donation day!!!, Commercial themes can be seen and purchased form http://themes.myalbus.biz
Important Note: For MAC and Linux users, check the permissions of the directories and theme files of the ddblock themes on filesystem level. They need to be readable by Drupal, other wise you get error messages like:
warning: include(./themes/[***themename***]/custom/modules/ddblock/ddblock-cycle-pager-content.tpl.php) [function.include]: failed to open stream: Permission denied in /Applications/MAMP/htdocs/drupal614/includes/theme.inc on line 1020.
Comments
Is there a easy way to create an Advance DDblock?
Thank you for your nice module. I'm a beginner in PHP and I've followed your tutorial until the "Create and configure instance". After save, I can only see the "ddblock-News item slideshow" on the front page without any picture and text. I'm guessing I have to follow your complete tutorial to show the block as what it supposed to, am i right?
Thank you so much.
Doesn't ddblock work with acquia marina theme ?
Doesn't ddblock work with acquia marina theme ? ddblock was working perfeclty when i was using this with Garland theme.but now i am trying to build my site using acquia marina but ddblock image does not appear . any suggestion plz !
regards
jags
Re: ddblock - aqua marine
The dynamic display block slideshow module also works with acquia marina. (it should work with all themes).
When you use the advanced options of the ddblock module:
Did you copy the custom folder to the acquia marine theme?
Did you add the preprocess functions to the template.php file of the acquia marine theme?
Did you rename the theme-name to acquia_marina (don't know if the theme_name is with an underscore)
Hope this helps you further, please let me know.
If not please make an issue in the issue queue of the ddblock slideshow module.
getting an error
As you can see below I am developing locally in MAMP. I followed all of the steps and I am getting a long error message in the area where the block would appear:
* warning: include(./themes/ad_novus/custom/modules/ddblock/ddblock-cycle-pager-content.tpl.php) [function.include]: failed to open stream: Permission denied in /Applications/MAMP/htdocs/drupal614/includes/theme.inc on line 1020.
* warning: include() [function.include]: Failed opening './themes/ad_novus/custom/modules/ddblock/ddblock-cycle-pager-content.tpl.php' for inclusion (include_path='.:/Applications/MAMP/bin/php5/lib/php') in /Applications/MAMP/htdocs/drupal614/includes/theme.inc on line 1020.
* warning: include(./themes/ad_novus/custom/modules/ddblock/ddblock-cycle-block-content.tpl.php) [function.include]: failed to open stream: Permission denied in /Applications/MAMP/htdocs/drupal614/includes/theme.inc on line 1020.
* warning: include() [function.include]: Failed opening './themes/ad_novus/custom/modules/ddblock/ddblock-cycle-block-content.tpl.php' for inclusion (include_path='.:/Applications/MAMP/bin/php5/lib/php') in /Applications/MAMP/htdocs/drupal614/includes/theme.inc on line 1020.
ad_novus is the name of the theme I am using. I did place the tpl.php files in the theme directory. It is unclear how many of themse files I need to download. At theme-name/custom/modules/ddblock I have several folders, upright10-50, images, and chromatic-blue20l.
It is rather disappointing going through all of these steps and not have it work. I made two nodes of the news type.
Re: getting an error
The error messages indicate you did not give read permissions to the files on filesystem level. Understand your disappointment.
Will also add this as a note to the documentation and will make a faq question for this. It seems that more MAC and Linux users forget to give permission to files on filesystem level.
All the ddblock themes go under the custom/modules/ddblock directory.
With only upright10 and chromatic-blue20l it would look like this:
custom/
--modules/
----ddblock/
------ddblock-cycle-block-content-chromatic-blue20l.tpl.php
------ddblock-cycle-block-content-upright10.tpl.php
------ddblock-cycle-pager-content-chromatic-blue20l.tpl.php
------ddblock-cycle-pager-content-upright10.tpl.php
------images/
------chromatic-blue20l/
--------chromatic-blue20l.css
--------images/
------upright10/
--------upright10.css
--------images/
Hope this helps you further, please let me know.
When this does not help please make an issue in the issue queue of the module.
Thanks for the quick
Thanks for the quick response, Philip.
So I arranged the files how you suggested, and I granted read permission to ddblock-cycle-pager-content.tpl.php and ddblock-cycle-block-content.tpl.php and the error messages went away. At first I was not sure what I needed to grant permission to, if it was all of the directories or just the files. Should I grant read permissions to all of the other files? I granted read-only permission to them as well.
But I still do not see the ddblock where I have placed it in the block configuration. No box or anything, it is as if I did not set the block to appear anywhere.
Part of the confusion that happened with the setup for your module is the the custom folder needs to go into the Drupal themes folder, but then without specifying it, you refer to the ddblock themes just as themes, and not ddblock themes. At first I was changing the names of the ddblock-cycle-pager-content.tpl.php to include the name of my Drupal theme.
Why not design this module so that the ddblock themes go into the ddblock module directory? This would be a lot less confusing, like site.com/sites/all/modules/ddblocks/themes/upright10-50/all theme files. Also, why the long file names? why not just pager.tpl.php and block.tpl.php.
Also, why not include the Views export for the view setup you describe? Here is my exported view http://nsputnik.com/ddblocks-views.txt I can understand it might get people to play with and better understand Views, but the setup for this module is already has so many steps.
Re: thanks for the quick
Thanks for your reply, will answer it by paragraph.
You need to give read permissions to all the files of the ddblock themes.
I have heard before that when unzipping files on a MAC permissions are not set for the unzipped files while using a tar it does, maybe better to use tar compression. Can you confirm this?
Please make an issue in the issue queue of the module.
I adjusted the text of this documentation page again. Hopefully its more clear now. Maybe I changed now all occurrence of just theme where ddblock theme is meant, but can you pinpoint if and where are more places where the ddblock themes are just called themes, so I can adjust the documentation.
Custom theming of a module should be done in the themes directory. Only in case of the ddblock module it's already done for you. The custom theming can be downloaded to place it in the themes folder. At least that is how I see it. ddblock theme files start with ddblock, to avoid collisions with other .tpl.php files. Then for which plugin (ddblock module was supposed to support more jQuery plugins, not only the cycle plugin). then pager-content or block-content. This could be shorten by pager and block.
The cck and views export files are included in the export_files package.
Hope this clears some things up.
Thanks again for your suggestions.
So I have the plugin running
So I have the plugin running on a web server now and I am getting further with it, but there are a couple of problems. I can only see the ddblock when I am logged in as an admin, and I have nothing checked at Show block for specific roles. I can see the images in the posts only when logged in as the admin. What I see this text:
pager item text:
[the pager item text]
slide text:
[the slide text]
[the image here]
I have three news node items, but it only displays the oldest one, and there is no animation happening, just a static image and text. I have Cycleblock selected as the display method. I put the template.php file in my theme folder and set the theme name in this file.
Re: So I have the plugin running
Please create an issue in the issue queue of the module.
Suggestion
First of all, Thanks you for created these wonderful module. But I have a suggestion.
Now, I'm working on how to Theme this module. As you can see many persons have a problem of "How to change the theme for this module". The instruction provide on the site is not really clear.
For Example, After downloaded "upright10-50.zip" an extracted to the folder you said in the instruction. We have got many file there. But I don't know how to use it. Do this module have any UI for changing the theme or I have to edit some file or changing fome file's name etc.
You have to make the instruction more clearer for someone who diddn't work on this module before. Your instruction look just like for only you to read.
Thank you,
Sek
Re: Suggestion
Thank you very much for your comment.
We are always trying to improve the documentation. It's one of the most important things of the whole module.
Please give us detailed information to which tutorial you refer, which page, and how the documentation can be improved.
I will be glad to make changes or work on it together with you.
I have to say sorry for my
I have to say sorry for my very late reply.
For example,
After I take a while studying the whole module function. I've discovered that I can't use theme or Advance Setting, If I created the block using "Add block" button. If I want to be able to use the theme, I have to create the block from "Add Instance" button.
At least, In this page, You should have a "Tips" or "Suggestion" to tell user that they will not be able to use theme from "Add block". They have to goto "Add instance" instead. But I don't know if other newbie have the same problem as me.
One more thing about Module. This module sould be able to use theme from both "Add block" and "Add instance", just in my opinion. Because theme should be able to apply to any block, Isn't it??
Anyway, After I stayed with this module for few night, I can say that this module is great.
Thank you for this beautiful innovation!!!
Your Best Regards,
Sek
Re: I have to say sorry
Sek, thank you for your suggestions.
We assume users would read the readme file and the basic or advanced slidehow tutorial before they use the module.
To add more documentation in the module itself is good advise.
Will try to improve this in future versions of the module.
For the basic slideshow you can also theme your block, by making a copy of the ddblock.css file to your theme and adjust it there.
With the advanced slideshow there are a lot more theme layouts possible, which we made more flexible. In our upgrade to drupal 7 this difference will probably disappear and also for the basic slideshow you can choose themes flexible then.
Thanks again
Hi, I'm trying to theme the
Hi,
I'm trying to theme the basic slideshow. I've tried to copy ddblock.css into my theme folder (/sites/all/themes/my-theme/) but it doesn't seem to work. Copying it to the custom ddblock folder (/sites/all/themes/my-theme/custom/modules/ddblock/) doesn't work either. Could you please give more details on how to do it?
Thank you
Hello, I have the same
Hello,
I have the same trouble : my custom css file doesn't be load under my site. So I found a better solution than modifiy the info file of the theme which is not a modular solution if you want to migrate only your custom ddblock theme. So, the other solution is to put this line :
on the php header of the ddblock-cycle-block-content-[template_name].tpl.php of your custom theme.
I try to used the "$template" variable on the place of [YOUR_CUSTOM_TEMPLATE_NAME] but this variable just return the string "custom", so i directly write my custom template name.
Re: Hi, I'm trying to theme the...
You will need to define the ddblock.css file added to your theme in the info file of your theme.
see also: http://drupal.org/node/171209
Hope this helps you further, please let me know.
Themes don't change
Hello,
As with everyone else, I'd like to say thanks for the module, and thanks for the very clear step-by-step instructions. I got everything to work on the first try.
Now that I have it up and running, I tried to download some of your other free themes. I deleted the original custom folder that I had originally placed in my theme, and I uploaded the new custom folder from one of the themes I downloaded from your site.
But when I go into the blog config menu, the old list still shows up, and I can't access the new block themes that I have just uploaded.
What am I doing wrong?
Re: Themes don't change
The upright10-50 ddblock themes are default set in the ddblock module.
When you want to use one of the other free or commercial themes you can add them the custom folder which is already there with the upright10-50 themes.
You don't have to delete the custom folder containing the upright10-50 ddbock themes.
To use one of the other themes you choose custom under themes settings. When you do this another field will show up, where you can add the name of the custom theme.
Hope this helps you further, please let me know.
Hello again, Thanks for the
Hello again,
Thanks for the help. I did figure it out, and I got it to work with other themes. I am currently using gradient-green40p. I am still having a problem. Everything works just fine when I have the Pager Position set to either top or bottom, but it won't work with left, right, or both.
The note below the field says that it will only work if the theme allows it, but I'm assuming that the gradient-green40p theme does allow it because the options are available. With other themes, the option isn't even there.
Thanks again,
Josh
Re: Hello again, Thanks for the
The p themes are portrait themes with pager at top or bottom
The l themes are landscape themes with pager at left or right side.
The Upright themes are
upright10 - with number pager
upright20 - with prev/next pager
upright30 - with text pager
upright40 - with image pager
upright50 - with text/image pager
Depending on which upright theme you choose an option for the pager can be choosen. For the custom themes all options are available, only it depends on the theme if you can use them.
(could have a look, to add the functionality what options you can choose also for the custom themes, in a future version of the module.)
This numbering is also used in other themes.
Hope this explains a little more.
Error message
I have put the advanced slideshow in the RHS column in a block there. Initially I only got the title "ddblock-News item slideshow". I put the theme set into my Drupal template folder themes/garland and have not used the sites/all custom theme location.
1. Is it OK to use the default theme location?
I have configured the upright40 and now get a white block appearing below the heading so it looks as if it is trying to display the image block. I have enabled the cache and when I did that I get a page error:
warning: Invalid argument supplied for foreach() in C:\wamp\www\wlvh\themes\garland\custom\modules\ddblock\ddblock-cycle-block-content-upright40.tpl.php on line 47.
Advice appreciated.
I must point out that I have
I must point out that I have edited my garland theme php to include the code. My page ends up with the structure:
But with no displaying images and the error message reported earlier.
<div id="ddblock-2"
Re: Error message
Rodger,
Thank you for your interest in the dynamic display block module.
In the trouble shooting part of the FAQ you can read more about this issue.
It is better not to adjust the default theme provided by drupal. It makes it more difficult to upgrade drupal to newer versions. You can read in the readme.txt at sites/all why.
If you want to adjust garland it is better to make a copy of the garland directory to sites/all and rename the directory to e.g. mygarland. You also need to rename garland.info to mygarland.info in this directory and edit the mygarland.info file. (rename to garland to mygarland in this file)
That is all to make your own custom copy of garland. You can now enable the mygarland theme in administer > site building > themes.
Hope this helps you further, please let me know.
If you can not solve the issue, please make an issue in the issue queue at drupal.org, so I can help you better. The projects issue queue is better monitored then this internet site and this place is more to comment on the documentation above then for posting issues.
greetings,
Philip
Philip, thanks for your
Philip, thanks for your reply. I had not done the copying from the php output lines (which appeared after resetting the cache). The video (which I had to run several times to get the gist) is a bit missleading because the slide image variable has to be pasted in FOUR times (twice in both functions - the video does not show this) to get both the thumbs and main pics to show. The slide text variable I only had to copy twice into the last function.
It seems strange to have to take these steps as this is a complex procedure for a novice like me. It is also necessary to get your images sized nicely for the full image view so they don't pixelate. Is it not possible to make this module a little more slick to setup?
I take the point about creating my own theme from the default and I shall now do this. Then I shall work more on understanding and using this useful feature.
A problem...
Hi. First of all, thanks a lot for your hard work with this very interesting module.
I think i'm fine and prepared to see the block but this message appears in my web: "warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\drupal\themes\ChaiGaram\ChaiGaram\custom\modules\ddblock\ddblock-cycle-block-content-upright40.tpl.php on line 47."
In this line I can read: "?php foreach ($slider_items as $slider_item): ?>"
Where is my problem?
Thank you very much
Greetings from Pontevedra, Spain
Advice
For the users of this great module that getting this error make sure you're using the right version of export files. I was using the wrong version and waste too much time trying to see what was wrong but i finally find it i'm using vsd_export_files-V1-3.zip instead of Export_files_V1.6.zip. Cheers.
Re: A problem...
In the trouble shooting part of the FAQ you can read more about this issue.
I see also that your theme is installed in the drupal themes directory.
Custom or contributed themes should be installed in sites/all/themes. You can read in the readme.txt at sites/all why.
Hope this helps you further, please let me know.
If you can not solve the issue, please make an issue in the issue queue at drupal.org. The projects issue queue is better monitored then this internet site, so I can help you better.
Theme OK ... but still problem...
I do what u say exactly and it's good the theme is in the right folder and custom in the right folder ...the problem that i still see nothing i see only black bar in the top when i use upright10 ... and the same thing with all blocks..
i follow up the instruction three times but still no succeed ...
If u can tell where is the problem ...
Re: Theme OK .. but still problem
Have a look at the issue queue (http://drupal.org/project/issues/ddblock) on drupal.org. You can find similar issue and answers there.
Also have a look at the FAQ (http://ddblock.myalbums.biz/faq) for troubleshooting.
If you can not find the answers there please make an issue in the issue queue on drupal.org. (The issue queue is better monitored then ddblock.myalbums.biz)
When you make an issue, please send the content of your template.php file and the result of the drupal_set_message debug lines when you uncomment them in the preprocess functions. Please also send the link to your site, so I can help you better.
Themes location
The location of the theme in my drupal is in the Main Dir ... not in the sites/all directory... and if i move the Themes dir into sites/all the website doesn't work properly ... so what should i do to resolve this problem.
Re: Theme location
Your custom themes should be in sites/all/themes/[custom_theme]. The themes directory you have to make yourself. (read also the README.txt file in sites/all)
When you move your custom theme from e.g the [drupal root]/themes directory. You need to clear the cache (at administration > Site configuration > Performance) so Drupal can find the theme in the new place. You can not copy the theme, otherwise you have two themes with the same name.
Hope this helps you further, please let me know.
Stylesheet does not seems to appear
Thanks for the module.
I followed the tutorial, and the pictures and text are shown with fade in - out, but there is no difference between the chosen template, Upright 10 to 50 shows exactly the same layout. The package is in the directory where it should be, the same place where the path in browser points to:
link type="text/css" rel="stylesheet" media="all" href="/sites/all/themes/[MY_THEME]/custom/modules/ddblock/upright10/ddblock-cycle-upright10.css?o"
What am I missing?
Re: Stylesheet does not seems to appear
Is the name of the theme you use [MY_THEME]?
In point 3.
Copy the custom directory with all sub directories to the theme directory of the theme you use. (which is probably at sites/all/themes/[YOUR_THEME_NAME]/)
this is if you use e.g garland as your theme
sites/all/themes/garland
Hope this helps you further, please let me know
Thanks for your suggestion,
Thanks for your suggestion, [MY_THEME] is eenrum, not [MY_THEME].
I tried the following: I copied the custom directory and subfolders to the Garland theme, and the text, slider, fades works fine, except the pictures are not displayed...
The original theme I used is based on ZEN. Maybe there is a problem?
Re: Thanks for your suggestion
That the pictures don't show up has probably to do with:
We also use subthemes based on ZEN. There is no problem with this.
Can you send a link to your website, so I can help you better.
Hi, I checked the preprocess
Hi,
I checked the preprocess functions, they seems ok to me.
I checked the imagecache settings, I removed the preset.
the link: http://eenrum.workatweb.nl/
Thanks in advance!
Problem solved
After the following suggestion from Philip it was solved:
File-field and Image-field module are changed.
In the preprocess functions you need to change (several times) the following string:
node_data_field_pager_item_text_field_image_fid
To node_data_field_image_field_image_fid
See also issue: http://drupal.org/node/403310 ImageField is updated!
Hope this helps you further, please let me know.
Thanks for the great support!
Thanks
Hey great solution.. Thank you so much!!!
No Imagecache support
Hi,
I have:
FileField 6.x-3.0
ImageCache 6.x-2.0-beta9
Dynamic display block 6.x-1.0-rc6
I can create a ddblock, but I cannot use the imagecache pics. For the time being I am using:
// use imagecache (imagecache, preset_name, file_path, alt, title, array of attributes)
if (module_exists('imagecache') && is_array(imagecache_presets()) && $vars['imgcache_slide'] <> ''){
$slider_items[$key1]['slide_image'] =
'node_title .
'"/>';
}
else {
$slider_items[$key1]['slide_image'] =
'node_title .
'"/>';
}
It works, but I would appreciate any suggestion on how to make something better than that.
Thank you for the awesome module!
Imagecache
Unfortunately after hours of trying I am also unable to use the imagecache, which is something I definately need to use.
I have gone through the tutorials a number of times, and nothing.
Is there any fix for this.
Re: Imagecache
Please create an issue in the issue queue of the module and attach you template.php file and if possible a link to the Internet site, so I can help you better.