Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
User Site Design, Integration and Customization:
Recent News Widget
SoundCafe



Joined: 23 Sep 2012
Posts: 21

Posted: 01/11/13 19:52 
I am trying to create a widget to show recent news in the cp, somehow i cannot get it to display the recent news like i want. I would like it to show the news item title, a few lines from the news item, the date, and category of the news item.

This is what i have so far:

login_note.tpl

<div class="widget-content">

<ul class="news-items">
<li>
{jr_ranking mode="blog" band_id="0" order="1" category="News" row_template="blog_news_row_2.tpl" pagebreak=1 pagenum=1}


</li>
<li>
{jr_ranking mode="blog" band_id="0" order="1" category="News" row_template="blog_news_row_2.tpl" pagebreak=1 pagenum=2}

</li>
<li>
{jr_ranking mode="blog" band_id="0" order="1" category="News" row_template="blog_news_row_2.tpl" pagebreak=1 pagenum=3}


</li>
</ul>

</div> <!-- /widget-content -->

blog_news_row_2.tpl
<div class="news-item-detail">
<a href="{$JAMROOM_URL}/ranking.php?mode=blog&message_id={$MESSAGE_ID}&row_template=blog_news_row.tpl" class="news-item-title">{$MESSAGE_TITLE}</a>
<p class="news-item-preview">{$MESSAGE_TEXT|nl2br|jr_bbdecode|jr_safe_truncate:80}</p>
</div>

<div class="news-item-date">
<span class="news-item-day">{$MESSAGE_TIME|jr_date_format:"date2"}</span>
<span class="news-item-month">{$MESSAGE_CATEGORY}</span>
</div>

Any help will be greatly appreciated.

Back to top
SteveX
Ultrabubble


Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble

Posted: 01/12/13 04:02 
You would use one ranking call, with show="3" rather than 3 ranking calls. It's all covered in great detail in the documentation:

http://www.jamroom.net/Jamroom4_Ranking_System
http://www.jamroom.net/Jamroom4_ranking_common_variables
http://www.jamroom.net/Jamroom4_ranking_blog


_________________
Kulshi Mezian!

"Stranger from another planet, welcome to our hole. Just strap on your guitar and we'll play some rock and roll"

Ultrabubble create things.
Back to top
SoundCafe



Joined: 23 Sep 2012
Posts: 21

Posted: 01/12/13 06:13 
just tried that, nothing changes. i have a ranking call similar to that for a carousel, with the page-breaks i mean, its working perfectly. can't figure out what's wrong with this one, the code makes sense to me though.

Back to top
SteveX
Ultrabubble


Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble

Posted: 01/12/13 06:18 
It does change, you are making 1 ranking call not 3, which is the right way to do it, rather than the wrong way.

You will want to change your carousel ranking calls as well.

What are you seeing output to the page? A link would be easiest.


_________________
Kulshi Mezian!

"Stranger from another planet, welcome to our hole. Just strap on your guitar and we'll play some rock and roll"

Ultrabubble create things.
Back to top
SoundCafe



Joined: 23 Sep 2012
Posts: 21

Posted: 01/12/13 06:26 
that's the funny part, no output at all, not even a coma, nothing.unless if maybe there is an issue with directories, the widget itself is in the cp folder, but the row_template is in the skin dir. i don't know why, but its totally blank. if there was a little output i might be able to debug it myself, but now....

Back to top
SteveX
Ultrabubble


Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble

Posted: 01/12/13 06:37 

Quote:
If you would like the returned results to only include Blog Entries that were written by a specific User ID, you can provide the User ID as the "message_author" parameter - i.e. message_author="0" (for only admin messages).

This is from a page linked to above, so lose the band_id and try message_author instead.


_________________
Kulshi Mezian!

"Stranger from another planet, welcome to our hole. Just strap on your guitar and we'll play some rock and roll"

Ultrabubble create things.
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
User Site Design, Integration and Customization

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.