- 🇩🇪Germany Anybody Porta Westfalica
Cleaning up very old issues. Feel free to reopen, if anyone wants to work on a fix and provides a MR! :)
The homebox dashboard would be strengthened for multilingual websites if the functionality of i18n_block would be incorporated. This module allows blocks to translated and/or shown only for selected languages. Homebox currently ignores these settings.
I altered the beginning of the _homebox_can_view_block function in homebox.module to prevent the blocks with the wrong languages to show. I have no idea, however, if this is the appropriate approach. (Checking if the i18n_block_language table exists might be advisable.)
function _homebox_can_view_block($block) {
global $user;
global $language_content;
// Detect valid blocks in the system.
$valid_blocks = &drupal_static(__FUNCTION__ . ':valid_blocks');
if (!is_array($valid_blocks)) {
$valid_blocks = array();
$results = db_query("SELECT b.module, b.delta, i18n.language FROM {block} b LEFT JOIN {i18n_block_language} i18n ON b.delta = i18n.delta");
foreach ($results as $record) {
if (!(isset($record->language))||($record->language == $language_content->language)){
$valid_blocks[$record->module][$record->delta] = TRUE;
}
}
}
Obviously, this only tackles halve of the issue. Please, let me know, how to proceed and how I can help with the rest.
Thanks
Medemer
Closed: outdated
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Cleaning up very old issues. Feel free to reopen, if anyone wants to work on a fix and provides a MR! :)