Welcome, Guest
Username: Password: Remember me

TOPIC: change view adverts grid default

change view adverts grid default 1 year 3 months ago #5769

  • Alexandr
  • Alexandr's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Karma: 0
Hi i wanna replace on adverts page (grid view) extra fields on place where show description in "/html/com_jomclassifieds/adverts/default_grid.php"
<?php if($item->description !='') {  ?>
         	<div class="jomcldesc muted"> <?php echo JomclUtils::Truncate($item->description, $config->desccharslimit); ?> </div>
      <?php } ?>

i replace same code as in advert page
<?php if(count($extrafields) > 0 ) {  ?>
         	<div class="jomcldesc muted">
              <table class="table table-striped">
       <tbody>              
<?php 	foreach($extrafields as $extrafield) :	?>
      	<tr>
           <td class="span4 col-md-4"><?php echo $extrafield->label; ?></td>
           <td class="span8 col-md-8"><?php echo $extrafield->value; ?></td>
        </tr>
 <?php endforeach; ?>       
       </tbody>
      </table> </div>
      <?php } ?>
but how can i see this part of code not loaded, what wrong?
The administrator has disabled public write access.

change view adverts grid default 1 year 3 months ago #5770

  • Super User
  • Super User's Avatar
  • Offline
  • Administrator
  • Posts: 2763
  • Thank you received: 292
  • Karma: 40
Plz check whether you have connected your DB in that file.

Thanks.
The administrator has disabled public write access.

change view adverts grid default 1 year 3 months ago #5773

  • Alexandr
  • Alexandr's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Karma: 0
i dont have enough knowledge in programming and not understand what i need to check, try insert this part of code
$item = $this->item;
$extrafields = $this->extrafields;
$itemId = JRequest::getInt('Itemid');
$user = JFactory::getUser($item->userid);
$Favourites = JFactory::getUser();
but extrafields still not loaded
The administrator has disabled public write access.

change view adverts grid default 1 year 1 month ago #5953

  • Alexandr
  • Alexandr's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Karma: 0
if copy full description block than i have warning
Warning: Invalid argument supplied for foreach() in /home/virtwww/w_psd_13cbbf21/http/templates/gk_magazine/html/com_jomclassifieds/adverts/default_grid.php on line 134
for this part of code
<?php 	foreach($extrafields as $extrafield) :	?>
      	<tr>
           <td class="span4 col-md-4"><?php echo $extrafield->label; ?></td>
           <td class="span8 col-md-8"><?php echo $extrafield->value; ?></td>
        </tr>
<?php endforeach; ?>
The administrator has disabled public write access.

change view adverts grid default 1 year 1 month ago #5958

  • Super User
  • Super User's Avatar
  • Offline
  • Administrator
  • Posts: 2763
  • Thank you received: 292
  • Karma: 40
Kindly send your site URL where face this issue. So that we will check and update you.

Thanks.
The administrator has disabled public write access.
Time to create page: 0.204 seconds