From 16354b3da098259ad61bfdfe6eb47ae99e2e7e11 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 6 Apr 2022 14:21:35 -0700 Subject: [PATCH] Bootstrap 5 template tweaks. --- .../shortcodes/batch/news_shortcodes.php | 2 +- e107_core/templates/contact_template.php | 14 +++++----- e107_core/templates/page_template.php | 2 +- e107_plugins/gallery/e_shortcode.php | 10 +++---- .../gallery/templates/gallery_template.php | 26 +++++++++++-------- .../news/templates/news_grid_template.php | 2 +- .../signin/templates/signin_template.php | 2 +- e107_themes/bootstrap5/style.css | 13 +++------- e107_themes/bootstrap5/theme.php | 6 ++--- e107_themes/bootstrap5/theme.xml | 4 +-- 10 files changed, 40 insertions(+), 41 deletions(-) diff --git a/e107_core/shortcodes/batch/news_shortcodes.php b/e107_core/shortcodes/batch/news_shortcodes.php index 0ff305caa..3ae088d86 100644 --- a/e107_core/shortcodes/batch/news_shortcodes.php +++ b/e107_core/shortcodes/batch/news_shortcodes.php @@ -626,7 +626,7 @@ class news_shortcodes extends e_shortcode function sc_news_author_avatar($parm=null) { - if(!empty($this->news_item['user_id']) && !empty($this->news_item['user_image'])) + if((!empty($this->news_item['user_id']) && !empty($this->news_item['user_image'])) || !empty($parm['placeholder'])) { return e107::getParser()->toAvatar($this->news_item, $parm); } diff --git a/e107_core/templates/contact_template.php b/e107_core/templates/contact_template.php index 7e7c9c005..46ebe7574 100644 --- a/e107_core/templates/contact_template.php +++ b/e107_core/templates/contact_template.php @@ -85,7 +85,7 @@ $CONTACT_TEMPLATE['menu'] = ' // Shortcode wrappers. $CONTACT_WRAPPER['form']['CONTACT_IMAGECODE'] = "
{---}"; -$CONTACT_WRAPPER['form']['CONTACT_IMAGECODE_INPUT'] = "{---}
"; +$CONTACT_WRAPPER['form']['CONTACT_IMAGECODE_INPUT'] = "{---}"; $CONTACT_WRAPPER['form']['CONTACT_EMAIL_COPY'] = "
{---}{LAN=CONTACT_07}
"; $CONTACT_WRAPPER['form']['CONTACT_PERSON'] = "
{---}
"; @@ -95,26 +95,26 @@ $CONTACT_WRAPPER['form']['CONTACT_PERSON'] = "
{CONTACT_PERSON} -
+
{CONTACT_NAME}
-
+
{CONTACT_EMAIL}
-
+
{CONTACT_SUBJECT}
{CONTACT_EMAIL_COPY} -
+
{CONTACT_BODY}
{CONTACT_IMAGECODE} {CONTACT_IMAGECODE_INPUT} -
+
{CONTACT_GDPR_LINK}
@@ -123,7 +123,7 @@ $CONTACT_TEMPLATE['form'] = " -
+
{CONTACT_SUBMIT_BUTTON}
"; diff --git a/e107_core/templates/page_template.php b/e107_core/templates/page_template.php index 2331fd188..aacb0cd8c 100644 --- a/e107_core/templates/page_template.php +++ b/e107_core/templates/page_template.php @@ -46,7 +46,7 @@ $PAGE_TEMPLATE['default']['body'] = '
{CPAGERATING} - {CPAGEEDIT} + {CPAGEEDIT} '; diff --git a/e107_plugins/gallery/e_shortcode.php b/e107_plugins/gallery/e_shortcode.php index 09665aba8..81d0a053f 100644 --- a/e107_plugins/gallery/e_shortcode.php +++ b/e107_plugins/gallery/e_shortcode.php @@ -193,13 +193,13 @@ class gallery_shortcodes extends e_shortcode return e107::getUrl()->create('gallery'); } - function sc_gallery_cat_thumb($parm = '') + function sc_gallery_cat_thumb($parm = null) { $parms = eHelper::scParams($parm); - - $w = vartrue($parms['w']) ? $parms['w'] : 300; // 260; - $h = vartrue($parms['h']) ? $parms['h'] : 200; // 180; + $w = !empty($parms['w']) ? $parms['w'] : 300; // 260; + $h = !empty($parms['h']) ? $parms['h'] : 200; // 180; $att = 'aw=' . $w . '&ah=' . $h . '&x=1'; // 'aw=190&ah=150'; + $class = isset($parms['class']) ? $parms['class'] : 'img-responsive img-fluid'; $url = e107::getUrl()->create('gallery/index/list', $this->var); @@ -209,7 +209,7 @@ class gallery_shortcodes extends e_shortcode } $text = ""; - $text .= ""; + $text .= ""; $text .= ""; return $text; } diff --git a/e107_plugins/gallery/templates/gallery_template.php b/e107_plugins/gallery/templates/gallery_template.php index e8ad2daa1..b54279303 100644 --- a/e107_plugins/gallery/templates/gallery_template.php +++ b/e107_plugins/gallery/templates/gallery_template.php @@ -12,24 +12,26 @@ $GALLERY_TEMPLATE['list']['caption'] = LAN_PLUGIN_GALLERY_TITLE; $GALLERY_TEMPLATE['list']['start'] = '{GALLERY_BREADCRUMB} -