vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Problem Solved: Need a simple news publishing script with vB integration (https://vborg.vbsupport.ru/showthread.php?t=164003)

Bradley_Wint 12-01-2007 12:02 AM

Problem Solved: Need a simple news publishing script with vB integration
 
Ok, So on my site's home page I post the latest news. I am using vBExternal but this script is causing a bit of a problem when pulling urls from the forum.

Before I describe what I need, take a look at the article system.

http://www.grandtheftcentral.com/

When I post news articles in a designated forum, it publishes it to the front page where it displays the post, post author, number of replies, date and so on.

I need another one though since this one is a bit buggy.

Requirements
- I should be able to post articles from some sort of admin panel via a simple WYSIWYG or HTML panel
- It should output basics like Title, Post Body, Comment Numbers, Post Comment Link and so on
- People would need to log on first to post a comment

Simple as that. I don't care where it stores the news, it could be in a forum or in an independent db table, once it does the above jobs. Any help.

Thanks a lot.

RaceJunkie 12-01-2007 01:15 AM

Take a look at Dynamics..
http://www.vbadvanced.com/

Bradley_Wint 12-01-2007 01:19 AM

The problem is that vbAdvanced controls the entire front page. All I want is to manage the news. I just want to include it within my current template.

RaceJunkie 12-01-2007 01:25 AM

How are yo pulling the content from your forums to the front page now?

Could you not use RSS?

Bradley_Wint 12-01-2007 01:28 AM

Well the comments people make are the comments in the post.

Code:

http://www.autogamingcentral.com/forum/forumdisplay.php?f=56
Posts are in this forum...the first post displays on the home page and any replies are considered comments/replies

I wouldn't mind using RSS but do you have a script prog I could try out?

RaceJunkie 12-01-2007 01:34 AM

Quote:

Originally Posted by Bradley_Wint (Post 1392718)
Well the comments people make are the comments in the post.

Code:

http://www.autogamingcentral.com/forum/forumdisplay.php?f=56
Posts are in this forum...the first post displays on the home page and any replies are considered comments/replies

I wouldn't mind using RSS but do you have a script prog I could try out?


All you would do is add the feeds to your page where you wanted them to show. Here is an example on the bottom left of this page that i done for a customer. I'm just tossing out ideas someone else may have something better. http://www.countylineracewaync.com/

--------------- Added [DATE]1196480179[/DATE] at [TIME]1196480179[/TIME] ---------------

I built the feed using this site.
http://feed2js.org/index.php?s=build

Bradley_Wint 12-01-2007 01:39 AM

Ah yes that's basically something like it. The only difference with mine would be it would need to pull news from a certain forum, and then display the first post of each thread with the comments and so on. Would it be able to display images and other forms of HTML?

I honestly don't know, haven't worked with RSS before.

RaceJunkie 12-01-2007 01:50 AM

You can pull fees from any forum. I use Fire Fox and whenever Im viewing a forum the feed icon shows in the address bar. I just click that to jet my feed url.

http://www.localracechat.com/news/ex....php?type=RSS2


Not sure about the photos, maybe if they were at the top of the post. I would create a blank page on the site and experiment with it. The site above is really easy to use take about 5 mins to set up a feed and you can preview it as well.

I don't think the comments and posts #'s will show up like this, I could be wrong as there may be another way but this is all I know of personally.


You will also need to make sure your external feeds options are on in you vB options in the control panel too.

Bradley_Wint 12-01-2007 01:53 AM

Yea I'll turn it on and experiment...Quite helpful info.. thanks a lot

for other folks, please share any additional ideas. Thanks.

RaceJunkie 12-01-2007 02:01 AM

Good Luck i hope you find what you need.

Bradley_Wint 12-01-2007 05:05 AM

I did some tinkering with my script and ended up removing a couple of lines that were not needed and it's all fixed now.

!!!cyr0n_k0r 12-22-2007 08:36 AM

I'm trying to do this EXACT thing.

I've messed with vbadvanced and don't like how it takes over the entire page. All I want is ti pull news articles posted to a certain forum and have it displayed on a custom built page.

Bradly, can you provide the code you are using to accomplish this?

Bradley_Wint 12-22-2007 06:17 PM

1 Attachment(s)
Quote:

Originally Posted by !!!cyr0n_k0r (Post 1406680)
I'm trying to do this EXACT thing.

I've messed with vbadvanced and don't like how it takes over the entire page. All I want is ti pull news articles posted to a certain forum and have it displayed on a custom built page.

Bradly, can you provide the code you are using to accomplish this?

well vbexternal does the trick.... as for the image problem, i can't remember...here is my vbexternal.php... adjust to suit for yourself...plus get the instructions from the original download.

!!!cyr0n_k0r 12-22-2007 07:04 PM

Bradley, are you calling for this information in a template? If so, what does your template code look like for the section related to pulling the post info?

--------------- Added [DATE]1198357665[/DATE] at [TIME]1198357665[/TIME] ---------------

EDIT: nevermind, I see why your vbexternal is longer than the default. You are calling for multiple news postings.

Also, you mentioned you edited some lines of the code that wern't needed. What did you take out that solved the problem you were having?

Bradley_Wint 12-22-2007 07:20 PM

Well I can't remember exactly...I remember having to put a // infront of a line of code to deactivate it. Read through the vBExternal 1.6 Lite thread, it's somewhere in there.

And yes I am pulling like three or four different feeds so I had to copy the code for different templates.

!!!cyr0n_k0r 12-22-2007 07:33 PM

Alright, I've gotten everything uploaded and installed. But when I add output_NewestReplies(5,"1,2,3"); to the PHP file nothing is displayed when I load it up in IE.

PHP Code:

eval('print_output("' fetch_template('Index') . '");');
output_News(1,3);
output_NewestReplies(5,"1,2,3,4,5"); 

I've got a template that the PHP file pulls from called "index" What would I need to add in the index template to display the news post?

$news ??

Bradley_Wint 12-25-2007 12:52 AM

well you don't need this line
Code:

eval('print_output("' . fetch_template('Index') . '");');
and i assume you put all that within php tags...?

sample
Code:

<?php
output_News(100,56);
?>

the 100 represents the numbers of articles you want shown, the 56 is the forum id of the forum posts you want outputted.

in my case .
Code:

http://www.grandtheftcentral.com/forum/forumdisplay.php?f=56
you could change the numbers to suit how much you want outputted and desired forum..


also remember to include


Code:

<?php
chdir('./forum');
require_once('./vBExternal.php');
?>

before the <html> tags in the head of the document...adjust the chdir to suit the location of ur forum.

and did you upload the relative files to your forum folder?

vBExternal.php > forum main folder
vBExternal folder > forum main folder


let me know if this helps. :)


All times are GMT. The time now is 04:59 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02126 seconds
  • Memory Usage 1,760KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (17)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete