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)

AlexSFBay 09-04-2004 06:36 PM

Wow, you've read my mind. I've been piecing together a bunch of hacks to come up with something like this. I've downloaded it and I'll give you my thoughts on how the process went for me. In any case, excellent work, and it's very much appreciated!

AlexSFBay 09-04-2004 09:01 PM

The script works, but I'm getting errors at the end

Code:

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

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

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

Any thoughts on how I can resolve this?

-=Sniper=- 09-05-2004 09:58 PM

I get the same error! if someone can do me a similar hack! which allows me to use smilies, etc etc

then please contact me!

Viruseater 09-13-2004 06:58 PM

Wouldn't it be easier if you used

require_once("./includes/config.php");

that way you wouldn't need to use all the hard codes.

AlexSFBay 09-15-2004 05:47 AM

I randomly get "Unable to add cookies, header already sent." Any ideas how can fix that?

AlexSFBay 09-15-2004 06:46 AM

I figured it out! After a couple hours of tweaking my script, I finally figured out that

chdir('forums/');
require_once('./global.php');


needs to be located right at the very top (before any other additional PHP code -- ie header.php) in order to avoid the cookie error message.

eLiTeGuRu 09-16-2004 01:18 AM

After messing around with this code, I realized that if you have a table prefix, it will not work. Therefore do this:

Find around line 45

PHP Code:

$sql "SELECT threadid, title, forumid, replycount, postusername, postuserid, lastposter, dateline, iconid FROM thread WHERE forumid IN ($cats) AND sticky = '0' ORDER BY threadid DESC LIMIT $newsitems"

Change to:

PHP Code:

$sql "SELECT threadid, title, forumid, replycount, postusername, postuserid, lastposter, dateline, iconid FROM YOURTABLEPREFIX_thread WHERE forumid IN ($cats) AND sticky = '0' ORDER BY threadid DESC LIMIT $newsitems"

Find Line 67
PHP Code:

$sql2 "SELECT postid, threadid, username, userid, title, dateline, pagetext, iconid FROM post WHERE threadid = \"$threadid\" ORDER BY postid ASC LIMIT 1"

Change to:

PHP Code:

$sql2 "SELECT postid, threadid, username, userid, title, dateline, pagetext, iconid FROM YOURTABLEPREFIX_post WHERE threadid = \"$threadid\" ORDER BY postid ASC LIMIT 1"

and

Find around line 104

PHP Code:

$sql3 "SELECT title FROM forum WHERE forumid = \"$forumid\" LIMIT 1"

Change to

PHP Code:

$sql3 "SELECT title FROM YOURTABLEPREFIX_forum WHERE forumid = \"$forumid\" LIMIT 1"


-=Sniper=- 09-21-2004 03:09 PM

Quote:

Originally Posted by AlexSFBay
The script works, but I'm getting errors at the end

Code:

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

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

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

Any thoughts on how I can resolve this?


ok, I moved to a new server and its working fine! maybe its something to do with the server settings?

Dan 09-21-2004 07:25 PM

Hmm.... interesting mod. I could use this to work on a new custom portal. thanks for sharing it!

lcryan 09-25-2004 03:01 PM

<a href="http://www.liquid-core.net/forums/news.php" target="_blank">http://www.liquid-core.net/forums/news.php</a>

I'm getting 'Could not execute query.'


All times are GMT. The time now is 04:57 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.01282 seconds
  • Memory Usage 1,750KB
  • 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
  • (2)bbcode_code_printable
  • (6)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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