cohowap
  •  cohowap
  • 51.8% (Neutral)
  • YAF Forumling Topic Starter
2008-10-23T05:16:32Z
So I did a little modification that I think turned out decent. This one is for DNN users and will allow you to add some forum status to any page you wish. Feel free to adapt this in any fasion, setup steps are below.

1) Add a a column to yaf_board named "PortalUrl". In this, for each of the pages you have a forum module on, enter the tab id. Example from my site

BoardID     Name                                               AllowThreaded PortalUrl
----------- -------------------------------------------------- ------------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1           Warhammer: Age of Reckoning Forums                 1             http://www.elitemmo.com/Default.aspx?tabid=80
2           Final Fantasy XI Forums                            1             http://www.elitemmo.com/Default.aspx?tabid=86
3           Age of Conan Forums                                1             http://www.elitemmo.com/Default.aspx?tabid=87
4           Lord of the Rings Online Forums                    0             http://www.elitemmo.com/Default.aspx?tabid=68
5           Developer's Forums                                 0             http://www.elitemmo.com/Default.aspx?tabid=00
6           Public Portal                                      1             http://www.elitemmo.com/Default.aspx?tabid=74
7           Trader's Forums                                    1             http://www.elitemmo.com/Default.aspx?tabid=88
8           Wardrobe Community Forums                          1             http://www.elitemmo.com/Default.aspx?tabid=93


2) Create a new HTML File as your HTML Visualizer for the Report module and put the following in it.

<table style="width:100%;">
    <tr style="width:100%;">
        <td style="width:60%; text-align:left;">
            <a style="text-decoration: none; color: blue;" href="[posturl]">[Topic]</a>
        </td>
        <td style="width:10%; text-align:center;">[Post Count]</td>
        <td style="width:30%; text-align:center;">[Last Post]<br/>in <a style="text-decoration: none; color: blue;" href="[portalurl]">[BoardName]</a></td>
    </tr>
</table>


3) Go into DNN, create a new "Reports" module and use the following query as the "SQL Command".

For the "Newest 10 Posts"
select top 10 
b.name as [BoardName],
b.portalurl as [portalurl],
b.portalurl + '&g=posts&t=' + cast(t.topicid as varchar(max)) as [posturl],
t.topic as [Topic], 
t.views as [Number of Views], 
t.numposts as [Post Count], 
t.lastposted as [Last Post]
from yaf_topic t
inner join yaf_forum f on t.forumid = f.forumid
inner join yaf_category c on f.categoryid = c.categoryid
inner join yaf_board b on c.boardid = b.boardid
order by posted desc


For the "Most popular 10 Posts"
select top 10 
b.name as [BoardName],
b.portalurl as [portalurl],
b.portalurl + '&g=posts&t=' + cast(t.topicid as varchar(max)) as [posturl],
t.topic as [Topic], 
t.views as [Number of Views], 
t.numposts as [Post Count], 
t.lastposted as [Last Post]
from yaf_topic t
inner join yaf_forum f on t.forumid = f.forumid
inner join yaf_category c on f.categoryid = c.categoryid
inner join yaf_board b on c.boardid = b.boardid
order by t.numposts desc


4) Make the display options "HTML Visualizer" instead of "Grid". Upload the html file you just created and you should be good to go.


You can see a sample of this working at www.elitemmo.com 

Feel free to adjust as wanted.

Sponsor
Boskone
2008-10-23T06:35:38Z
Thanks chowap. This can be very useful.

Boskone - A DotNetNuke user.
RDSCC 
tonymathewt
2009-04-25T04:22:10Z
Hello cohowap
Tried your example and it worked great. But I need the header and make it sortable. Is that possible to do? Please help me.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved