Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) NewsIndex 0.4 beta (Read 14850 times)
Curtiss Grymala
God Member
*****
Offline


YaBB?... Y Not?

Posts: 1314
Joined: Apr 12th, 2004
Gender: Male
NewsIndex 0.4 beta
Nov 25th, 2007 at 9:41pm
Print Post  
NewsIndex 0.4

This mod is Y2.2 Compatible

Please read the included Readme.html file.  It contains some very important information on this mod

German translation can be found here

This is my attempt at re-creating Michael Prager's old NewsScript mod.  This mod allows you to display various information from one specific board in your YaBB forums on any page of your site, through use of SSI, PHP includes, and possibly javascript includes (I haven't tested it with javascript includes).

To Use This Mod:
  • Install the mod manually or with BoardMod
  • Upload all of the files in the "cgi-bin" directory that came with this mod in ASCII mode
  • Upload all of the modified files in ASCII mode
  • Go to your Admin Center, and click on "NewsIndex Settings"
  • Set the various options for this mod

To Display NewsItems On Your Site:
  • Open the HTML, PHP, ASP, etc. file that you wish to include your topics in
  • Add an include statement to execute the following CGI action: "http://pathtoyourYaBB/YaBB.pl?action=newsindex" (replacing "pathtoyourYaBB" with the actual URL to your YaBB board)
  • The include statement could look something like
    Code
    Select All
    <!--#include virtual="/cgi-bin/YaBB.pl?action=newsindex" --> 
    
    

    OR
    Code
    Select All
    <?php virtual('/cgi-bin/YaBB.pl?action=newsindex'); ?> 
    
    

    OR
    Code
    Select All
    <script language="javascript" src="/cgi-bin/YaBB.pl?action=newsindex;type=java">
    </script> 
    
    
  • Make sure you do some research on using include statements if you haven't used them before.
  • Make sure you include "type=java" in your URL if you are using javascript includes
  • Edit the newsTemplate.html file to suit your needs.  The following YaBB variables are available for use in the template file:
    • <yabb windowbg> - This alternates back and forth between windowbg and windowbg2 classes.  This should be placed like: class="<yabb windowbg>"
    • <yabb newsSub> - This is the subject of the post.  In the Admin Center settings, you can choose whether this should link back to the original topic or not.
    • <yabb newsDate> - This is the date and time that the topic was originally created.
    • <yabb newsMessage> - This is the content of the original topic.
    • <yabb newsPoster> - This is the Display Name of the person that started the topic.  In the Admin Center settings, you can choose to wrap this display name with a link to the user's email address, a link to the user's profile, or no link at all.
    • <yabb newsComments> - This will show a number indicating how many replies have been posted in the topic.  In the Admin Center settings, you can choose whether this number should link back to the original topic or not.
    • <yabb newsposter_txt> - This is linked to $news_txt{'12'} in the language file.
    • <yabb newscomment_txt> - This is linked to $news_txt{'13'} in the language file.
  • Be sure that all of your style elements are defined somewhere in a style sheet that's linked to the page on your site.
  • Be certain that the windowbg and windowbg2 style definitions are included wherever the rest of your style definitions are made.


Known Limitations:
  • There is no way, as of yet, to verify Board Permissions, so everyone will be able to see your news topics, whether they are supposed to or not.


Please report any bugs in this topic, and I will try to take a look at them.

Please post any translations in this topic as well, and I will do my best to include them in the next version.

Thanks to Michael Prager for the idea, and for BoardMod.  Thanks to all of the YaBB devvers for putting together such great software.

Changelog:
From 0.3 beta:
  • Added code boxes in the Admin Center area so that you can copy and paste the include code.
  • Fixed javascript support, so that you can definitely use javascript includes now.
  • Added a lot of language strings to the language file.  You will need to either translate those yourself, or search for new translations in the original BoardMod topic in order to use this mod in languages other than English.

From 0.2 beta
  • Included a new German translation, thanks to JetLi
  • Fixed the minor cosmetic issue with the last table row of the Admin settings
  • Added the option to choose specific boards and specific templates, in order to allow the user to use this mod for more than one board, and with more than one template.

From 0.1 beta:
  • Fixed small bug that made link from topic work incorrectly.
  • Added option to link to last post in topic, or first unread post in topic from the comment link.
  • Added two new variables to the template, so that all text can be multi-lingual
  • Added German translation, thanks to JetLi
  • Fixed bug with link to email

    Link to the mod.
  • « Last Edit: Jan 9th, 2008 at 1:10am by Curtiss Grymala »  

    Currently using Y2.3 With no mods (though that will hopefully change, soon).

    Click Here To See A List Of All The Mods I've Written
    Back to top
    WWW  
    IP Logged
     
    Jeff
    God Member
    *****
    Offline


    There are no bugs there
    are only features

    Posts: 2552
    Joined: Jan 14th, 2005
    Gender: Male
    Re: NewsIndex 0.4 beta
    Reply #1 - Nov 25th, 2007 at 10:17pm
    Print Post  
    Hi
    works on YaBB 2.2  Cheesy
      

    greetings
    Jeff
    Back to top
    WWW  
    IP Logged
     
    Captain John
    Senior Member
    ****
    Offline


    Pass to Port !

    Posts: 264
    Location: Reno Beach
    Joined: Jan 18th, 2007
    Gender: Male
    Re: NewsIndex 0.4 beta
    Reply #2 - Nov 30th, 2007 at 4:18am
    Print Post  
    Curtiss  Could you update the Top Post to include a description of the MOD, so users don't have to jump to the 2.1 MOD, Please
      

    Love to live and love on the water
    Back to top
     
    IP Logged
     
    qersys
    Senior Member
    ****
    Offline


    Yes, I am

    Posts: 342
    Location: SF
    Joined: Dec 29th, 2002
    Gender: Male
    Re: NewsIndex 0.4 beta
    Reply #3 - Dec 1st, 2007 at 4:51pm
    Print Post  
    Is there a way to use this in boardindex.template just using the  <news tags> and not an include?

    or maybe just call the newstemplate.html from boardindex.template

    Thanks for any help  Smiley
      
    Back to top
    IP Logged
     
    mattcch
    New Member
    *
    Offline


    Web

    Posts: 45
    Joined: Jun 8th, 2007
    Gender: Male
    Re: NewsIndex 0.4 beta
    Reply #4 - Jan 5th, 2008 at 5:27am
    Print Post  
    Thank a lots.
    It works and I like it much.  Smiley
      
    Back to top
    WWW  
    IP Logged
     
    D0T-C0M
    God Member
    *****
    Offline



    Posts: 806
    Location: Tracadie
    Joined: Sep 22nd, 2001
    Gender: Male
    Re: NewsIndex 0.4 beta
    Reply #5 - Jan 8th, 2008 at 5:34pm
    Print Post  
    wooohooo thanks curtis
      
    Back to top
     
    IP Logged
     
    Curtiss Grymala
    God Member
    *****
    Offline


    YaBB?... Y Not?

    Posts: 1314
    Joined: Apr 12th, 2004
    Gender: Male
    Re: NewsIndex 0.4 beta
    Reply #6 - Jan 9th, 2008 at 12:57am
    Print Post  
    qersys wrote on Dec 1st, 2007 at 4:51pm:
    Is there a way to use this in boardindex.template just using the  <news tags> and not an include?

    or maybe just call the newstemplate.html from boardindex.template

    Thanks for any help  Smiley


    @qersys - That's a completely different mod, unfortunately.  This mod is designed to allow you to include your latest posts on a page of your Web site, it's not meant to syndicate posts into a different part of your forum.

    I think there's a different mod for that, but I don't know if it's been updated for Y2.2, yet.

    @Cap'n John - I'll take care of that in just a moment.  Thanks for the tip.
      

    Currently using Y2.3 With no mods (though that will hopefully change, soon).

    Click Here To See A List Of All The Mods I've Written
    Back to top
    WWW  
    IP Logged
     
    mattcch
    New Member
    *
    Offline


    Web

    Posts: 45
    Joined: Jun 8th, 2007
    Gender: Male
    Re: NewsIndex 0.4 beta
    Reply #7 - Jan 18th, 2008 at 8:18am
    Print Post  
    Any upgraded new version?

    Smiley Smiley
      
    Back to top
    WWW  
    IP Logged
     
    multikon
    Full Member
    ***
    Offline


    Hakuna Matata

    Posts: 240
    Joined: May 14th, 2003
    Re: NewsIndex 0.4 beta
    Reply #8 - Jan 25th, 2008 at 3:58am
    Print Post  
    Quote:
    Known Limitations:

        * There is no way, as of yet, to verify Board Permissions, so everyone will be able to see your news topics, whether they are supposed to or not.


    Any new idea for this problem ?

    thx & cya
      

    beware ... yabb goes wbb ^^
    Back to top
    ICQ  
    IP Logged
     
    mattcch
    New Member
    *
    Offline


    Web

    Posts: 45
    Joined: Jun 8th, 2007
    Gender: Male
    Re: NewsIndex 0.4 beta
    Reply #9 - Jun 27th, 2008 at 12:27pm
    Print Post  
    Updated:

    Work ok on yabb2,2,2,
    thanks for a usefulmod, Smiley

    mattcch
      
    Back to top
    WWW  
    IP Logged
     
    mattcch
    New Member
    *
    Offline


    Web

    Posts: 45
    Joined: Jun 8th, 2007
    Gender: Male
    Re: NewsIndex 0.4 beta
    Reply #10 - Jul 14th, 2008 at 10:10pm
    Print Post  
    Updated:

    Works on on YaBB 2.2.3 , great!

    Smiley
    Mattcch2007
      
    Back to top
    WWW  
    IP Logged
     
    toonces
    New Member
    *
    Offline


    I love YaBB 1G - SP1.2!

    Posts: 4
    Joined: Nov 17th, 2008
    Re: NewsIndex 0.4 beta
    Reply #11 - Nov 17th, 2008 at 10:19pm
    Print Post  
    Is there a way to display news from more than one board?  I have used this mod for about 8 months and it works great, but I am finding I need to display news from several boards to keep my homepage looking fresh.  Thanks
      
    Back to top
     
    IP Logged
     
    Scudd
    New Member
    *
    Offline


    I Love YaBB 2!

    Posts: 1
    Joined: Feb 1st, 2009
    Re: NewsIndex 0.4 beta
    Reply #12 - Feb 1st, 2009 at 4:16am
    Print Post  
    After manually installing this mod (twice) on a 2.3.1 board, the NewsIndex Settings page works fine, but the links (http://URL/cgi-bin/yabb2/YaBB.pl?action=newsindex) displays the following error:

    Error: Untrapped Error :
    Undefined subroutine &main::header called at ./Sources/NewsIndex.pl line 185.

    anyone seen this before? Being a bit of a CGI novice, I'm stuck.

    The code it seems to get hung up on is:

               else {
                   print header(-status  => '200 OK',
                   -charset => $yycharset);
               }
    « Last Edit: Feb 1st, 2009 at 5:25am by Scudd »  
    Back to top
     
    IP Logged
     
    Jeff
    God Member
    *****
    Offline


    There are no bugs there
    are only features

    Posts: 2552
    Joined: Jan 14th, 2005
    Gender: Male
    Re: NewsIndex 0.4 beta
    Reply #13 - Feb 1st, 2009 at 10:52am
    Print Post  
    Scudd wrote on Feb 1st, 2009 at 4:16am:
    anyone seen this before? Being a bit of a CGI novice, I'm stuck.

    because not updated for 2.3.1 Tongue
      

    greetings
    Jeff
    Back to top
    WWW  
    IP Logged
     
    MurphyPrecht
    New Member
    *
    Offline


    I Love YaBB 2!

    Posts: 1
    Joined: Feb 19th, 2009
    Re: NewsIndex 0.4 beta
    Reply #14 - Feb 24th, 2009 at 12:06am
    Print Post  
    Yup kinda noticed that, sounds good though.
    Any plans on having this work on the latest release Curtiss?

    Thanks in advance
      
    Back to top
     
    IP Logged
     
    Page Index Toggle Pages: 1
    Send TopicPrint