Board News

Started by jake1981, June 09, 2007, 10:55:38 AM

Previous topic - Next topic

jake1981

Link to Mod
--===========================================================
Board News (bnews)
Version 1.2

Author: Oskari Rauta/Jake Irons - jake1981[at]luukku.com
-------------------------=========================----------------------
Readme before install
======================================================---------

What's new in 1.2?
==============---.
- Source code has been simplified a bit.
- Daniel15's code no longer is included in BoardNews MOD
   although, BoardNews is still dependant on Daniel15's code,
   so Daniel15's MOD now is added as a dependancy for boardNews
   MOD. BoardNews no longer works, if you have not installed
   Daniel15's MOD.
- Installer now supports list of dependant MODs. If required
   MOD(s) has/have not been installed, installation is being
   cancelled without no changes made at all and in browser it
   shows a list of MODs that it depends on that have not been
   installed. On list it also shows author's name and provides
   links to contacting author of required MOD and a link where
   to download this required MOD.

What's new in 1.1?
==============---.
- New function for fetching topics as news. This is
   work of Daniel15, modification of a function found from
   SSI.php. Some people had troubles, news items just
   vanished after some time. So this new function should
   be much better than my original.
- Compatibility with original news system. Both systems
    can be used at same time now (it first outputs SMF's
    original news system's news item(s))
- "Compatibility" with all themes that support SMF's
   original news system.
- Compatibility with 1.1.3 tested.
- You can use smileys in topics titles and they will be
   displayed as images.
- URL support in topic's title. If you put this into topic's
   title: "New version of Board News available at
   http://www.simplemachines.org" web address will be clickable
   and it will go directly to that address.
- When hovering mouse over a news item, bbcode tags are
   filtered from previewing text (for e.g.
   http://www.roadrunner.cx only outputs address
   http://www.roadrunner.cx without it being link and without
   showing [url] tags..

What's gone with 1.1?
=================---.
- No [Read more] any more. I took it away. Now just hover
   your mouse over news item's title to see "preview" of
   topic and if you want to see it better, just click it.
- Support for multiple themes. Now this MOD supports only
   one theme at a time and initially it is core/default.
   If you install this MOD and change from core/default to
   classic or babylon, it WILL look weird.

What's changed in 1.1?
==================---.
You no longer should disable original news. Starting from version
1.1, you should be able to use BOTH news simultaneously. If you
do not want to use "original" news, do not disable it, just delete
all news entries.

There's new version, how can I upgrade?
===================================---.
First uninstall previous version and delete MOD from package
list ( or delete it's file from $boarddir/Packages ). After
this, install new version. Your previous settings will be
used with newer version.

Does this MOD require another MOD(s) to be installed?
=================================================---.
Yes it does. It is dependant on Daniel15's
ssi_boardNews Multiple Boards MOD that can be downloaded
from http://custom.simplemachines.org/mods/index.php?mod=759.

What if I don't install required MOD(s) and I proceed?
==================================================---.
You can proceed to install my MOD without installing
required MOD(s), but then installation will cancel and
display a list of missing required MOD(s) with
download links and links for contacting author of
required MOD.

What is this?
=========---.
This is a modification for simple machines forum(now on called smf).

What kind of modification?
======================---.
It's alternative to news system used in SMF. You can use
admin panel to choose boards where news are imported from.
Then change permissions on that board to allow normal users to
only reply to existing topics. Write a new topic on that forum
and in the news display you see your just written new topic.
If you click [Read more] it takes you to actual post. You can
also hover your mouse over news entry to see preview of it's
contents.

Does it support setup from administration panel?
============================================---.
Yes it does. It gives you new entry to admin's navigation
panel, right before News and Newsletters, you see entry
"Board News", or you can get to settings of this MOD also
from "News and Newsletters", it creates a tab to there too.
There you find settings that change the look of your news
box and which boards are used for importing news.

Is this better than original news?
==============================---.
Yes and no. Some people like this type of way to introduce
news on their forums, some like the way SMF has done it.
This way people can comment to news by posting replies to
entry's topic. And your news can be like any other post
containing images or what ever your posts usually look like..

Why did you do this?
================---.
For site integration issues. We use mkportal, I there use
boardnews to display site's news. I choose same area in there
and in this MOD's settings and there we go, same news entries
displayed in both, forum and portal. TinyPortal aswell uses
similar technology.

What version is it designed for?
============================---.
It has been designed for version 1.1.3.

Is it tested?
=========---.
It's tested under smf's version 1.1.3 with 3 themes and 2 languages.
Worse support is with classic theme and mostly this has been designed
default core in mind..

Is it multilingual?
===============---.
Yes, it supports english and finnish.
If you need support for another language, you
need to check what my MOD inserts to language files:

- forumdir/Themes/default/languages/Admin.english.php
- forumdir/Themes/default/languages/index.english.php

Does it support themes?
==================---.
Yes and no. It's visible on all themes, but initially it's been
optiomized for core/default.

How do I add support for babylon/classic/custom theme?
==================================================---.
Open boarddir/Sources/Subs-BoardNews.php and scroll to
end of file. Check how my MOD manipulates variable
$context['random_news_line'] and make it compatible
with theme of your choice.

I use multiple themes, how do I make this work with all themes?
===========================================================---.
Such feature for this MOD does not exist. You need to make
Subs-BoardNews.php detect what theme is being used and make it
manipulate variable $context['random_news_line'] proper way
for every theme in your forum. I might create someday a new
version of this MOD that will have something like this for
3 basic themes (core/default, babylon and classic) where you
could get a hint of what to do. Currently this kind of
feature is missing.
I no longer provide support or updates to any of my MODs nor I provide any new themes or MODs in anywhere else expect on my own site (and yes, there's nothing in there) expect for those MODs that I already sent to here that have not yet been approved and if approval requires any changes, I won't provide them no more.

babjusi

It looks cool. Thank you

L.G.S

I really want this mod but I installed it successfully, turned it on (and turned normal news off) and it just leaves me with a blank header where the news used to be.
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


gffb

Same here from first install no news

karone

Same here - turning off news leaves a blank space, but board news doesn't display anything. Tried setting up a completely new board to try it with, but it still doesn't work.

Uninstalling now ...

yosep

I couldn't install it because the test for index.template.php always failed. Any suggestion?

jake1981

test for index.template.php failed because some other mod has changed it so it&#039;s incompatible. You need to install this MOD manually, there was a nice helper somewhere to help you do it.. (a place in web where you upload the mod and then it guides you how to install it manually.. but I don&#039;t remember where that was)<br /><br />Okay, you don&#039;t see it? That&#039;s very strange.. After turning off normal news, did you turn on <b>board news</b> ? Also, you need select which boards are being used as news boards from settings (see screenshots)
I no longer provide support or updates to any of my MODs nor I provide any new themes or MODs in anywhere else expect on my own site (and yes, there's nothing in there) expect for those MODs that I already sent to here that have not yet been approved and if approval requires any changes, I won't provide them no more.

L.G.S

Yes I did what your instructions were, and it still didn't work.
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


jake1981

Quote from: L.G.S on June 17, 2007, 05:53:09 AM
Yes I did what your instructions were, and it still didn't work.

And there is posts on board selected as a news source..?

Do you have any other MODs installed on your board, could you list them for me?
What version of SMF are you running?
I no longer provide support or updates to any of my MODs nor I provide any new themes or MODs in anywhere else expect on my own site (and yes, there's nothing in there) expect for those MODs that I already sent to here that have not yet been approved and if approval requires any changes, I won't provide them no more.

L.G.S

There are over 400 topics in that board, so yes.

I have quite a few mods, but I've checked and I don't think they would have anything to do with the problems.

1.  TinyPortal  0.983  [ Uninstall ]
2. Hide Tag BBC Image 1.0.0 [ Uninstall ]
3. Hide Tag 1.2.5 [ Uninstall ]
4. SMF Staff Page 1.5.1 [ Uninstall ]
5. Users Online Today Mod 1.4.0 [ Uninstall ]
6. Enhanced Calendar 1.1 [ Uninstall ]
7. Monthly Statistics on Profile 1.0 [ Uninstall ]
8. Country Flags 1.0.1 [ Uninstall ]
9. RSS Feed Poster 1.0.3 [ Uninstall ]
10. SMF Ajax Registration Feedback 1.0.0 [ Uninstall ]
11. Media Center 1.0 [ Uninstall ]
12. Report Icon Mod 1.0 [ Uninstall ]
13. Moderator Activity Report for SMF1.1.2 1.2 [ Uninstall ]
14. Move Old Topics 1.2 [ Uninstall ]
15. PM On Registration 1.0.2 [ Uninstall ]
16. Registered Links 1.0 [ Uninstall ]
17. Global Headers Footers 1.3 [ Uninstall ]
18. Global Announcements 1.0 [ Uninstall ]
19. Custom Action Mod 2.04 [ Uninstall ]
20. Enhanced Quick Reply TBA [ Uninstall ]
21. vMoveTopic Notify by PM 0.90 [ Uninstall ]
22. Googlebot & Spiders Mod 2.0.3 [ Uninstall ]
23. Invite 1.13 [ Uninstall ]
24. Avatar on Member List 1.0 [ Uninstall ]
25. Seo 4 SMF 0.2.9.9 [ Uninstall ]
26. Search Topic 1.01 [ Uninstall ]
27. Attachments layout 1.1 [ Uninstall ]
28. Member Notepad 1.0 [ Uninstall ]
29. Welcome Topic Mod 1.0 [ Uninstall ]
30. SSI Topic and Replies 0.1 [ Uninstall ]
31. SMFBlog 0.1 Beta [ Uninstall ]
32. Topic Member Post Count 1.0.0 [ Uninstall ]
33. PagesToGo 1.3 [ Uninstall ]
34. War(c)hild:IMDB_Tag4Smf 1.0.0 [ Uninstall ]
35. Custom BBCode 2.00 [ Uninstall ]
36. SMF Arcade 2.0.8 [ Uninstall ]
37. Alternate Latest Post Display 1.00 [ Uninstall ]
38. MessagePreviewOnHover 1.5 [ Uninstall ]
39. Ad Managment 2.3 [ Uninstall ]
40. Board News 1.0 [ Uninstall ]
41. SMF Poll Mod 1.0 [ Uninstall ]
42. Mod List Color Alternate 1.0 [ Uninstall ]
43. Signature Settings Mod 1.0 [ Uninstall ]
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


jake1981

Quote from: L.G.S on June 17, 2007, 08:07:16 AM
There are over 400 topics in that board, so yes.

I have quite a few mods, but I've checked and I don't think they would have anything to do with the problems.


1.  TinyPortal  0.983  [ Uninstall ]
2. Hide Tag BBC Image 1.0.0 [ Uninstall ]
3. Hide Tag 1.2.5 [ Uninstall ]
4. SMF Staff Page 1.5.1 [ Uninstall ]
5. Users Online Today Mod 1.4.0 [ Uninstall ]
6. Enhanced Calendar 1.1 [ Uninstall ]
7. Monthly Statistics on Profile 1.0 [ Uninstall ]
8. Country Flags 1.0.1 [ Uninstall ]
9. RSS Feed Poster 1.0.3 [ Uninstall ]
10. SMF Ajax Registration Feedback 1.0.0 [ Uninstall ]
11. Media Center 1.0 [ Uninstall ]
12. Report Icon Mod 1.0 [ Uninstall ]
13. Moderator Activity Report for SMF1.1.2 1.2 [ Uninstall ]
14. Move Old Topics 1.2 [ Uninstall ]
15. PM On Registration 1.0.2 [ Uninstall ]
16. Registered Links 1.0 [ Uninstall ]
17. Global Headers Footers 1.3 [ Uninstall ]
18. Global Announcements 1.0 [ Uninstall ]
19. Custom Action Mod 2.04 [ Uninstall ]
20. Enhanced Quick Reply TBA [ Uninstall ]
21. vMoveTopic Notify by PM 0.90 [ Uninstall ]
22. Googlebot & Spiders Mod 2.0.3 [ Uninstall ]
23. Invite 1.13 [ Uninstall ]
24. Avatar on Member List 1.0 [ Uninstall ]
25. Seo 4 SMF 0.2.9.9 [ Uninstall ]
26. Search Topic 1.01 [ Uninstall ]
27. Attachments layout 1.1 [ Uninstall ]
28. Member Notepad 1.0 [ Uninstall ]
29. Welcome Topic Mod 1.0 [ Uninstall ]
30. SSI Topic and Replies 0.1 [ Uninstall ]
31. SMFBlog 0.1 Beta [ Uninstall ]
32. Topic Member Post Count 1.0.0 [ Uninstall ]
33. PagesToGo 1.3 [ Uninstall ]
34. War(c)hild:IMDB_Tag4Smf 1.0.0 [ Uninstall ]
35. Custom BBCode 2.00 [ Uninstall ]
36. SMF Arcade 2.0.8 [ Uninstall ]
37. Alternate Latest Post Display 1.00 [ Uninstall ]
38. MessagePreviewOnHover 1.5 [ Uninstall ]
39. Ad Managment 2.3 [ Uninstall ]
40. Board News 1.0 [ Uninstall ]
41. SMF Poll Mod 1.0 [ Uninstall ]
42. Mod List Color Alternate 1.0 [ Uninstall ]
43. Signature Settings Mod 1.0 [ Uninstall ]


Oh my god what a list! You can be proud of yourself that you've been able to customize your board this much..
Well, these were on your list and I've tested 'em, so atleast these shouldn't be a problem:
- tinyportal (I'm running newer version but that shouldn't be the problem anyway)
- Users online today

So there's 41 mods on your list that could be causing incompatibility with board news, this is so big list that I am not going to check what causes incompatibility, it also might be that it's not any of these MODs that would be causing this, it might be that your original smf has been changed so much that problem would be caused by multpile independent mods..

But tell you what, is http://www.ruthlessintent.com/board/forum address of your board? I checked it out and guess what, you are NOT using one of STOCK themes (these are core/default, babylon and classic). This MOD is designed for any of these 3 themes, and to make it work with ANOTHER theme, you need to add support for it by manually. I tried forum located in that addess and tried to change theme as a guest user, but your forum doesn't work as standard smf forum, adding ?theme=1 to boards index.php did not do anything..

So, check out what my mod did for default theme's index.template.php and then make up something similar that would work with your theme.. I have a feeling that MOD has no incompatibilities with other MODs, it's just not compatible with your theme and you just have to add support for your theme to make it compatible..
I no longer provide support or updates to any of my MODs nor I provide any new themes or MODs in anywhere else expect on my own site (and yes, there's nothing in there) expect for those MODs that I already sent to here that have not yet been approved and if approval requires any changes, I won't provide them no more.

L.G.S

Firstly, having 43 mods that I have does not change the code hardly at all. You will see the mods I have are small and basically additions, and do not change much of the actual forum.

Secondly, please don't talk to me like as if you didn't read my earlier posts, if I can successfully install 43 mods onto my theme then why wouldn't I be able to do yours? I already said I installed it MANUALLY on my theme, and I also checked the DEFAULT them to see changes, but even the DEFAULT them didn't have any changes.
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


jake1981

Quote from: L.G.S on June 17, 2007, 02:29:30 PM
Firstly, having 43 mods that I have does not change the code hardly at all. You will see the mods I have are small and basically additions, and do not change much of the actual forum.

Secondly, please don't talk to me like as if you didn't read my earlier posts, if I can successfully install 43 mods onto my theme then why wouldn't I be able to do yours? I already said I installed it MANUALLY on my theme, and I also checked the DEFAULT them to see changes, but even the DEFAULT them didn't have any changes.

Okay, I need to apologize then. I'm sorry, I have much of stuff to answer to, so I usually don't read again the whole thread.

Okay, let's have a different kind of approach to this situation, as I am not familiar to theme you are using, but again I am pretty sure of that the problem has something to do with chosen theme..

So try enabling original news module of SMF, maybe it shows then, you propably need to make a small change to the theme if it shows then. I have a hunch that you have added portion that shows news to a part of theme that is visible only when original news is enabled. I might be wrong. If this doesn't help, please send a file from your theme where news is supposed to be shown as an attachment and I try to check it out..
I no longer provide support or updates to any of my MODs nor I provide any new themes or MODs in anywhere else expect on my own site (and yes, there's nothing in there) expect for those MODs that I already sent to here that have not yet been approved and if approval requires any changes, I won't provide them no more.

L.G.S

Ignore the fact I have a custom theme.

In the default theme, where the mod is installed, it does not work. I have installed FINE. I did what the readme said to turn on the feature, and I also made sure my news board was ticked to show news. That still didn't work.

I don't think any other poster in this thread has got it working.
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


jake1981

check out http://roadrunner.cx:81/ and you see it there working just fine..

Also smf mod group has got it working properly, couple of people have contacted me by email about asking guidance on how to change this mod to suite their needs a bit better, so I have to admit, it _does_ work, readme files guidance is proper only for 3 default themes as there is no general guideline on how other themes work and that is exactly why it's difficult to provide support for all themes. babjusi seemed to be able to get it work and this has been downloaded pretty many times, so there seems to be only a small percent of installations that seem to have failed.

There is also this possibility, if databases have been changed by some other MOD (as I told you, I am only familiar with 2 mods you have installed)  then there is a slight possibility that my MOD is not able to check amount of posts in chosen board(s) and this value is left empty/zero, if this value is zero, news portion is not being shown at all.. It is really difficult to say when I don't know what kind of changes have been made in your forum, and changes there aren't that minor, if you check urls e.g. for posts, you see that structure has changed a lot, even most standard stuff can't be used in your forum ( boardurl/index.php?theme=1 does not work for e.g.)
I no longer provide support or updates to any of my MODs nor I provide any new themes or MODs in anywhere else expect on my own site (and yes, there's nothing in there) expect for those MODs that I already sent to here that have not yet been approved and if approval requires any changes, I won't provide them no more.

L.G.S

I've already said I've tried this in the default theme and it does not work. As I said, forget I have a custom theme, because that's not what I'm working on.

My links do work, its just I have chosen for the default theme or any other theme to be chosen, so obviously you can't choose theme 1 because it is disabled for non admin.

I've removed your mod and replaced it manually, and it still didn't work. I checked my mods to see if they made any changes to the database like you mentioned, and they didn't.
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


jake1981

#16
Quote from: L.G.S on June 17, 2007, 04:44:45 PM<br />I&#039;ve already said I&#039;ve tried this in the default theme and it does not work. As I said, forget I have a custom theme, because that&#039;s not what I&#039;m working on.<br /><br />My links do work, its just I have chosen for the default theme or any other theme to be chosen, so obviously you can&#039;t choose theme 1 because it is disabled for non admin.<br /><br />I&#039;ve removed your mod and replaced it manually, and it still didn&#039;t work. I checked my mods to see if they made any changes to the database like you mentioned, and they didn&#039;t.<br />
<br /><br />okay. Well check out this theme: <a href="http://roadrunner.cx:81/index.php?action=forum;theme=4" target="_blank" class="bbc_link extern">http://roadrunner.cx:81/index.php?action=forum;theme=4</a> - I know it could be nicer but it's just something I was able to create with this small amount of time..<br /><br />I had.. Well.. A small difficulty to get it to work with that theme, main reason was that I was a little bit sloppy since it&#039;s some time already passed since I created this MOD but I think that I could find reason why it&#039;s not working for you too.. Send your theme&#039;s index.template.php file to me at jake1981 at luukku.com
I no longer provide support or updates to any of my MODs nor I provide any new themes or MODs in anywhere else expect on my own site (and yes, there's nothing in there) expect for those MODs that I already sent to here that have not yet been approved and if approval requires any changes, I won't provide them no more.

L.G.S

Sorry if I'm sounding rude but are you even listening to me?

I said ignore the fact that I have a custom theme, I'm trying to get to work this on the default theme.
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


jake1981

why? You are not going to use that theme anyway..

Okay, I'll help you a bit out.. Check the part where it outputs stuff in case that $modSettings['bnews_enabled'] is non-zero, then it outputs news items if they exist..

Add there something like echo 'hello world!'; which will be outputted if bnews_enabled is set and is non-zero.. now load your theme to browser, can you see "hello world!" somewhere on page? Check source too if it can't be found, maybe it's inside invisible div or something..

Okay, if you have enabled board news and cannot see this, it means that you need to go up in the source file to the beginning of the function that outputs news, there is line that looks something like this:

global $context, $scripturl, ...;

add $modSettings to there, and check it out now, does hello world now be seen on page?

---

second part:
so you can see hello world but not news? Check that $context also exists on line that starts with global

Third part:
You still cannot see news?
Check out main index.php in root of your board, it seems that it isn't including subs-bnews (check my package, I'm not on my development computer so I can't see how I named that file..)

and there also should be function executed that is inside that file _after_ loading up stuff like settings and user data..

It's not that more complicated than that..
I no longer provide support or updates to any of my MODs nor I provide any new themes or MODs in anywhere else expect on my own site (and yes, there's nothing in there) expect for those MODs that I already sent to here that have not yet been approved and if approval requires any changes, I won't provide them no more.

L.G.S

Quote from: jake1981 on June 17, 2007, 06:18:41 PM
why? You are not going to use that theme anyway..

Because if it works in that theme I will know whether to bother to add it to the custom theme, that's why.

Yes I see Hello world.
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Advertisement: