vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Last XX Posts on non-vB page (https://vborg.vbsupport.ru/showthread.php?t=12324)

03-29-2001 08:40 AM

Quote:

Originally posted by Parker Clack
Hmm... So if they are new members that just signed up on the board or they are just visiting and they aren't registered members they will get this error if they click on the link to this page, or what?

Parker

When someone visits your forum (Registered members AND guests) they are assigned a cookie.

Without this cookie your addition to Tubes hack will not work.

So if you have his hack (with your addition) on your main page, and someone visits there who has never visited your forums they will get the error above. But his hack does work fine "without" your additions for new visitors.

This is a known problem, and has caused a lot of headaches in most of the "who's online on another page" hacks also. :(

03-29-2001 08:42 AM

tubedogg:

Since you are working on hacks how about looking over the memberlist.php file to see if you can add alpha listings instead of just by page number. That is if you click on the letter A you get those members will the last name stating with A and so forth. It can get really tedious when you have over 17,000 registered members to go through page after page by the number of the page.

Thanks again for the this hack.

Parker

03-29-2001 08:47 AM

Quote:

Originally posted by Sportbikeworld


When someone visits your forum (Registered members AND guests) they are assigned a cookie.

Without this cookie your addition to Tubes hack will not work.

So if you have his hack (with your addition) on your main page, and someone visits there who has never visited your forums they will get the error above. But his hack does work fine "without" your additions for new visitors.

This is a known problem, and has caused a lot of headaches in most of the "who's online on another page" hacks also. :(

Thanks for the info. That is odd that it requires a cookie to work right.

I just found when using the option to display the message that gets posted and the person has used the vbcode in their message that it will display the code as well.

Oh, well. Thanks again for the heads up on this.

Parker

03-29-2001 09:12 AM

Robert and tubedogg:

I just logged off my board and then manually deleted the cookie I had for the forum from my hard drive and got back on the board. I was not cookied for the forum then and I clicked on the link to take me to the last10.php file. I did not get the cannot add header error message from the database with using the bbparsecode for the message. In fact the page came up just fine as before.

Have you tried this on your own board to see if you get the error message?

Just thought that I would let you know.

Parker

03-30-2001 02:28 AM

Quote:

Originally posted by Parker Clack
Robert and tubedogg:

I just logged off my board and then manually deleted the cookie I had for the forum from my hard drive and got back on the board. I was not cookied for the forum then and I clicked on the link to take me to the last10.php file. I did not get the cannot add header error message from the database with using the bbparsecode for the message. In fact the page came up just fine as before.

Parker

You not only need to delete the cookie to see the error pop-up, but you also need to shut down your browser and restart it. At least that's how I got the error to pop-up with this and other hacks that require global.php

03-31-2001 05:39 PM

Can anyone help with a problem I'm having with this script? I keep getting "Can't select database" error every time. All of the variables are set correct, but I still get this. In the last10.php file I see the code:

"mysql_select_db($dbname) or die("Can't select database");"

This is where the error is at and the script dies there. I havn't changed anything else other than what it said to do. Why is it having troulbe at that line?

Thanks for any input.

Jeff

03-31-2001 07:58 PM

If you're getting that far, then all your variables are indeed set correctly. Can you try something for me? I've attached a zip file to this message - open it, edit the username, password, database host ($dbhost), and database name ($dbname) in both files (testmysql1.php and testmysql2.php) and put both files on your server where the last10.php file is, then go to testmysql1.php in a web browser, e.g. http://www.yoursite.com/path/to/testmysql1.php and tell me what happens.
Then go to testmysql2.php e.g. http://www.yoursite.com/path/to/testmysql2.php and tell me what happens.

Sorry you're having problems. Hopefully this will solve it!

04-01-2001 06:34 AM

Both test files now say they selected database ok when called from a browser. Now, how to fix in the other to call it ok instead of the error?

Jeff

04-01-2001 03:57 PM

congrats!!!
It's just maybe too big :/
I will modify that

04-01-2001 09:55 PM

Jeff: Hmm. I was expecting those two files to fail. What doesn't make sense is if they worked, why the other one wouldn't. Or, more succinctly, why the other one fails where it does. If it's having problems connecting, it should fail at the connect step, not at the select database step.

Here's what I suggest. Since the only thing I'm pulling from the vB files for this is username, password, db host, and database name, put these up at the top of the last10.php file as so:
Find
Code:

// let's get connected
require("last10config.php");
require("$path/config.php");

and replace it with
Code:

// let's get connected
require("last10config.php");
$servername = "localhost";
$dbusername = "dbusername";
$dbpassword = "dbpassword";
$dbname = "dbname";

and change the info to your details. That should work. If it still doesn't let me know and I'll look into it some more.

:scratching head:


All times are GMT. The time now is 06:37 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.01662 seconds
  • Memory Usage 1,744KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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