Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases

Reply
 
Thread Tools
News Out - posts from forum(s) on any page Details »»
News Out - posts from forum(s) on any page
Version: 1.00, by Rafe Rafe is offline
Developer Last Online: Mar 2011 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 05-13-2004 Last Update: Never Installs: 30
Is in Beta Stage  
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #62  
Old 10-12-2004, 05:01 PM
House_of_Crazed House_of_Crazed is offline
 
Join Date: May 2004
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, it probably is the forumspath that has not been defined correctly.

Look for $forumspath

Smilies works fine on my site. It took me awhile to figure it out, lol ... *sigh* I'm happy I'm done with figuring it out. *laughs*
Reply With Quote
  #63  
Old 10-12-2004, 06:06 PM
hkvic hkvic is offline
 
Join Date: Oct 2004
Location: Sussex UK
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm. the smilies are there if you view the newsout.php output, but disappear once the file is included into the .shtml page
Reply With Quote
  #64  
Old 11-18-2004, 06:10 PM
dfmafia dfmafia is offline
 
Join Date: Jul 2002
Location: Wherever Uncle Sam Needs
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

having problems...i really want this to work properly...

here goes:

http://dfmafia.net/forums/newsout.php <-- works fine

http://dfmafia.net/network1.php <--- inop (its after the text "Need to fix the News script that when it grabs the articles out of the forums we don't loose right content ")

heres the code im using to include the newsout.php:

PHP Code:
<?php
include('/THE/DIRECTORY/TO/forums/newsout.php');
?>
(its after the text "Need to fix the News script that when it grabs the articles out of the forums we don't loose right content ")



that first NEWS block works fine but all it did was grab the titles...i want part of the text as well...


http://dfmafia.net/network.php

im using the below script and it gets what i want but i loose the right table and footer on the page...

PHP Code:
<?php
error_reporting
(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS'1);
define('THIS_SCRIPT''news');
require_once(
'global.php');
require_once(
'./forums/includes/functions_bbcodeparse.php');
$news mysql_query("select thread.threadid,thread.title,thread.replycount,thread.postusername,thread.dateline,post.postid,post.pagetext from thread,post where thread.forumid=3 and post.postid=thread.firstpostid group by thread.firstpostid order by threadid desc limit 10;");
$n 0;
while(
$newsitem mysql_fetch_row($news)){
$n++;
$newstitle[$n]=$newsitem["1"];
$newsreply[$n]=$newsitem["2"];
$newsuser[$n]=$newsitem["3"];
$newsdate[$n]=vbdate("D j M Y, g:i A",$newsitem["4"]);
$newsthread[$n]=$newsitem["5"];
$limittext[$n] = substr($newsitem["6"], 0200) . "...";
$newstext[$n]=parse_bbcode($limittext[$n]);
$newsavatar[$n]=$newsitem["7"];
}
eval(
'$newstables = "' fetch_template('news_table_s') . '";');
eval(
'$newstablem = "' fetch_template('news_table_m') . '";');
eval(
'$newstablee = "' fetch_template('news_table_e') . '";');
eval(
'print_output("' fetch_template('news') . '");');
?>

heres how the page is suspose to look: http://dfmafia.net/network_A.php

minus the news...it has the right and footer content
Reply With Quote
  #65  
Old 12-31-2004, 11:08 PM
Sean S's Avatar
Sean S Sean S is offline
 
Join Date: Jan 2004
Location: Chicago
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for this hack, but could you explain why I get this error by any chance?

Code:
Warning: mysql_query(): 6 is not a valid MySQL-Link resource in /home/static/public_html/forums/includes/db_mysql.php on line 212

Warning: mysql_error(): 6 is not a valid MySQL-Link resource in /home/static/public_html/forums/includes/db_mysql.php on line 357

Warning: mysql_errno(): 6 is not a valid MySQL-Link resource in /home/static/public_html/forums/includes/db_mysql.php on line 358

Warning: mysql_query(): 6 is not a valid MySQL-Link resource in /home/static/public_html/forums/includes/db_mysql.php on line 212

Warning: mysql_error(): 6 is not a valid MySQL-Link resource in /home/static/public_html/forums/includes/db_mysql.php on line 357

Warning: mysql_errno(): 6 is not a valid MySQL-Link resource in /home/static/public_html/forums/includes/db_mysql.php on line 358
everything else works fine, but at the bottom I get these errors.
Reply With Quote
  #66  
Old 01-16-2005, 12:13 AM
eLiTeGuRu eLiTeGuRu is offline
 
Join Date: Apr 2004
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Put a @ in front of the mysql queries.
Reply With Quote
  #67  
Old 01-25-2005, 12:55 PM
i-Symbian.Com i-Symbian.Com is offline
 
Join Date: Jan 2005
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

eLITeGuRu,

I experienced the same as above. All working fine but I received these errors in the bottom of the page:

Code:
Warning: mysql_query(): 6 is not a valid MySQL-Link resource in usrlocalpsahomevhostsi-symbian.comhttpdocsforumincludesdb_mysql.php on line 212

Warning: mysql_error(): 6 is not a valid MySQL-Link resource in usrlocalpsahomevhostsi-symbian.comhttpdocsforumincludesdb_mysql.php on line 357

Warning: mysql_errno(): 6 is not a valid MySQL-Link resource in usrlocalpsahomevhostsi-symbian.comhttpdocsforumincludesdb_mysql.php on line 358

Warning: mysql_query(): 6 is not a valid MySQL-Link resource in usrlocalpsahomevhostsi-symbian.comhttpdocsforumincludesdb_mysql.php on line 212

Warning: mysql_error(): 6 is not a valid MySQL-Link resource in usrlocalpsahomevhostsi-symbian.comhttpdocsforumincludesdb_mysql.php on line 357

Warning: mysql_errno(): 6 is not a valid MySQL-Link resource in usrlocalpsahomevhostsi-symbian.comhttpdocsforumincludesdb_mysql.php on line 358
I have tried to put @ in front of mysql_query (there are 3 of them) like you suggested but still the same errors. It looks like this :

Code:
@mysql_query
Please advice. All appreciated.

Thanks and best regards
Reply With Quote
  #68  
Old 03-10-2005, 06:47 PM
EH-Jay's Avatar
EH-Jay EH-Jay is offline
 
Join Date: Oct 2004
Location: Canada
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can anyone help me with this 1? I get the common 3 errors at the bottom of the page, and everything is setup as it should be.

Thanks
Reply With Quote
  #69  
Old 04-26-2005, 10:01 AM
rikku3978 rikku3978 is offline
 
Join Date: Mar 2004
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone getting the three lines of text at the bottom, remove:

//disconnect
mysql_free_result($sql_result);
mysql_close($connection);

From your newsout.php file and it should resolve it. ^^
Reply With Quote
  #70  
Old 04-26-2005, 01:08 PM
-=Sniper=- -=Sniper=- is offline
 
Join Date: May 2002
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thaks dude it fixed it!
Reply With Quote
  #71  
Old 04-30-2005, 12:51 AM
greenhybrid greenhybrid is offline
 
Join Date: Jan 2005
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks to be nice when it's finished. Thanks.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:50 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.04770 seconds
  • Memory Usage 2,320KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete