PDA

View Full Version : vB News CMS


davidw
08-29-2006, 10:00 PM
What does this do? It allows you to take your news from your news forums (up to 9 news forums) and display them in a category-style fashion with the ability to add new content, reply to the original story, send to a friend, and print.

This is a limited 3.5.x version. For more features, such as parsing bbcode, you should use the 3.6.x version here: https://vborg.vbsupport.ru/showthread.php?t=133302

Thanks go out to sabret00the for his help on the project who helped out a lot, to peterska2 for testing and working with me on the templates, and to the beta testers for helping find potential problems and bugs to be fixed/worked out.


Install/Upgrade Instructions

Located in the zipped readme.txt file.


Frequently Asked Questions

What is the forumid?
The forumid is the id of the forum you have created. Each forum has its own unique number assigned to it. When you click on a forum link you can see a number that is assigned to it. This will show up in the URL of the page you are browsing. Another way of seeing the forumid is to go to your admin control panel => Forums & Moderators => Forum Manager => Click on [Expand All] and then move your mouse over (hover) any of the forums you've created. Your status bar (bottom of screen) should display your forumid (number at the end of the link/url).


Changes
Added security

Known Bugs/Issues:
1) - When you go to the page directly, the page acts as a normal page - however, if you click refresh on the page, the refresh stalls. I don't understand why this occurs.
2) - BBCode does not parse yet - I am looking into making it parse without causing problems.

Temporary demo location:
http://www.christianboards.org/vbnews.php

ngocha85
08-30-2006, 03:15 PM
thanks. i will try it righ now!

redlabour
08-30-2006, 03:22 PM
I think it is useless. Nobody wants something like this if he can have a complete Portal like vBadvanced.

wizardan
08-30-2006, 03:26 PM
Interesting.
Installed well.
Thank you.

Snake
08-30-2006, 03:50 PM
Thanks! Going to check this out soon...

ngocha85
08-30-2006, 03:52 PM
I think it is useless. Nobody wants something like this if he can have a complete Portal like vBadvanced.
But i think this mod is very simple.

sabret00the
08-30-2006, 04:09 PM
I think it is useless. Nobody wants something like this if he can have a complete Portal like vBadvanced.
Come on...please show a little bit of respect, honestly people like you make it suck to be a coder sharing work for free.

davidw
08-30-2006, 04:22 PM
I run vbadvanced on my site - and there is nothing wrong with theirs. However, I wanted my news in a separate area and I've read some requests for something like this for people who do not use vbadvanced or phpportals (or any other CMS that displays news on the front page). This makes my content page smaller (trying to reduce as much as I can) and easier on the eyes for my portal.

DJ XtAzY
08-30-2006, 06:49 PM
oOo interesting !!

dam i cant test this out yet cuz my server is being ddos =[

The Chief
08-30-2006, 08:17 PM
very nice, will probably install soon :)

peterska2
08-30-2006, 08:46 PM
installed and used as a source for my RSS feeds instead of having a very busy looking forum with the content.

You can see how I have it set up here (www.peterska2.co.uk/vbnewscms.php)

redlabour
08-30-2006, 08:57 PM
installed and used as a source for my RSS feeds instead of having a very busy looking forum with the content.

You can see how I have it set up here (www.peterska2.co.uk/vbnewscms.php)

For that it is a nice Idea. Sorry for my first Comment to this. :)

RaceJunkie
08-30-2006, 10:06 PM
Can only one page be made? Just curious..

davidw
08-30-2006, 11:16 PM
Can only one page be made? Just curious..In theory, I would assume you could make more than one page, provided you
A) Use the legacy version of the file
B) change the name of the file
C) edit this line define('THIS_SCRIPT', 'vbnews'); to the name of the new file (without .php on the end)
D) Only use the sections you want for each script. They start with: if (forumid1) {
$getnews1 = $db->query_read(" and end with
}
} and leave ALL other code intact.

I've not tried this, so I don't know if it will work - but I suspect it could.

RMS-Chef
08-31-2006, 01:13 AM
Nice style in that screenshot ;)

jugo
08-31-2006, 01:19 AM
I think it is useless. Nobody wants something like this if he can have a complete Portal like vBadvanced.

That was a useless post don't you think??:confused:

Way to support your fellow contributors.

I think it's a wonderful idea. in fact, I think this may be a starting point to replace the Defunct vBExternal Hack.

dirtycrow
08-31-2006, 05:23 AM
this looks pretty cool, example of it working live tho? i have vbadvanced and wonder how i would incorporate this into my site.

dirtycrow
08-31-2006, 05:29 AM
also, perhaps you could answer a question. I've tried to run news rss feeds on my site before, but the members complain that they don't want to see 1000 new threads just from the news feed in the "new posts" section."

is there any way to get newly created threads from the news feed not to show up on "new posts" until at least a couple of replies to the said threads?

chriszep
08-31-2006, 07:29 AM
great !
exactely what i wanted
thanks a lot ;)

davidw
08-31-2006, 12:20 PM
Nice style in that screenshot ;)Thanks - I like that style.

this looks pretty cool, example of it working live tho? i have vbadvanced and wonder how i would incorporate this into my site.I have it running live http://www.christianboards.org/vbnews.php
All I did was not use the news function for the home page in vba admincp options and put a link for the page in my navigation menu on the left side of my home page.

also, perhaps you could answer a question. I've tried to run news rss feeds on my site before, but the members complain that they don't want to see 1000 new threads just from the news feed in the "new posts" section."

is there any way to get newly created threads from the news feed not to show up on "new posts" until at least a couple of replies to the said threads?You can limit however many you want to show in the admincp options for vb news. In regards to post count, I'm not sure offhand, but it would have to be a query edit. I can look into this when I get time, but it could be a few days.

peterska2
08-31-2006, 01:07 PM
this looks pretty cool, example of it working live tho? i have vbadvanced and wonder how i would incorporate this into my site.

Another example is at www.peterska2.co.uk/vbnewscms.php

I have named my link in the navbar News Feeds as that is what I am using it to display.

also, perhaps you could answer a question. I've tried to run news rss feeds on my site before, but the members complain that they don't want to see 1000 new threads just from the news feed in the "new posts" section."

is there any way to get newly created threads from the news feed not to show up on "new posts" until at least a couple of replies to the said threads?

I run an exclude in the new posts link to exclude the new feeds from the new posts search at all times. However, the new posts/todays posts in the quicklinks I have left where they include the news feeds. To exclude if they are in a forum and have less than x replies will take a query, and depending on how often new posts searches are ran, could be rather server intensive.

lasto
08-31-2006, 04:28 PM
dont work for me - i dont have a forumid that begins with 10 for some reason so is there no way to fix this.In admincp i have entered the corect forumids for the forums i want to show but the sql error is still coming up when i go to the page.

Why have a default forumid10 anyway ??

peterska2
08-31-2006, 04:34 PM
Replace the 10 in the first one with the first forum you wish to have the news taken from. This can be any number.

davidw
08-31-2006, 04:40 PM
10 was only used as an example. Make sure the rest of the forums are set to 0 (ones that are not in use). What version of MySQL do you have and which version of the software did you use?

lasto
08-31-2006, 06:05 PM
i used vbnews.php

Database error in vBulletin 3.5.4:

Invalid SQL:

SELECT t.threadid, t.title, t.lastpost, t.forumid, t.open, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, t.visible, t.firstpostid, f.title AS forumtitle, post.pagetext AS preview
FROM forum f
INNER JOIN thread t ON t.forumid = f.forumid AND t.visible = 1 AND 5 > ( SELECT count(5) FROM thread WHERE forumid = f.forumid AND visible = 1 AND dateline > t.dateline )
LEFT OUTER JOIN post AS post ON post.postid = t.firstpostid WHERE t.forumid IN (102,0,0,0,0,0,0,0,0)
ORDER BY field(f.forumid,102,0,0,0,0,0,0,0,0), t.dateline desc;

MySQL 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 'SELECT count(5) FROM thread WHERE forumid = f.forumid AND visib
Error Number : 1064

also i have entered the correct forumids i want and still get the error.

Any i dont want to use i have left at 0

davidw
08-31-2006, 06:09 PM
Which version - regular or legacy? If your MySQL version is lower than 4.1 then the vbnews-100 will not work and give you the above error message - try using the vbnewslegacy-100.

lasto
08-31-2006, 06:11 PM
got it soprted now using the vblegacy version cheers

/me clicks install

davidw
08-31-2006, 06:18 PM
:D - glad to hear it was sorted.

zooki
08-31-2006, 06:35 PM
Hi please ignore the guy who says this is rubbish or not needed. Its something that can be useful. thank you

RaceJunkie
08-31-2006, 06:43 PM
is there any way to get newly created threads from the news feed not to show up on "new posts" until at least a couple of replies to the said threads?


This may work..

Opt-Out Forums from Get New/Get Daily (https://vborg.vbsupport.ru/showthread.php?t=91025&highlight=Exclude+Forums)

Antivirus
08-31-2006, 06:55 PM
nice job christianb, i wish i knew you were going to come out with this, i just spent the last week or two writing something very similar for our website's homepage, but not for public release. great work!

davidw
08-31-2006, 07:59 PM
Thanks - its an idea I had for a long while, but I had to learn a lot before I could actually put it to use. I've got a lot of ideas, but very few will see the light of day as I've not the knowledge to get them working. :)

RaceJunkie
08-31-2006, 11:19 PM
I have it installed and it is working correct but it throws my New Thread link to the right. I have tried bothe versions. I am using the posbit_Legacy style on my forums, does that affect it?


http://www.localracechat.com/forums/vbnews.php


I just added a default style (no parent) and still get the same results.. I have to scroll left to right

http://www.localracechat.com/forums/vbnews.php?styleid=113

davidw
08-31-2006, 11:34 PM
What you may need to do is create a new button for new thread and edit the vbnewscms_sectionhead template.

Change this <img border="0" src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[vbnews_newstory]" /> to the location of the new button.

Edit: another thing (based on your edit) you can change vbnewscms_articlebit to alter the width a little.

Change width="100%" <table cellspacing="0" cellpadding="$stylevar[cellpadding]" border="0" class="tborder" width="100%"> to width="90%" and see if that doesn't help the width.

RaceJunkie
08-31-2006, 11:38 PM
What does the button have to do with the table stretching to the right though? It even does it on a default style..

Can I just delete the new thread link all together?

davidw
08-31-2006, 11:40 PM
Yes, you can. Did you see my edit above?

RaceJunkie
08-31-2006, 11:42 PM
Yes, you can. Did you see my edit above?

Sorry did not see that.. I'll go try it, thanks..

peterska2
08-31-2006, 11:42 PM
If that doesn't work let me know and provide a link to the page and I'll make any changes required to the templates for you.

davidw
08-31-2006, 11:59 PM
I'm wondering if it is a couple articles that are causing the issue, such as (SpeedwayMedia News Feeds)-Chase set unless something weird happens - the URL in there is stretching - along with the next article.

RaceJunkie
09-01-2006, 12:00 AM
I got the main content to align corectly, done away with the New Thread button but now the RSS News Feeds title bar stretches to the right.. when I change the vbnewscms_sectionhead to a different % like 75% it leaves a gap to the right.. Instead of bringing it in.

Here is what I have now.
http://www.localracechat.com/forums/vbnews.php

davidw
09-01-2006, 12:03 AM
Look down the page to where the two articles are that I mentioned above... I think that's what's causing the issues.

RaceJunkie
09-01-2006, 12:03 AM
I'm wondering if it is a couple articles that are causing the issue, such as (SpeedwayMedia News Feeds)-Chase set unless something weird happens - the URL in there is stretching - along with the next article.


I did not notice that one.. Everything looks fine except when you scroll down, then it stretches back out..


Is this from it not parsing bb code?

davidw
09-01-2006, 12:06 AM
Not parsing bbcode will allow the original hyperlinks to show - however I've not encountered long words yet so I'll have to see if there's a way to limit the length of characters on large words.

RaceJunkie
09-01-2006, 12:08 AM
Not parsing bbcode will allow the original hyperlinks to show - however I've not encountered long words yet so I'll have to see if there's a way to limit the length of characters on large words.


thanks for the help, I clicked installed so I wont miss anything..

davidw
09-01-2006, 12:09 AM
One thing you could try is this:

In the vbnews.php file, change this:
$news['pagetext'] = strip_bbcode(fetch_censored_text(substr($news['preview'], 0, $charlimit)));
to this:
$news['pagetext'] = fetch_censored_text(substr($news['preview'], 0, $charlimit)); for each of the forums and see if that doesn't fix it.

RaceJunkie
09-01-2006, 12:21 AM
Ok I just noticed this.. I tried the php edite above and it did not fix it.. So I uploaded the original back.

I am using Firefox and everything stretches to the right..(should have mentioned this:confused: ) When I use I.E everything is correct except for the top navigation (breadcrumb area) and my footer. But they are fine in all my other pages? If you would like me to post some pics I will, but you can see it using I.E.

davidw
09-01-2006, 02:00 AM
I am pretty sure its because of those two articles. Let me see if I can find a way to limit the size of long words so that the url doesn't extend.

project-Buckfas
09-01-2006, 10:59 AM
I had the same idea as you!

Looks great.

installed and used as a source for my RSS feeds instead of having a very busy looking forum with the content.

You can see how I have it set up here (www.peterska2.co.uk/vbnewscms.php)

Christianb I will install this tonight when I get home. Thank you

Rushyman
09-28-2006, 01:13 AM
Just what I need. I want to run this as an include and I can get it to work fine. Only problem I have is once the script has run it ceases to load the rest of the page. Any ideas how to get it to load the rest of the page once the script has completed it's DB query? I have this outside of the VB directory.

davidw
09-28-2006, 10:38 AM
Do you have a link to where it is? I'm a little confused at what is going on.

daloosaa
10-02-2006, 06:53 PM
Works fine with vBulletin 3.6.1,
great mod!

Greets,
Flo

thunder_sti
10-03-2006, 07:29 AM
How about if I dont have MYSQl to 4.1 ??? but I have vb version 3.5.5/// would this still work????

thunder_sti
10-03-2006, 07:30 AM
^^^ I would really need this hack, if I can be able to use it...^^^ I have made my own personal Homepage,,,so this is a must... btw; Nice hack..

Thanks...

davidw
10-03-2006, 10:13 AM
Yes, you would use the vbnewslegacy version :)

molieman
01-14-2007, 02:42 PM
Just added to our site and is a Excellent addition to vBulletin :) Thank you for your contribution.

We want to be able to have multiple vbnews.php (pages). In our case we would like to use vbnews(1) as a Builders interviews, and vbnews(2) as Vendor Interviews and so on.

So... the question is; what would it take to make multiple vbnews (pages)?

Matt Olieman
www.mycockpit.org

davidw
01-14-2007, 06:16 PM
We've already experimented with this and got it to work. There are a few things to do - one is to rename the script and edit a section within the script.

For the script, rename vbnews.php to whatever.php and then edit this line:
define('THIS_SCRIPT', 'vbnews');changing the vbnews to whatever you named the script. Then alter the variables on this script.

In the product, all the variables will need to be altered (to match the variables you changed them to in the script), along with certain names (product name, template names, etc.). This would take some work, but it can be done.

Btw, I also have a 3.6 version of this script that has more features - including bbcode support, plus don't forget to click install ;).

molieman
01-14-2007, 06:52 PM
Thank You!!!! :)

and OOPS.... Posted in the wrong thread. I do have the 3.6 version... does the changes you mentioned, apply in the 3.6 version also?

Maybe I don't.... are you talking about the legacy version?

davidw
01-14-2007, 07:00 PM
yep - there is only one version for the 3.6 version https://vborg.vbsupport.ru/showthread.php?t=133302

mrpaint
07-29-2007, 05:23 AM
www.game4v.com
www.game4v.com/yega

rotti
07-31-2007, 06:32 AM
hello where I can translate that [Read On] in german?

thanx for help :D

Edit: I found it ;)

davidw
12-14-2008, 01:12 PM
This modification no longer supported.