1
martyras
Make a latest news block match the one from news2
  • 2004/11/27 13:36

  • martyras

  • Just popping in

  • Posts: 37

  • Since: 2004/11/1


Hi my helpful friends,

I was using on my site as a start page the news modules when i lately discovered that whatever i would add to be displayed in the start page, would be displayed at the news pages also (probably cause i have set news as the start page).

I used then spotlight but the "other news" option that it has, doesn't fills me cause it's different from the news layout.

So i came to the conclusion to make a module on my own so I can display the latest news on frontpage without specifying news as start page.

For my module, i made the /template/blocks/all_news.htm look like this:

<table cellpadding="0" cellspacing="0" class="item">
    <
tr>
        <
td>
        <
table cellpadding="0" cellspacing="0" width="98%">
            <
tbody>
                <
tr>
                    <
td class="itemHead">
                        <
span class="itemTitle"><{$story.title}></span>
                    </
td>
                </
tr>
                <
tr>
                    <
td class="itemInfo">
                        <{if 
$story.poster != ''}><span class="itemPoster"><{$lang_postedby}> <{$story.poster}></span><{/if}>
                        <
span class="itemPostDate"><{$lang_on}> <{$story.posttime}></span> (<span class="itemStats"><{$story.hits}> <{$lang_reads}></span>)
                    </
td>
                </
tr>
                <
tr>
                    <
td><div class="itemBody">
                            <{
$story.imglink}>
                            <
class="itemText"><{$story.text}></p>
                        </
div>
                    </
td>
                </
tr>
                <
tr>
                    <
td class="itemFoot">
                        <
span class="itemAdminLink"><{$story.adminlink}></span>
                        <
span class="itemPermaLink"><{$story.morelink}></span>
                    </
td>
                </
tr>
             </
tbody>
         </
table>
      </
td>
  </
tr>
</
table>


Now I need the blocks/all_news.php code so it could read the values for the above template to be shown correctly. I have searched the news2 module but I cannot find a way through the code. I only need the part which news2 module reads the latest news to be displayed on index (start page).

This will help a lot people I think.

Thank you.

2
martyras
Re: Make a latest news block match the one from news2
  • 2004/11/27 14:48

  • martyras

  • Just popping in

  • Posts: 37

  • Since: 2004/11/1


I made a mistake. Where i say news2 it's actually news 1.2.1. Sorry.

Thanks for viewing.

3
martyras
Re: Make a latest news block match the one from news2
  • 2004/11/27 18:05

  • martyras

  • Just popping in

  • Posts: 37

  • Since: 2004/11/1


After a 2 hours search i found this hack:

https://xoops.org/modules/newbb/viewtopic.php?topic_id=23240&viewmode=flat&order=ASC&start=10

But the problem is that html code works only for links. It seems not to recognise html <img>, for example:

Quote:
<img border="0" src="/temp/xoops/images/news/01.jpg" width="210" height="171" align="left" hspace="4">


Does any of the guys made this hack can help me one this?

Thanks again.

4
martyras
Re: Make a latest news block match the one from news2
  • 2004/11/28 9:30

  • martyras

  • Just popping in

  • Posts: 37

  • Since: 2004/11/1


Posted a solution i've found on that topic. Whoever wants to help or see the hack visit that topic.

Happy xooping.

5
perhol
Re: Make a latest news block match the one from news2
  • 2004/12/4 19:58

  • perhol

  • Just popping in

  • Posts: 22

  • Since: 2004/2/11


WOW - Finally - Thank u so much

Login

Who's Online

256 user(s) are online (151 user(s) are browsing Support Forums)


Members: 0


Guests: 256


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