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 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 11:35 AM.

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.01873 seconds
  • Memory Usage 1,736KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete