I've installed and gone through the instructions for the advanced ddblock several times and I'm still getting the same results.
1) My images are stacked, they are not rotating.
2) When I go to configure the block, the settings appear to be normal... but when I change the template from Upright10 to anything else and save the configuration, nothing happens. Then when I go back to try again, the template is set on Upright10 again.
3) I've also discovered that no custom jQuery cycle options showing up in the block configuration page.
I have placed the template files in sites/all/themes/myzen
Also - somethings work on the config page i.e. image width and height, and container width and height
Any suggestions?
here is my template.php:
function myzen_preprocess_ddblock_cycle_block_content(&$vars) {
if ($vars['output_type'] == 'view_fields') {
$content = array();
// Add slider_items for the template
// If you use the devel module uncomment the following line to see the theme variables
// dsm($vars['settings']['view_name']);
// dsm($vars['content'][0]);
// If you don't use the devel module uncomment the following line to see the theme variables
//drupal_set_message('<pre>' . var_export($vars['settings']['view_name'], true) . '</pre>');
//drupal_set_message('<pre>' . var_export($vars['content'][0], true) . '</pre>');
if ($vars['settings']['view_name'] == 'news_items') {
if (!empty($vars['content'])) {
foreach ($vars['content'] as $key1 => $result) {
// add slide_image variable
if (isset($result->node_data_field_pager_item_text_field_image_fid)) {
// get image id
$fid = $result->node_data_field_pager_item_text_field_image_fid;
// get path to image
$filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $fid));
// use imagecache (imagecache, preset_name, file_path, alt, title, array of attributes)
if (module_exists('imagecache') && is_array(imagecache_presets()) && $vars['imgcache_slide'] <> '<none>'){
$slider_items[$key1]['slide_image'] =
theme('imagecache',
$vars['imgcache_slide'],
$filepath,
check_plain($result->node_title));
}
else {
$slider_items[$key1]['slide_image'] =
'<img src="' . base_path() . $filepath .
'" alt="' . check_plain($result->node_title) .
'"/>';
}
}
// add slide_text variable
if (isset($result->node_data_field_pager_item_text_field_slide_text_value)) {
$slider_items[$key1]['slide_text'] = check_markup($result->node_data_field_pager_item_text_field_slide_text_value);
}
// add slide_title variable
if (isset($result->node_title)) {
$slider_items[$key1]['slide_title'] = check_plain($result->node_title);
}
// add slide_read_more variable and slide_node variable
if (isset($result->nid)) {
$slider_items[$key1]['slide_read_more'] = l('Read more...', 'node/' . $result->nid);
$slider_items[$key1]['slide_node'] = base_path() . 'node/' . $result->nid;
}
}
}
}
$vars['slider_items'] = $slider_items;
}
}
/**
* Override or insert variables into the ddblock_cycle_pager_content templates.
* Used to convert variables from view_fields to pager_items template variables
* Only used for custom pager items
*
* @param $vars
* An array of variables to pass to the theme template.
*
*/
function myzen_preprocess_ddblock_cycle_pager_content(&$vars) {
if (($vars['output_type'] == 'view_fields') && ($vars['pager_settings']['pager'] == 'custom-pager')){
$content = array();
// Add pager_items for the template
// If you use the devel module uncomment the following lines to see the theme variables
// dsm($vars['pager_settings']['view_name']);
// dsm($vars['content'][0]);
// If you don't use the devel module uncomment the following lines to see the theme variables
// drupal_set_message('<pre>' . var_export($vars['pager_settings'], true) . '</pre>');
// drupal_set_message('<pre>' . var_export($vars['content'][0], true) . '</pre>');
if ($vars['pager_settings']['view_name'] == 'news_items') {
if (!empty($vars['content'])) {
foreach ($vars['content'] as $key1 => $result) {
// add pager_item_image variable
if (isset($result->node_data_field_pager_item_text_field_image_fid)) {
$fid = $result->node_data_field_pager_item_text_field_image_fid;
$filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $fid));
// use imagecache (imagecache, preset_name, file_path, alt, title, array of attributes)
if (module_exists('imagecache') &&
is_array(imagecache_presets()) &&
$vars['imgcache_pager_item'] <> '<none>'){
$pager_items[$key1]['image'] =
theme('imagecache',
$vars['pager_settings']['imgcache_pager_item'],
$filepath,
check_plain($result->node_data_field_pager_item_text_field_pager_item_text_value));
}
else {
$pager_items[$key1]['image'] =
'<img src="' . base_path() . $filepath .
'" alt="' . check_plain($result->node_data_field_pager_item_text_field_pager_item_text_value) .
'"/>';
}
}
// add pager_item _text variable
if (isset($result->node_data_field_pager_item_text_field_pager_item_text_value)) {
$pager_items[$key1]['text'] = check_plain($result->node_data_field_pager_item_text_field_pager_item_text_value);
}
}
}
}
$vars['pager_items'] = $pager_items;
}
}
Comments
Comment #1
ppblaauw CreditAttribution: ppblaauw commentedWhen the images are stacked, probably the block display from the view is used and not the dynamic display block instance.
Comment #2
shredvisions CreditAttribution: shredvisions commentedThe correct block would be the same one that I created under the dynamic display instances tab, right? That is the one that I have enabled... Still getting stacked images...
Are there any incompatibilities with other modules?
Comment #3
ppblaauw CreditAttribution: ppblaauw commentedDo you have a link to the slideshow on your site?
Do you see javascript error on the page?
Comment #4
shredvisions CreditAttribution: shredvisions commentedCurrently I have the "slideshow" showing up on every page... so the stacked images are showing up on every page.
I get this error in Firebug on the configure block page - uncaught exception: Syntax error, unrecognized expression: [@value='top']
Otherwise I don't seem to be getting any other errors.
Comment #5
ppblaauw CreditAttribution: ppblaauw commentedMaybe the troubleshooting part of the FAQ gives you answers: http://ddblock.myalbums.biz/faq#19n805
Its difficult to debug when I don't have access to the site.
Comment #6
shredvisions CreditAttribution: shredvisions commentedI know - unfortunately the site is on a local testing server - thanks for your help. I think I'll try to reinstall it again, from ground zero and see if that works...
Comment #7
subi1kenobi CreditAttribution: subi1kenobi commentedOn this one - I also had the View of the Slideshow items, rather than the ddblock instance. This worked for all the Upright templates. However, I can not get the custom template to work. I have updated the template.php files and place custom folder in:
themes/waffles
sites/all/themes/waffles - which didnt exist until today.
Here is the code for my template.php file in both of the above locations.
Any help is encouraged.
Comment #8
pankajyadav CreditAttribution: pankajyadav commentedHiii
My gallery is Working but Display in all the Pages and when i go to structure and go go to the block if i set the region to none my gallery stop working and only display only one image........
so please help me ???
Comment #9
ppblaauw CreditAttribution: ppblaauw commented#7
You should not have the same theme twice in your Drupal directory structure.
#8
When you want the slideshow only to display on e.g the frontpage set: for pages to show the block on.
Do you have a link to the site?
Comment #10
subi1kenobi CreditAttribution: subi1kenobi commentedOK - so I do. But still can't get any results for the Custom Theme. It displays nothing, but the Upright templates work fine.
EDIT - Nevermind - I found out that I did not have the gradient-blue30p custom folder inside the modules/ddblock.
Consider this DONE.
Comment #11
cfusch CreditAttribution: cfusch commentedJust an FYI for all before closing:
I had basically the same problem with stacking and/or not showing images. As it turned out, I had installed CKedit (was wysiwyg) and when refreshing the new editor munged the js code with a lot of HTML crud. Code originally was:
{"fastOnEvent": 0,
"speed": 1200,
"easeIn": "easeout",
"easeOut": "easein"}
It took forever to realize this had happened.
Soooooo... for your support Knowlege base, you might want to plug this in as a possibility, i.e. user error. ;-)
Carl
Comment #11.0
cfusch CreditAttribution: cfusch commentedrevising thoughts