Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated

Overview dialog — wrong zones formatting

8 years 4 months ago
  • Igor's Avatar
    Topic Author
  • Igor
  • Offline
  • Fresh Boarder
  • Thank you received: 2
Licenses:
JomSocial Expired AdAgency Expired iSEO Expired Socialize Expired

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; ?>

Attachments:
8 years 4 months ago
Licenses:

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.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
The following user(s) said Thank You: Igor
8 years 4 months ago
  • Igor's Avatar
    Topic Author
  • Igor
  • Offline
  • Fresh Boarder
  • Thank you received: 2
Licenses:
JomSocial Expired AdAgency Expired iSEO Expired Socialize Expired

Hi, Michal!
6.0.2. I will update to 6.0.6 to see if the issue was addressed in one of the releases. Sorry, project is still in development.

8 years 4 months ago
  • Igor's Avatar
    Topic Author
  • Igor
  • Offline
  • Fresh Boarder
  • Thank you received: 2
Licenses:
JomSocial Expired AdAgency Expired iSEO Expired Socialize Expired

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.

8 years 4 months ago
  • Igor's Avatar
    Topic Author
  • Igor
  • Offline
  • Fresh Boarder
  • Thank you received: 2
Licenses:
JomSocial Expired AdAgency Expired iSEO Expired Socialize Expired

Attachments do not work.
Fallback link: wikisend.com/download/831386/6.0.6%20patch.rar

8 years 4 months ago
Licenses:

Hi, Igor.

I assign developer to this thread.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
The following user(s) said Thank You: Igor
8 years 2 months ago
Licenses:

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.

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW