-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First batch of module tmpl codestyle #17851
Conversation
modules/mod_banners/tmpl/default.php
Outdated
title="<?php echo htmlspecialchars($item->name, ENT_QUOTES, 'UTF-8'); ?>"> | ||
<img | ||
src="<?php echo $baseurl . $imageurl; ?>" | ||
alt="<?php echo $alt;?>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add space before ?>"
. Do the same for the following 2 lines.
modules/mod_banners/tmpl/default.php
Outdated
title="<?php echo htmlspecialchars($item->name, ENT_QUOTES, 'UTF-8'); ?>"> | ||
<img | ||
src="<?php echo $baseurl . $imageurl; ?>" | ||
alt="<?php echo $alt;?>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add space before ?>"
. Do the same for the following 2 lines.
modules/mod_banners/tmpl/default.php
Outdated
<img | ||
src="<?php echo $baseurl . $imageurl; ?>" | ||
alt="<?php echo $alt;?>" | ||
<?php if (!empty($width)) echo ' width="' . $width . '"';?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add space before ?>"
. Do the same for the following 2 lines.
<?php if (isset($item->link) && $item->readmore != 0 && $params->get('readmore')) : ?> | ||
<?php echo '<a class="readmore" href="' . $item->link . '">' . $item->linkText . '</a>'; ?> | ||
<a class="readmore" href="'<?php echo $item->link; ?>'"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove '
before and after the php code
modules/mod_banners/tmpl/default.php
Outdated
loop="false" | ||
pluginspage="http://www.macromedia.com/go/get/flashplayer" | ||
type="application/x-shockwave-flash" | ||
<?php if (!empty($width)) echo ' width="' . $width . '"';?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add space before ?>
. Do the same below.
modules/mod_banners/tmpl/default.php
Outdated
<?php // Just display the image if no link specified ?> | ||
<img | ||
src="<?php echo $baseurl . $imageurl; ?>" | ||
alt="<?php echo $alt;?>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add space before ?>"
. Do the same for the following 2 lines.
@zero-24 you're killing us, do it in J4... |
<?php if (($key !== $penult_item_key) || $show_last) : ?> | ||
<span class="divider"> | ||
<?php echo $separator; ?> | ||
</span> | ||
<?php endif; ?> | ||
<meta itemprop="position" content="<?php echo $key + 1; ?>"> | ||
<meta itemprop="position" content="<?php echo $key + 1; ?>" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you have added a closing / here but this is not required for html5
It'd actually be better if the code style were consistent across branches. If you're making massive code style changes in only one branch you're making even more merge conflict issues as time goes on. |
So what is your suggestion? Doing it against staging or 4.0? |
Keep going against staging. In theory there should only be one merge that has major conflicts, every merge after that should only deal with lines changed between the two branches. |
|
||
<a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($item->id)); ?>"> | ||
<?php echo $item->title; ?> | ||
<?php if ($params->get('numitems')) : ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 18-20: Remove tab
<?php echo $readmore; ?> | ||
<?php echo JHtml::_('string.truncate', $item->title, $params->get('readmore_limit')); ?> | ||
<?php if ($params->get('show_readmore_title', 0) != 0) : ?> | ||
<?php echo JHtml::_('string.truncate', $this->item->title, $params->get('readmore_limit')); ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 66-68: Don't indent?
<?php endif; ?> | ||
<?php if ($params->get('show_readmore')) : ?> | ||
<p class="mod-articles-category-readmore"> | ||
<a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?>"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm can you please doube check that? Looks good to me?
</span> | ||
<?php endif; ?> | ||
<?php if ($item->displayDate) : ?> | ||
<span class="mod-articles-category-date"><?php echo $item->displayDate; ?></span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple lines.
modules/mod_custom/tmpl/default.php
Outdated
|
||
?> | ||
<div class="custom<?php echo $moduleclass_sfx; ?>" <?php if ($params->get('backgroundimage')) : ?> style="background-image:url(<?php echo $params->get('backgroundimage'); ?>)"<?php endif; ?> > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove space > >
@@ -9,29 +9,29 @@ | |||
|
|||
defined('_JEXEC') or die; | |||
|
|||
foreach ($list as $item) : ?> | |||
?> | |||
<?php foreach ($list as $item) : ?> | |||
<li <?php if ($_SERVER['REQUEST_URI'] === JRoute::_(ContentHelperRoute::getCategoryRoute($item->id))) echo ' class="active"'; ?>> <?php $levelup = $item->level - $startLevel - 1; ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove space after <li
.
Move the second <?php
next line.
<?php if ($params->get('show_readmore')) : ?> | ||
<p class="mod-articles-category-readmore"> | ||
<li> | ||
<div class="mod-articles-category-group"><?php echo $group_name; ?></div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple lines?
@@ -10,13 +10,13 @@ | |||
defined('_JEXEC') or die; | |||
?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add blank line above.
Is it possible to add lines when editing a file using Github web interface?
I have tested this item ✅ successfully on d46f2c1 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17851. |
Summary of Changes
First batch of module tmpl codestyle
Testing Instructions
Please test and review the following frontend modules using the testing sampledata
Expected result
Still works
Actual result
Works with codestyle problems
Documentation Changes Required
none