vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   News Out - posts from forum(s) on any page (https://vborg.vbsupport.ru/showthread.php?t=65114)

Rafe 05-13-2004 10:00 PM

News Out - posts from forum(s) on any page
 
This script will let you pull the first posts from threads in a forum and display them on a non-vb page anywhere on your site.

For example you can use this to pull posts from a forum and display them as news. (Each post in the forum is a news item).

Currently it will pull them on the basis of thread start date.

This is very rough and ready. But maybe someone will find it useful.

If you read the code and comments you can do things like strip out tags, snip the post off after the first para etc etc.

You can choose to write out to a file or to write to screen. You can pull stuff from one or many forums.

I'll try and answer any questions that come up, but this is a beta so....

Rafe

Boofo 05-14-2004 04:12 PM

Any screenshots? ;)

Rafe 05-14-2004 04:22 PM

I didn't think there was much point. It pulls the text and images (and any stuff from the post). The intention is you integrate into other pages.

I use it to power various things at my site - http://www.allaboutsymbian.com

Thew news there is done like this.

mOdEtWo 05-15-2004 12:24 AM

Thank you Rafe, I'll try it out.

One thing tho, why don't you use the vb function to connect to mysql database, instead of putting it into this script?

Rafe 05-15-2004 10:30 AM

Quote:

Originally Posted by mOdEtWo
Thank you Rafe, I'll try it out.

One thing tho, why don't you use the vb function to connect to mysql database, instead of putting it into this script?

I should do, but I'm not familiar enough with how to do it. If I ever move this on to a proper release that's one of the things I would do. I guess I should look at the code for some similar connections (suggestions anyone?)

GamerJunk.net 05-15-2004 12:46 PM

Is this like VBAdvanced?

wrongful 05-15-2004 07:33 PM

excuse me for the dumb question but what would be the best way to embed this content into a page.

mOdEtWo 05-15-2004 08:45 PM

Quote:

Originally Posted by Rafe
I should do, but I'm not familiar enough with how to do it. If I ever move this on to a proper release that's one of the things I would do. I guess I should look at the code for some similar connections (suggestions anyone?)

Well, as far as I know, you can use vB's way to connect to the mysql database, instead of having to use sql quesies yourself.

Code:

$sql_news = $DB_site->query("SELECT thread....... +++
You better look at one of the vB files or other hacks on how to use it tho. ;)

Rafe 05-15-2004 10:34 PM

Quote:

Originally Posted by RasMasta
Is this like VBAdvanced?

No. This isn't a portal system. You can use it to create a portal like affect. Its more flexible in that you have more choice in what you pull, but it take more time to set up.

Rafe 05-15-2004 10:36 PM

Quote:

Originally Posted by wrongful
excuse me for the dumb question but what would be the best way to embed this content into a page.

You could either copy this code into the relevant file or include this file in another page, or you could write out to a file and include that in the relevant file.

Obviously copy / include where you want the code to appear and edit appropriately.


All times are GMT. The time now is 04:11 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.01677 seconds
  • Memory Usage 1,735KB
  • 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
  • (1)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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