DDBlock not appearing in my project
| Project: | Dynamic display block |
| Version: | 6.x-1.0-rc6 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Hello ,
Thanks for a fantastic job done on this module. I thinks it is one of the coolest modules ever and it is very practical in a usability sense. I am using ac equally cool Theme called Arthemia. (I think ur module and this theme should win this years award) my site is. www.ohmeslogistics.com/aau. Unfortunately nothing seems to be working. i have been through all the bug complaints and reports, have imported views and content type files, worked on the pre-processor,---- but my regions are unable to display anything :( . What could the problem be?
I noticed that after going through the process the ff was noticed:
1. The template.php file was not totally cohrently coloured in Dreamweaver.(I removed the <?php > tag) from the txt file.
2. The Block module has two blocks after importing views and cck files and creating instances they are-
(a) News item slideshow and (b) ddblock-News item slideshow - could this be a problem?
I have attached a screen shot of the homepage and region.
SOMEONE PLEASE HELP ME, I DONT WANT TO BE BEHIND SCHEDULE ON THIS PROJECT!!! :(
| Attachment | Size |
|---|---|
| screenshot.jpg | 99.27 KB |

#1
Hello folks,
Please refer to my site, www.ohmeslogistics.com/aau. Drop downs appear in Firefox but not IE.
Does anyone know why, this is the case? I have analysed css issues but cant seem to trace a problem.
Ill be gratefull for some help. Thanks.
Raja (Ghana)
#2
If you assign an issue to yourself, you are solving the issue yourself and no one else has to do something. (I don't think this is what you mean). A priority critical does not make your issue solved earlier. (describing the issue in detail does)
You can have a look at the issue queue handbook to make your experience with issue queues more pleasant and fruitful.
Set the version to 6.x-1.0-rc6 (I think and hope you use this version)
Normal status when you post a support request is: active.
That said:
I don't see a dynamic display block at the link you give.
Can you attach your template.php file and the result of the drupal_set_message debug lines when you uncomment them in the preprocess functions.
Uncomment the drupal_set_message debug lines.
Reload the page with the dynamic display block.
Please send the information, so I can help you better.
#3
First of all thankyou for attending to my call today. Ill take good note of the protocols in Drupal communication - im somewhat new to drupal. I really want to use your Module to the full. I met with my client today over it and just simply displayed a jpeg (stillframe) impression of it. You can access it at the website ohmeslogistics.com/aau.
So below is the template.php file for your kind perusal. I uncomented the rupal_set_message at one point but nothing happened.
Thanks again!!!!!!!!!!!!!!!!
/////////////////////////////
<?php
// $Id: template.php,v 1.1 2009/06/07 22:19:37 nbz Exp $
/**
* Return a full tree of the expanded menu. Thank you multiflex-3 for this code!
*/
function arthemia_primary() {
$output = '';
$output .= menu_tree(variable_get('menu_primary_links_source', 'primary-links'));
$output .= '';
return $output;
}
/**
* Return a themed breadcrumb trail, but only if there is more than one link in it.
*/
function arthemia_breadcrumb($breadcrumb) {
if (count($breadcrumb) > 1) {
return ''. implode(' › ', $breadcrumb) .'';
}
}
/**
* Allow themable wrapping of all comments.
*/
function phptemplate_comment_wrapper($content, $node) {
$comments_per_page = _comment_get_display_setting('comments_per_page', $node);
$content = theme('pager', NULL, $comments_per_page, 0) . $content;
if (!$content || $node->type == 'forum') {
return ''. $content .'';
}
else {
return '
'. t('Comments') .'
'. $content .'';
}
}
/**
* Modify and extend the comment template theming.
*/
function arthemia_preprocess_comment(&$variables) {
//Add a comment number and link to comments, borrowed from Advanced Forum module.
if (!isset($comment_number)) {
static $comment_number = 0;
}
$comments_per_page = _comment_get_display_setting('comments_per_page', $variables['node']);
$page_number = $_GET['page'];
if (!$page_number) {
$page_number = 0;
}
$comment_number++;
$post_number++;
$fragment = 'comment-' . $variables['comment']->cid;
$query = ($page_number) ? 'page=' . $page_number : NULL;
$linktext = '#' . (($page_number * $comments_per_page) + $comment_number);
$linkpath = 'node/' . $variables['node']->nid;
$variables['comment_link'] = l($linktext, $linkpath, array('query' => $query, 'fragment' => $fragment, 'class' => 'comment-link'));
}
function arthemia_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('' . var_export($vars['settings']['view_name'], true) . '');
// drupal_set_message('' . var_export($vars['content'][0], true) . '');
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_image_field_image_fid)) {
// get image id
$fid = $result->node_data_field_image_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'] <> ''){
$slider_items[$key1]['slide_image'] =
theme('imagecache',
$vars['imgcache_slide'],
$filepath,
$result->node_title);
}
else {
$slider_items[$key1]['slide_image'] =
'node_title .
'"/>';
}
}
// add slide_text variable
if (isset($result->node_data_field_pager_item_text_field_slide_text_value)) {
$slider_items[$key1]['slide_text'] = $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'] = $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'] = '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 arthemia_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('' . var_export($vars['pager_settings'], true) . '');
// drupal_set_message('' . var_export($vars['content'][0], true) . '');
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_image_field_image_fid)) {
$fid = $result->node_data_field_image_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'] <> ''){
$pager_items[$key1]['image'] =
theme('imagecache',
$vars['pager_settings']['imgcache_pager_item'],
$filepath,
$result->node_data_field_pager_item_text_field_pager_item_text_value);
}
else {
$pager_items[$key1]['image'] =
'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'] = $result->node_data_field_pager_item_text_field_pager_item_text_value;
}
}
}
$vars['pager_items'] = $pager_items;
}
}
}
#4
I don't see a version number of the preprocess functions in your template.php file. That part is not copied to the template.php file so I don't know which version it is or where you get it, but the preprocess functions are totally wrong.
Attached is the latest version of the preproces function with the themename already adjusted to arthemia.
Just copy the whole file to your template.php file without the <?php at the top and delete the old preprocess function for the ddblock module.
Hope this helps you further, please let me know.
#5
Issue solved with poster
#6
Hi,
Excelent Module, congratulations, and I hope publish my site in your database like example, I love Open Source!!.
I am having the same behaviour, i put the preproces function given by ppblaauw and change THEME_NAME to taspestry and nothing happend, i want to use it in may taspestry moddified (Only I have touched the css files), Taspestry use 2 powerfulls modules "blockthemes" and "themesettings", and i think the problem is here!, but i am not sure and I dont know what's happend.
I uncomment the lines "like in the Video" and the is not shown.
Can you help me.
I tried in a clear installation and nothing happend neither.
Drupal 6.13
DB MySql
Theme : http://drupal.org/project/tapestry
Clear Installation.
Problem with "register_globals is enabled" in my instalation (I can not resolve this for now).
What other information do you need?
THANKS
#7
I downloaded the tapestry theme, installed it on my test server, copied the custom folder to the theme, added the preprocess functions to template.php, renamed [theme_name] to tapestry and the ddblock slideshows are working.
My conclusion is: Your issue is not related to the tapestry theme.
Can you send your template.php file you use and if you have a link to your site, that would also be helpful.
#8
close issue, 9 weeks without activity.