Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    Regular Coder
    Join Date
    Oct 2005
    Thanked 2 Times in 2 Posts

    Modiying PHP code for a Joomla module?

    Hello forum

    I need some help modifying a secton of PHP code which is used in a module for displaying news article headlines.

    The code snippet allows for either a single-column or a two-column layout.

    What I would love to do is add a THIRD column to produce a 3 column layout if desired.

    The single-column layout class is called "singleColumn", and the two-column layout class is called "firstColumn" and "secondColumn".

    I have this snippet from my default.php module code, but I don't really know how to add the option for a third column, can anyone help, I would be very greatful

    PHP Code:
    $singleColumn '';
    $firstColumn $secondColumn '';
    for (
    $b 0; (($this->news_amount - ($b $this->news_column)) > 0); $b++) { 

       for (
    $c 0$c $this->news_column$c++) { 

          if (
    $this->news_column == 1) { 
    $div_class 'single_column_class';  
          } elseif (
    $this->news_column == 2) { 
    $div_class = ($c == 0) ? 'first_column_class' 'second_column_class'
    $column = ($b $this->news_column) + $c
    Im not sure how to code to allow for a third column, could anyone help me out?
    Last edited by moss2076; 08-30-2009 at 07:05 PM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts