1
brash
A News 1.2 Module Request/Question Or Two
  • 2004/6/5 6:42

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Hi All,

Been playing around with the new News module, and am loving it. I really like being able to select the amount columns as this is something I've been looking to be able to do for a while now.

I selected a 2 coloumn layout and one thing I thought would make it better was to add more options for the "Select the number of news items to display on top page" setting so that I could display a equal amount of articles in each column. I did this by editing line 176 of modules/news/xoops_version.php which looks something like this;

Quote:
$modversion['config'][1]['options'] = array('5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30);


I added options for all numbers between 1 and 10 that weren't already there which has given me the display options I want.

This is all good, but the columns are still of unequal length. Is there anyway I can edit the News module so that it automatically pads out the boarders of each coloumn so they are all the same length?


2
Mithrandir
Re: A News 1.2 Module Request/Question Or Two

I think you'll need to go into the template and change things there.

Currently, the news items are loaded into x cells, where x is the number of columns, based on number of news items. Like this:
<tr>
   <
td>Item 1
       Item 3
       etc
.
   </
td>
   <
td>
       
Item 2
       Item 4
       etc
.
   </
td>
</
tr>
[
code]

It should be possible to change it to have a structure like this:
[
code]
<
tr>
    <
td>
        
Item 1
    
</td>
    <
td>
        
Item 2
    
</td>
</
tr>
<
tr>
    <
td>
        
Item 3
    
</td>
    <
td>
        
Item 4
    
</td>
</
tr>
etc.

3
brash
Re: A News 1.2 Module Request/Question Or Two
  • 2004/6/5 11:54

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Cool, thanks Mith I'll give it a shot

4
Mithrandir
Re: A News 1.2 Module Request/Question Or Two

You may have to change the way the news items are assigned to smarty - they are currently in one array with x indexes... possibly it would be better to just have one array with the individual items and then let it be up to the template to put them in the right spots.

5
brash
Re: A News 1.2 Module Request/Question Or Two
  • 2004/6/5 12:26

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Ok, think that might be a little beyond me at this point. Might have to study up a bit

6
JackJ
Re: A News 1.2 Module Request/Question Or Two
  • 2004/6/7 19:46

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


I have set some columns up at my site using the News Templates--any "extra odd" column appears automatically at 100%. I am trying to do this in the new News module but struggling as the column code is hard-coded into the php. If I have any success I will get back to you.

I currently use Chapi's News with Spaw hack and it has the linebreaks text sanitizor thing catered for so no extra unwanted vast spaces in the HTML output. Presently I use a bit of code in the xoops_version.php in News to hide the submenu's from unregistered users or any other groups, so this does the job just now till I upgrade

Login

Who's Online

235 user(s) are online (156 user(s) are browsing Support Forums)


Members: 0


Guests: 235


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits