Jump to content

pioneer1

New Members
  • Posts

    4
  • Joined

  • Last visited

pioneer1's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks Afaaro that did the trick. The layout looks right now.
  2. I see the 2 cells gets wider as more text are typed in the description. Is there a way to fix the cells of the table not to expand (It must stay the same size) how can the description amount of text be limited e.g. 50 characters. (Maybe wrap the description text when it reaches edge of cell in table) Here is the code echo "<br />".$row->ad_text.""; Thank you function displayContents($contents,$nbimages) { $configurationmodel =$this->getModel( "configuration" ); $conf = $configurationmodel->getConfiguration(); ?> <h1 class="contentheading"><?php echo JText::_('ADSMANAGER_LAST_ADS');?></h1> <div class='adsmanager_box_module' align="center"> <table class='adsmanager_inner_box' width="100%"> <?php $nb_cols = $conf->nb_last_cols; $col = 0; foreach($contents as $row) { if ($col == 0) echo '<tr align="center">'; $col++; ?> <td> <?php $linkTarget = TRoute::_("index.php?option=com_adsmanager&view=details&id=".$row->id."&catid=".$row->catid); if (isset($row->images[0])) { echo "<div align='center'><a href='".$linkTarget."'><img src='".$this->get('baseurl')."/images/com_adsmanager/ads/".$row->images[0]->thumbnail."' alt='".htmlspecialchars($row->ad_headline)."' border='0' /></a>"; } else if ($conf->nb_images > 0) { echo "<div align='center'><a href='".$linkTarget."'><img src='".ADSMANAGER_NOPIC_IMG."' alt='nopic' border='0' /></a>"; } echo "<br /><a href='$linkTarget'>".$row->ad_headline."</a>"; //echo "<br />".$row->ad_headline.""; echo "<br />".$row->ad_text.""; echo "<br /><span class=\"adsmanager_cat\">(".htmlspecialchars($row->parent)." / ".htmlspecialchars($row->cat).")</span>"; //echo "<br />".$this->reorderDate($row->date_created); echo "</div>"; ?> </td> <?php if ($col == $nb_cols) { echo "</tr>"; $col = 0; } } if ($col != 0) { echo "</tr>"; } ?> </table>
  3. Thank you for answer afaaro, I tried it and it worked. Thanks for the great tip
  4. pioneer1

    Hi

    Hi all, I'm from South Africa and are a beginner in php. Hope that i will learn alot here:) Thank you
  5. Hi, How can I get the title and description to the right of the image? So the image will be left in cell and title and description next to the image in the next cell. ben-ct.co.za/ben-bank/offerings Have a look at the attached image. Thank you Here is the code below function displayContents($contents,$nbimages) { $configurationmodel =$this->getModel( "configuration" ); $conf = $configurationmodel->getConfiguration(); ?> <h1 class="contentheading"><?php echo JText::_('ADSMANAGER_LAST_ADS');?></h1> <div class='adsmanager_box_module' align="center"> <table class='adsmanager_inner_box' width="100%"> <?php $nb_cols = $conf->nb_last_cols; $col = 0; foreach($contents as $row) { if ($col == 0) echo '<tr align="center">'; $col++; ?> <td> <?php $linkTarget = TRoute::_("index.php?option=com_adsmanager&view=details&id=".$row->id."&catid=".$row->catid); if (isset($row->images[0])) { echo "<div align='center'><a href='".$linkTarget."'><img src='".$this->get('baseurl')."/images/com_adsmanager/ads/".$row->images[0]->thumbnail."' alt='".htmlspecialchars($row->ad_headline)."' border='0' /></a>"; } else if ($conf->nb_images > 0) { echo "<div align='center'><a href='".$linkTarget."'><img src='".ADSMANAGER_NOPIC_IMG."' alt='nopic' border='0' /></a>"; } echo "<br /><a href='$linkTarget'>".$row->ad_headline."</a>"; //echo "<br />".$row->ad_headline.""; echo "<br />".$row->ad_text.""; echo "<br /><span class=\"adsmanager_cat\">(".htmlspecialchars($row->parent)." / ".htmlspecialchars($row->cat).")</span>"; //echo "<br />".$this->reorderDate($row->date_created); echo "</div>"; ?> </td> <?php if ($col == $nb_cols) { echo "</tr>"; $col = 0; } } if ($col != 0) { echo "</tr>"; } ?> </table>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.