Welcome, Guest
Username: Password: Remember me

TOPIC: change view adverts grid default

change view adverts grid default 4 years 2 months ago #5769

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 4 years 2 months ago #5770

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

Thanks.
The administrator has disabled public write access.

change view adverts grid default 4 years 2 months ago #5773

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 4 years 1 month ago #5953

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 4 years 4 weeks ago #5958

  • Super User
  • Super User's Avatar
  • Offline
  • Administrator
  • Posts: 3019
  • Thank you received: 352
  • Karma: 46
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.130 seconds

Contact us

  No.2/A, Venkateshwara Nagar,
1st Main Road, 100 Feet Road, SBM Towers, Velachery,Chennai - 600 042,India.
 admin@jomclassifieds.com
 skype.jomclassifieds
 
 
Copyright © 2013-2019 Jomclassifieds.com. All rights reserved. The Joomla! name, and logo are used under a limited license granted in the United States and other countries.