ISSUE SUMMARY:
Wring template markup in \components\com_adagency\views\adagencyadvertisers\tmpl\overview.php.
Page: /ru/component/adagency/adagencyAdvertisers/overview
In short: bad PHP tags nesting leads to closing list tags (</ul>) being not generated.
STEPS TO REPLICATE:
Assign several zones to single package, navigate to Overview menu item/dialog.
RESULT
Each new zone description is rendered as last list item of the previous zone, thus creating ladder effect with paddings.
EXPECTED RESULT
No extra paddings for each zone in the package.
SOLUTION
Reformatted code block is attacked below, the whole overview.php file is attached to the post.
<?php if ($showZoneInfo): ?>
<div class="uk-width-medium-1-3">
<div class="ada-package-zone">
<?php if (isset($order->location) && (is_array($order->location))):
foreach ($order->location as $element):
$element->adparams = @unserialize($element->adparams);
if ($element->rotatebanners == 1) {
$element->rotatebanners = JText::_("ADAG_YES");
} else {
$element->rotatebanners = JText::_("ADAG_NO");
}
if ($showpreview == 1) {
$sz_before = "<a class=\"modal2\" href=\"".JURI::root().'index.php?option=com_adagency&controller=adagencyPackages&task=preview&tmpl=component&no_html=1&cid='.$element->id.$Itemid."\">";
$sz_after = "</a>";
} else {
$sz_before = NULL;
$sz_after = NULL;
}
?>
<h4 class="ada-package-title uk-h4">
<!-- Zone info -->
<?php echo JText::_('NEWADZONE').": ".$sz_before.$element->title.$sz_after; ?>
</h4>
<ul class="ada-package-list uk-list uk-list-line">
<li>
<!-- Rotation info -->
<span><?php echo JText::_("ADAG_ROTATION")."</span>: ".$element->rotatebanners; ?>
</li>
<li>
<!-- Size info -->
<?php
if (isset($element->adparams['width']) && isset($element->adparams['height']) && ($element->adparams['width'] != "") && ($element->adparams['height'] != "")) {
echo "<span>".JText::_("VIEWADSIZE")."</span>: ".$element->adparams['width']." x ".$element->adparams['height']." px";
} else {
echo "<span>".JText::_("VIEWADSIZE")."</span>: ".JText::_('ADAG_ANYSIZE');
}
?>
</li>
<li>
<!-- Slots info -->
<?php echo "<span>".JText::_('ADAG_SLOTS')."</span>: ".$element->rows*$element->cols." (".$element->rows. " " . JText::_("ADAG_ROWS").", ".$element->cols . " " . JText::_("ADAG_COLS").")"; ?>
</li>
<li>
<!-- Type info -->
<?php
echo "<span>".JText::_('VIEWADTYPE')."</span>: ";
$before = false;
if (isset($element->adparams['standard']) || isset($element->adparams['affiliate']) || isset($element->adparams['flash'])) {
echo "<em>".JText::_("VIEW_CAMPAIGN_MEDIA_BANNERS").":</em> ";
if(isset($element->adparams['standard'])) {
echo JText::_('VIEWTREEADDSTANDARD');
$before = true;
}
}
if (isset($element->adparams['affiliate'])) {
if($before) {
echo ", ";
}
echo JText::_('VIEWTREEADDADCODE');
$before = true;
}
if (isset($element->adparams['flash'])) {
if($before) {
echo ", ";
}
echo JText::_('VIEWTREEADDFLASH');
} elseif (isset($element->adparams['textad'])) {
echo JText::_('VIEWTREEADDTEXTLINK');
} elseif (isset($element->adparams['popup']) || isset($element->adparams['transition']) || isset($element->adparams['floating'])) {
if(isset($element->adparams['popup'])){
echo JText::_('VIEWTREEADDPOPUP');
$before = true;
}
if(isset($element->adparams['transition'])) {
if($before){
echo ", ";
}
echo JText::_('VIEWTREEADDTRANSITION');
$before = true;
}
if(isset($element->adparams['floating'])) {
if($before){
echo ", ";
}
echo JText::_('VIEWTREEADDFLOATING');
}
} // .elseif
?>
</li>
</ul>
<?php endforeach; ?>
<?php endif; ?>
</div><!-- .ada-package-zone -->
</div><!-- .uk-width-medium-1-3 -->
<?php endif; ?>
Hi, Igor.
Thank you for reporting it.
What version of AdAgency do you use?
Please provide us working administrator credentials.
I can't login to your site.
Please, edit your first post and add credentials to corresponding fields.
Michal, could you send this post link to developers? I've attacked a small patch.
Changes to version 6.0.6:
-) Fixed usage of raw addresses starting with "index.php" in HTML markup, replaced with JRoute wrappers. Compatibility with SEF mode was thus improved.
-) Fixed relative index.php addresses in links and form actions (href="index.php", action="index.php") to absolute addresses (/index.php). Relative addresses are incompatible with SEF routing, ex. site.com/en/index.php is invalid URL.
-) Fixed "ladder" effect/broken markup, described in this topic, in adagencyadvertisers\tmpl\overview.php. Same issue was fixed by AdAgency team in packages template in 6.0.3..6.0.6 versions.
I've attached patch to the post. The patch includes only changed files and git diff file, as compared to original 6.0.6 version.
Attachments do not work.
Fallback link:
wikisend.com/download/831386/6.0.6%20patch.rar
Hi, Igor.
I assign developer to this thread.
Hi Igor,
Can you please attach again that file? Somehow I miss this post and the attachment is no more available. Or you can send it to me directly to This email address is being protected from spambots. You need JavaScript enabled to view it.
Thank you.