Skip to content

Commit

Permalink
Fixes for CSS include error and minor bugs
Browse files Browse the repository at this point in the history
- correction of arguements for (not) generating inline styles in
view.php
- alt-Tags for images in view.list.php
- fix for undefined variable notice in modify_settings.php
  • Loading branch information
Christoph Bleiweis committed Mar 9, 2018
1 parent 604ac89 commit e8b1155
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
5 changes: 4 additions & 1 deletion wbce/modules/topics/info.php
Expand Up @@ -3,7 +3,7 @@
$module_directory = 'topics';
$module_name = 'Topics';
$module_function = 'page';
$module_version = '0.9.4.2';
$module_version = '0.9.4.3';
$module_status = 'Stable';
$module_platform = '2.8.x';
$module_author = 'Started by Chio Maisriml, www.wbce.at';
Expand All @@ -15,6 +15,9 @@
/**
* Version history
*
* v0.9.4.3 (florian, 02.03.2018)
* - Some fixes for reported bugs (see forum threads)
*
* v0.9.4.2 (Colinax, 19.08.2017)
* - Some adjustments for a better update experience
*
Expand Down
1 change: 1 addition & 0 deletions wbce/modules/topics/modify_settings.php
Expand Up @@ -350,6 +350,7 @@
<?php

//The same like in modify_topic.php - should we make a function?
$picture_dir = ''.$settings_fetch['picture_dir']; //Auch wenn es leer ist
$theothersq = "SELECT section_title, section_id, page_id FROM ".TABLE_PREFIX."mod_".$tablename."_settings WHERE section_id > '0' ORDER BY section_id ASC";
if ($restrict2picdir > 0) {
$theq = "SELECT section_id FROM ".TABLE_PREFIX."mod_".$mod_dir."_settings WHERE section_id > '0' AND picture_dir = '".$picture_dir."'";
Expand Down
8 changes: 4 additions & 4 deletions wbce/modules/topics/view.list.php
Expand Up @@ -3,7 +3,7 @@
if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
if (!isset($tablename)) { exit("No tables defined"); }


$thumb ='';
$autoarchive_action = 0;
$ok = false;
if ($autoarchiveArr != 0) {
Expand Down Expand Up @@ -227,18 +227,18 @@
$picture .= $refreshstring;
if (substr($picture, 0, 7) == 'http://') {
//external file:
$picture_tag = '<img class="tp_pic tp_pic'.$page_id.'" src="'.$picture.'" alt="" />';
$picture_tag = '<img class="tp_pic tp_pic'.$page_id.'" src="'.$picture.'" alt="'.$title.'" title="'.$title.'"/>';
$thumb = '<img style="max-width:'.$w_thumb.'px;" class="tp_thumb_external tp_thumb tp_thumb'.$page_id.'" src="'.$picture.'" alt="" />';
} else {
if ($picture_dir != '') {
$picture_tag = '<img class="tp_pic tp_pic'.$page_id.'" src="'.$picture_dir.'/'.$picture.'" alt="" />';
$picture_tag = '<img class="tp_pic tp_pic'.$page_id.'" src="'.$picture_dir.'/'.$picture.'" alt="'.$title.'" />';
if ($zoomclass != '') {
//Check if there is a picture in folder "zoom"
$zoompic = WB_PATH.$settings_fetch['picture_dir'].'/zoom/'.$picture;
if (file_exists($zoompic)) { $picture_tag = '<a href="'.$picture_dir.'/zoom/'.$picture.'" target="_blank" class="'.$zoomclass.'">'.$picture_tag.'</a>'; }
}
}
$thumb = '<img class="tp_thumb tp_thumb'.$page_id.'" src="'.$picture_dir.'/thumbs/'.$picture.'" alt="" />';
$thumb = '<img class="tp_thumb tp_thumb'.$page_id.'" src="'.$picture_dir.'/thumbs/'.$picture.'" alt="'.$title.'" />';

}
$thumb_tag = $thumb;
Expand Down
2 changes: 1 addition & 1 deletion wbce/modules/topics/view.php
Expand Up @@ -46,7 +46,7 @@


// check if frontend.css file needs to be included into the <body></body> of view.php
if((!function_exists('register_frontend_modfiles') || !defined('MOD_FRONTEND_CSS_REGISTERED')) && file_exists(WB_PATH .'/modules/'.$mod_dir.'/frontend.css')) {
if((!function_exists('register_frontend_modfiles') && !defined('MOD_FRONTEND_CSS_REGISTERED')) && file_exists(WB_PATH .'/modules/'.$mod_dir.'/frontend.css')) {
echo '<style type="text/css">';
include(WB_PATH .'/modules/'.$mod_dir.'/frontend.css');
echo "\n</style>\n";
Expand Down

0 comments on commit e8b1155

Please sign in to comment.