playground view does not show zip code and town

Status: under development
Branch: https://gitlab.com/joomleague/joomleague/tree/3.0.0

Moderator: And_One

bajonos
Newbie
Posts: 4
Joined: Tue Aug 26, 2014 9:39 pm

playground view does not show zip code and town

Postby bajonos » Wed Aug 23, 2017 9:53 am

in template is everything turned on...

:help:

b.

joomleague 3.0.22.57ae969 / joomla 3.7 / http://mladez.spartakhrdlorezy.cz/info/na-brezance

User avatar
Trubadix
.
Posts: 338
Joined: Fri Oct 24, 2008 4:35 pm
Joomleague version: 2.0.x
Location: 31542
Contact:

Re: playground view does not show zip code and town

Postby Trubadix » Sat Sep 02, 2017 7:10 pm

The bad boy is "default_playgroun.php".
All $this fields are filled well and the "COM_JOOMLEAGUE_PLAYGROUND_ADDRESS_FORM" is OK, looks like the class "Countries" is not working well.
The class returns only one of the $this-field.

Code: Select all

   <?php if ($this->playground->address || $this->playground->zipcode): ?>
   <tr>
      <th class='td_r_t' width='30%'><?php echo JText::_('COM_JOOMLEAGUE_PLAYGROUND_ADDRESS'); ?></th>
      <td width='70%'>
         <?php
         echo Countries::convertAddressString(   ' ',
                                       $this->playground->address,
                                       ' ',
                                       $this->playground->zipcode,
                                       $this->playground->city,
                                       $this->playground->country,
                                       'COM_JOOMLEAGUE_PLAYGROUND_ADDRESS_FORM');
         ?>
      </td>
   </tr>
   <?php endif; ?>
Life-System : Joomla 2.5.28 auf Strato, Joomleague 2.0.x
http://www.shootingleague.de/
Test-System: Joomla 3.6.x auf Strato, Joomleague 3.0.x
http://ligatest.ksv-nesselblatt.de/

bajonos
Newbie
Posts: 4
Joined: Tue Aug 26, 2014 9:39 pm

Re: playground view does not show zip code and town

Postby bajonos » Wed Sep 20, 2017 1:28 pm

I dont know what to change. I found "contries.php"

location <==> city ???


Code: Select all

   public static function convertAddressString(   $name='',
                           $address='',
                           $state='',
                           $zipcode='',
                           $location='',
                           $country='',
                           $addressString='COM_JOOMLEAGUE_ADDRESS_FORM')
   {
      $resultString='';

      if ((!empty($address)) ||
          (!empty($state))   ||
          (!empty($zipcode)) ||
          (!empty($location))
        )
      {
         $countryFlag = Countries::getCountryFlag($country);
         $countryName = Countries::getCountryName($country);
         $dummy=Countries::removeEmptyFields($name, $address, $state, $zipcode, $location, $countryFlag, $countryName, JText::_($addressString));
         $dummy=str_replace('%NAME%',$name,$dummy);
         $dummy=str_replace('%ADDRESS%',$address,$dummy);
         $dummy=str_replace('%STATE%',$state,$dummy);
         $dummy=str_replace('%ZIPCODE%',$zipcode,$dummy);
         $dummy=str_replace('%LOCATION%',$location,$dummy);
         $dummy=str_replace('%FLAG%',$countryFlag,$dummy);
         $dummy=str_replace('%COUNTRY%',$countryName,$dummy);
         $resultString .= $dummy;
      }
      $resultString .= '&nbsp;';

      return $resultString;
   }


Return to “3.0.22.57ae969-Blue (Joomla: 3.x)”

Who is online

Users browsing this forum: No registered users and 2 guests

cron