11
ajaxbr
Re: Two column headline feed?
  • 2004/6/5 3:55

  • ajaxbr

  • Quite a regular

  • Posts: 276

  • Since: 2003/10/25


Starting my test server...
I'll try breaking the loop, any other ideas welcome

12
ajaxbr
Re: Two column headline feed?
  • 2004/6/5 5:06

  • ajaxbr

  • Quite a regular

  • Posts: 276

  • Since: 2003/10/25


Done. You have to know what are your feed numbers (edit those <{if}> clauses accordingly). I guess that you'll have to find a better way to set feed numbers than to hardcode them, you can improve this a lot
Good luck!

Copy the code bellow and save as /modules/xoopsheadline/blocks/headline_block.html (backup your original file first)
<{if $site_id == 1}>
<
table>
<{/if}>
<{if 
$site_id == || $site_id == 3}>
<
tr>
<{/if}>
<
td><h3>This is your feed number <{$site_id}>h3>
<
a href="<{$site_url}>" target="_blank"><{$site_name}>a><br />
<{if 
$image.url != ""}>
  <
img src="<{$image.url}>" width="<{$image.width|default:88}>" height="<{$image.height|default:31}>" alt="<{$image.title}>" /><br />
<{/if}>

<
ul>
<{
section name=i loop=$items}>
  <{if 
$items[i].title != ""}>
  <
li><a href="<{$xoops_url}>/modules/xoopsheadline/index.php?id=<{$site_id}>#<{$items[i].link}>"><{$items[i].title}>a>li>
  <{/if}>
<{/
section}>
ul
td>
<{if 
$site_id == || $site_id == 4}>
tr>
<{/if}>
<{if 
$site_id == 4}>
table>
<{/if}>

13
philroy
Re: Two column headline feed?
  • 2004/6/5 9:26

  • philroy

  • Friend of XOOPS

  • Posts: 107

  • Since: 2003/8/23


That is superb....thank you so so much!

It didn't work at first, but this was because I didn't read which file to update (I was playing around with templates) but once I re-read your instructions, as well as using phpMyAdmin to set each site_id to the number I wanted, it is all working.

Thank you once again.

Phil

14
ssmddan
Re: Two column headline feed?
  • 2004/6/6 22:49

  • ssmddan

  • Just popping in

  • Posts: 6

  • Since: 2004/6/6 2


wow what a great trick. thats something ive been trying to do for a while. but when i tried it only the title of each feed was a link. all the headlines werent linked to anything. they were just normal text. anyone have any ideas what the problem could be? additionaly, does anyone know how i could split my rss feeds and half two of them on the left side in a block and the two on the right side in a separate block?

15
ajaxbr
Re: Two column headline feed?
  • 2004/6/6 23:02

  • ajaxbr

  • Quite a regular

  • Posts: 276

  • Since: 2003/10/25


Quote:

ssmddan wrote:
but when i tried it only the title of each feed was a link. all the headlines werent linked to anything. they were just normal text. anyone have any ideas what the problem could be?
If you made changes to templates, you might have broken a variable, like I always do, by mising a { or a $
edit: see how I missed a 's' above?

Quote:

ssmddan wrote:
additionaly, does anyone know how i could split my rss feeds and half two of them on the left side in a block and the two on the right side in a separate block?

You can try cloning blocks. If you make that work for RSS feeds, please describe how

16
hw888
Re:Two column headline feed?
  • 2004/10/31 1:09

  • hw888

  • Just popping in

  • Posts: 15

  • Since: 2004/10/9


possible to do something like this:

1.....6
2.....7
3.....8
4.....9
5.....10

17
hw888
Re:Two column headline feed?
  • 2004/11/1 13:09

  • hw888

  • Just popping in

  • Posts: 15

  • Since: 2004/10/9


anyone? cos currently i'm having 5 feeds (of reviews and news), looking forward to add another 5 feeds (of price listings).

18
xiaoca
Re:Two column headline feed?
  • 2004/11/3 17:07

  • xiaoca

  • Just popping in

  • Posts: 6

  • Since: 2004/10/18


I was also looking for solution for my website's(Toronto Chinese Yellow Pages) headline session. I have 3 columns. After a while, i decided to dig into the code myself.

I found it it is easier to use the "headline_weight" for the logic. Here is what I have done.
1. Weight your RSS list(Sorting sequence) throught the headline administration
2. Assign the 'weight' variable in .../xoopsheadline/index.php
$xoopsTpl->append('feed_sites', array('id' => $headlines[$i]->getVar('headline_id'), 'weight' => $headlines[$i]->getVar('headline_weight'), 'name' => $headlines[$i]->getVar('headline_name')));


3. Change the custome template to have the logic, which in my case I have 3 columns.
<table border="0" cellspacing="2" cellpadding="2">
<
tr>         
      
    <{foreach 
item=site from=$feed_sites}>      
        <
td valign="top" width=33%">images/news.gif"><{$xoops_url}>/modules/xoopsheadline/index.php?id=<{$site.id}>">#0000EE"><{$site.name}>
     
<{if $site.weight is div by 3}>
    tr><tr>
    <{/if}>
      <{/foreach}>
   
tr>
table>

4. Here is the layout from my website.
RSS News Feed


------------------------------
xiao.ca
Toronto Chinese Business Directory

19
ajaxbr
Re:Two column headline feed?
  • 2004/11/3 17:23

  • ajaxbr

  • Quite a regular

  • Posts: 276

  • Since: 2003/10/25


Great idea, xiaoca! Classy and much easier to adapt too

hw888: you'd only have to change the line <{if $site.weight is div by 3}> to "div by 2" and it'd be like you wanted.

20
defwind77
Re: Two column headline feed?
  • 2005/12/28 20:44

  • defwind77

  • Not too shy to talk

  • Posts: 180

  • Since: 2005/11/11


hey this is what I've been looking for - I'm using smartsection and recent items block - can anyone tell me what I need to edit to get this into three columns?

Many thanks!

Login

Who's Online

350 user(s) are online (218 user(s) are browsing Support Forums)


Members: 0


Guests: 350


more...

Donat-O-Meter

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

Latest GitHub Commits