The BoardMod Project
 The Project | News | Downloads | Mods | FAQ | Templates | Chat | Forum
BoardMod Support Forum
[ Home | Help | Search | Login | Register ]  

25.05.13 at 14:44:30, Welcome, Guest. Please Login or Register

Choose Language:
Pages: 1 2 3 ... 5
NewsIndex 0.4 beta (Read 9326 times)
Curtiss Grymala
Hacker God
*****
Offline

Posts: 1314



05.08.06 at 22:26:59  
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:
    <!--#include virtual="/cgi-bin/YaBB.pl?action=newsindex" --> 
    
    

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

    OR
    Code:
    <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
  • « Last Edit: 15.11.07 at 00:41:23 by Curtiss Grymala »  
    IP Logged
     

    NewsIndex_04.ZIP (13 KB | 69 )

    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
    Jeff
    Moderator
    *****
    Offline

    , Netherlands
    Posts: 2552



    Reply #1 - 06.08.06 at 07:57:40  
    Hi Curtiss
    great mod. i like this.

    Can you remove hardcoded text in newsTemplate.html?

    Posted by:

    Number of comments:

    Because needed for Multilanguage Forums.

    German Translation attached.  Wink

    Edit:
    found bug I think. If you click on Title of the Topic on newspage, it go to startpage of your forum, because #1 is no reply, should go to first post i think. Only in comment link works great.

    My testpage
    http://www.grafix-world.nl/newsindex.shtml
    « Last Edit: 11.08.06 at 08:57:52 by Jeff »  
    IP Logged
     

    greetings
    Jeff
    Curtiss Grymala
    Hacker God
    *****
    Offline

    Posts: 1314



    Reply #2 - 06.08.06 at 15:54:58  
    Quote:
    Can you remove hardcoded text in newsTemplate.html?


    I can, but the news template is just meant to be an example of what you can do with it anyway.  It's still a good idea to make it multilingual, though.

    Quote:
    Edit:
    found bug I think. If you click on Title of the Topic on newspage, it go to startpage of your forum, because #1 is no reply, should go to first post i think. Only in comment link works great.


    There is a bug there, but not quite the bug you think.  I seem to have forgotten the "num" identifier in that link.

    When you click on the topic title, it should just take you straight to the topic (not the first reply).  When you click on the comment link, it should take you to the first comment.  I'll work on that (probably today).
     
    IP Logged
     

    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
    ThM
    Hacker God
    *****
    Offline

    Germany, Nds., Niedersachsen, Germany
    Posts: 585



    Reply #3 - 06.08.06 at 16:46:46  
    Hi,

    i test the Mod and have a question

    Is it properly that the readers with click on the author names he can send him a E-Mail  (if switched on)? If so, it does not function with me. No link is connected in with the author. E-mail address is not hidden.
     
    IP Logged
     

    Greeting ThM
    Curtiss Grymala
    Hacker God
    *****
    Offline

    Posts: 1314



    Reply #4 - 06.08.06 at 16:55:53  
    I'll fix that right now.
     
    IP Logged
     

    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
    Curtiss Grymala
    Hacker God
    *****
    Offline

    Posts: 1314



    Reply #5 - 06.08.06 at 17:00:53  
    Version 0.2 beta has been added to first post.

    Here's the changelog:
    Changelog:
    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
     
    IP Logged
     

    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
    Curtiss Grymala
    Hacker God
    *****
    Offline

    Posts: 1314



    Reply #6 - 06.08.06 at 17:06:15  
    Alright - all reported bugs have been fixed.

    Download away, and continue to report bugs.
     
    IP Logged
     

    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
    Jeff
    Moderator
    *****
    Offline

    , Netherlands
    Posts: 2552



    Reply #7 - 06.08.06 at 18:09:26  
    Hi
    works great now. thnx. New German Languagepack attached in my first reply of this post.

    hmm, if you edit, the ü and ö are converted to strange character
    i have corrected this.  Smiley
     
    IP Logged
     

    greetings
    Jeff
    Jeff
    Moderator
    *****
    Offline

    , Netherlands
    Posts: 2552



    Reply #8 - 06.08.06 at 20:17:25  
    Hi Curtiss
    if i change in Stylesheet the color in windowbg or windowbg2, there no color changes on my Testpage.
     
    IP Logged
     

    greetings
    Jeff
    ThM
    Hacker God
    *****
    Offline

    Germany, Nds., Niedersachsen, Germany
    Posts: 585



    Reply #9 - 06.08.06 at 20:47:10  
    Hi,

    the last line in the Admin settings is very big with me. Is this normal?

    ...
     
    IP Logged
     

    Greeting ThM
    Jeff
    Moderator
    *****
    Offline

    , Netherlands
    Posts: 2552



    Reply #10 - 06.08.06 at 21:00:44  
    ThM wrote on 06.08.06 at 20:47:10:
    Hi,

    the last line in the Admin settings is very big with me. Is this normal?

    www.toptools4you.de/newsbild.jpg


    hm, for me looks in your forum normal.  Wink
     
    IP Logged
     

    greetings
    Jeff
    Curtiss Grymala
    Hacker God
    *****
    Offline

    Posts: 1314



    Reply #11 - 06.08.06 at 22:15:45  
    Quote:
    Hi Curtiss
    if i change in Stylesheet the color in windowbg or windowbg2, there no color changes on my Testpage.


    I'll bet you forgot to link your stylesheet to your shtml page.  You've got to link your stylesheet in the head of your shtml page, or define the styles inline.

    Quote:
    the last line in the Admin settings is very big with me. Is this normal?  


    I'll look into it.  That's not the way it should be, but I'll see if I can figure out what's causing it.
     
    IP Logged
     

    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
    Jeff
    Moderator
    *****
    Offline

    , Netherlands
    Posts: 2552



    Reply #12 - 06.08.06 at 22:41:15  
    Curtiss Grymala wrote on 06.08.06 at 22:15:45:
    I'll bet you forgot to link your stylesheet to your shtml page.  You've got to link your stylesheet in the head of your shtml page, or define the styles inline.


    thnx, Curtiss.  8)

    I have add this between <head> and </head>

    Code:
    <!-- /////////////////////////////////////////////////////////////////
    // Do not forget link your "sylessheet" between "<head> and </head>"
    ////////////////////////////////////////////////////////////////// -->

    <link rel="stylesheet" href="http://www.yourdomain.com/yabbfiles/Templates/Forum/default.css" type="text/css" />


    and it works.  Cheesy
     
    IP Logged
     

    greetings
    Jeff
    Curtiss Grymala
    Hacker God
    *****
    Offline

    Posts: 1314



    Reply #13 - 06.08.06 at 22:53:49  
    Fantastic.

    ThM - I figured out what the problem is.  I forgot to define the style of that table cell.  It should be windowbg, but instead it doesn't have a definition.  Hopefully I'll remember to fix that next time around.
     
    IP Logged
     

    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
    D0T-C0M
    Hacker God
    *****
    Offline

    Tracadie, New Brunswick, Canada
    Posts: 806



    Reply #14 - 07.08.06 at 03:36:59  
    Curtiss Grymala thanks you so much for taking this mod on. I will help you test it. Smiley))
     
    IP Logged
     
    Pages: 1 2 3 ... 5
    © 2000-2012 by - All rights reserved.

    Project website hosting proudly sponsored and provided by UK2 Hosting
     The Project | News | Downloads | Mods | FAQ | Templates | Chat | Forum