UBB.Dev
Posted By: Ian Spence UBB.News - 06/05/2007 9:07 PM
Allows you to easily create and customize newsfeeds for your forums. Want an RSS feed that only shows forums 3 and 9?

ubbthreads.php?ubb=news&forums=3,9

Instead of an RSS feed, do you want it to be styled like the center column on the portal page?

ubbthreads.php?ubb=news&forums=3,9&view=html

Checks permissions so no one see a forum they weren't meant to.

Attached File
2401-NewsFeed.zip  (47 downloads)
Posted By: Gizmo Re: UBB.News - 06/06/2007 3:25 AM
good job Ian wink... I've been using something similar forever now; though been using yours for about the last 6 months or so :X
Posted By: Stephen G Re: UBB.News - 06/07/2007 8:22 AM
Total `noob` question.

Any instructions?
Posted By: Gizmo Re: UBB.News - 06/07/2007 9:36 AM
he gave usage indications... That's about all there is to it...
Posted By: Stephen G Re: UBB.News - 06/07/2007 10:25 AM
Not for a thicko like me!

laugh
Posted By: Gizmo Re: UBB.News - 06/07/2007 11:49 AM
Originally Posted by Ian Spence
Allows you to easily create and customize newsfeeds for your forums. Want an RSS feed that only shows forums 3 and 9?

ubbthreads.php?ubb=news&forums=3,9

http://www.yoursite.tld/forums/ubbthreads.php?ubb=news&forums=3,9
Posted By: Gizmo Re: UBB.News - 06/21/2007 11:49 AM
I'm getting this on UBB.T7 B2:
Script: /home/undergroundnews/public_html/forum/scripts/news.inc.php
Line#: 163
SQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''15'' at line 16
SQL Error #: 1064
Query: SELECT t1.TOPIC_REPLIES, t1.TOPIC_SUBJECT, t1.TOPIC_CREATED_TIME, t1.TOPIC_VIEWS, t1.TOPIC_REPLIES, t1.TOPIC_ID, t2.POST_BODY, t2.POST_ID, t2.POST_DEFAULT_BODY, t3.USER_ID, t3.USER_DISPLAY_NAME, t4.FORUM_DESCRIPTION, t4.FORUM_TITLE, t4.FORUM_ID FROM forums_TOPICS as t1, forums_POSTS as t2, forums_USERS as t3, forums_FORUMS as t4 WHERE t1.FORUM_ID in ( '3', '9' ) AND t2.USER_ID = t3.USER_ID AND t2.POST_ID = t1.POST_ID AND t1.TOPIC_IS_APPROVED = '1' AND t4.FORUM_ID = t1.FORUM_ID AND t4.FORUM_IS_ACTIVE = '1' ORDER BY t1.TOPIC_CREATED_TIME DESC LIMIT '15'

Please use your back button to return to the previous page.
Posted By: Rick Re: UBB.News - 06/21/2007 5:51 PM
The limit clause shouldn't have quotes around it.
Posted By: Gizmo Re: UBB.News - 06/22/2007 12:05 AM
Originally Posted by Rick
The limit clause shouldn't have quotes around it.
Sadly, I don't see what to update in the script file... I can see where 15 is mentioned, and I see the query, and I see referances to "NEWS_MAX_POSTS"; however the only thing with a ' is the "NEWS_MAX_POSTS" and it has to be there since it's defining the section...
Posted By: drkknght Re: UBB.News - 06/22/2007 7:00 AM
i think this is what i want, i just wanna make sure i understand what it is, first.

basically, i'm looking for a way to display something similar to how the portal page displays news. i have 20 new topics being displayed on my portal page regular news style -- the full post, not just the linked thread subject

i would like to include the one, latest news post on the top of my forums (cfm) page.

is that what this would allow me to do? ...sorta like the old "addon" news files?
Posted By: Ian Spence Re: UBB.News - 06/22/2007 8:19 AM
just use type=html in the url
Posted By: drkknght Re: UBB.News - 06/22/2007 8:34 AM
excellent, thanks ian! smile

tho, unfortunately, while testing, i got the same error gizmo quoted above. and i am running 7.1.1
Posted By: Gizmo Re: UBB.News - 06/22/2007 10:19 AM
Ian, any ideas for my error?
Originally Posted by Gizmo
I'm getting this on UBB.T7 B2:
Script: /home/undergroundnews/public_html/forum/scripts/news.inc.php
Line#: 163
SQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''15'' at line 16
SQL Error #: 1064
Query: SELECT t1.TOPIC_REPLIES, t1.TOPIC_SUBJECT, t1.TOPIC_CREATED_TIME, t1.TOPIC_VIEWS, t1.TOPIC_REPLIES, t1.TOPIC_ID, t2.POST_BODY, t2.POST_ID, t2.POST_DEFAULT_BODY, t3.USER_ID, t3.USER_DISPLAY_NAME, t4.FORUM_DESCRIPTION, t4.FORUM_TITLE, t4.FORUM_ID FROM forums_TOPICS as t1, forums_POSTS as t2, forums_USERS as t3, forums_FORUMS as t4 WHERE t1.FORUM_ID in ( '3', '9' ) AND t2.USER_ID = t3.USER_ID AND t2.POST_ID = t1.POST_ID AND t1.TOPIC_IS_APPROVED = '1' AND t4.FORUM_ID = t1.FORUM_ID AND t4.FORUM_IS_ACTIVE = '1' ORDER BY t1.TOPIC_CREATED_TIME DESC LIMIT '15'

Please use your back button to return to the previous page.
Posted By: Ian Spence Re: UBB.News - 06/22/2007 8:32 PM
The file is updated, although Rick did give you the correct answer
Posted By: Gizmo Re: UBB.News - 06/23/2007 2:28 AM
odd, because I looked at the queries and i didn't see any "'s...
Posted By: drkknght Re: UBB.News - 06/23/2007 8:52 AM
wuhoo, no more errors! however, there appears to be no difference between the two link types. for example, these two URLs produce identical pages:

http://www.robkamphausen.com/ubbthreads/ubbthreads.php?ubb=news&forums=3,9&view=html

http://www.robkamphausen.com/ubbthreads/ubbthreads.php?ubb=news&forums=3,9

is there specific formatting of an include script (or something?) to get the results to appear like the portal page's center news?
Posted By: Gizmo Re: UBB.News - 06/23/2007 9:21 AM
The HTML view is supposed to show a HTML based content island for inclusion (you can see mine at ugn in my signature)
Posted By: drkknght Re: UBB.News - 06/23/2007 10:22 AM
ah, ok.

so if i wanted that island to, say, take the place of the "community introduction" (blurb right atop the forums on cfrm), what should i do?
Posted By: Gizmo Re: UBB.News - 06/23/2007 12:03 PM
I'm not sure I know what you're intending to do...

This script takes your forum data and presents it as news (as shown on my homepage); I'm unsure as to what you're asking...
Posted By: drkknght Re: UBB.News - 06/23/2007 7:24 PM
on the portal page, i have the 20 latest news blurbs being displayed. on my boards, these "blurbs" are actually graphics instead of text -- splash images that link to articles elsewhere on the boards.

i would like a way to display the most recent of those 20 images/news blurbs on the top of my cfrm page, over the first category.

in 6.5 world, i could do this by modding the IIP feature. i had my portal page news.php file display the 20 recent posts. then, i created another php file that called in just 1 post from the news forum, and included that on top of the message boards homepage.
Posted By: Gizmo Re: UBB.News - 06/24/2007 12:59 AM
What I'm failing to see here is how this mod would effect your CFRM page... This mod doens't touch any threads templates; it's meant as a need for "off forum" syndication...

So what I'm failing to see is what you're trying to do with the portal with this mod...

Posted By: drkknght Re: UBB.News - 06/25/2007 3:32 AM
thats what i'm looking for -- to implement this additional news feed on my cfrm.

i see that you made it a post island-like thing in the right column of your UGN site. instead of putting it there, i would like it featured on the top of my cfrm page.

its sorta like what you did with the who's online mod, taking a post island and featuring it above (or below) your forum listing.
Posted By: Gizmo Re: UBB.News - 06/25/2007 4:09 AM
My portal on UGN is entirely stock code, the "news" island I have is simply a post content island named "latest news"; you could put a custom island into the portal template file by following the "content islands 101" guide i have in the templates directory.

Again, this isn't related to this addon which we've officially hijacked...
Posted By: drkknght Re: UBB.News - 06/25/2007 4:45 AM
haha

well, all of the post island things that i've done just display a list of linked subject lines. this feed from this ubb.news hack actually shows the post content, i.e; the news images, which is what i want.

so, that much of what i'm seeking is related to the thread and wonderful mod. smile

the only other part i was looking for was a way to position that display on the top of my CFRM page. i'll check out yer content islands 101 guide for that
Posted By: AllenAyres Re: UBB.News - 04/08/2008 4:17 PM
Anyone using this with 7.3?

Does it now use the SEO URL's now? (thread title in link)

I need a CMS backend for my site and I'd like to be able to use something I'm familiar with than learning the behemoth that is joomla or similar.
Posted By: Gizmo Re: UBB.News - 04/09/2008 2:15 AM
I don't see why it wouldn't work with 7.3, however the SEO URLs may need to be updated...
Posted By: Gizmo Re: UBB.News - 06/11/2008 7:04 AM
Just a followup for you allen, the version of this i'm running does NOT work with 7.3; likely due to the new permissions... I haven't been able to figure out (offhand) why it isn't working.
© UBB.Developers