vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Add Who's Online Locations From Admin CP (https://vborg.vbsupport.ru/showthread.php?t=66569)

FleaBag 06-26-2004 08:29 PM

Here you go... No table prefixes - I don't like to over-complicate.

Quote:

Database error in vBulletin 3.0.1:
Invalid SQL:
INSERT INTO datastore
VALUES ('custom_online', 'a:0:{}');
mysql error: You have an error in your SQL syntax near ';
' at line 3
mysql error number: 1064
Date: Saturday 26th of June 2004 02:28:44 PM

Dean C 06-26-2004 08:31 PM

This looks great! Thanks for sharing with the community :)

58sniper 06-26-2004 08:32 PM

I'm getting an error as well during the first step (running whos_online.php)

Code:

Database error in vBulletin 3.0.1:

Invalid SQL:
                        INSERT INTO datastore
                        VALUES ('custom_online', 'a:0:{}');
               
mysql error: You have an error in your SQL syntax near ';
                ' at line 3

mysql error number: 1064


FleaBag 06-26-2004 08:34 PM

Same error as myself.

Trigunflame 06-26-2004 08:41 PM

Try This

PHP Code:

Find This:

// Install
$DB_site->query("
    INSERT INTO "
.TABLE_PREFIX."datastore 
    VALUES ('custom_online', '"
.addslashes(serialize($array))."');
"
);

And 
replace it with this:

$DB_site->query("INSERT INTO " TABLE_PREFIX "datastore VALUES ('custom_online', 'a:0:{}')");

Tell me if that works.. 


FleaBag 06-26-2004 08:45 PM

That worked, thank you. :)

Trigunflame 06-26-2004 08:55 PM

Ok good, I reuploaded the zip file with the fix. Should work fine now for everyone.

FleaBag 06-26-2004 08:57 PM

Not sure where I went wrong... It doesn't seem to have worked. No errors, it just says that locations I have added are unknown locations.

Trigunflame 06-26-2004 09:00 PM

Show me a screenshot of your current (custom_online.php) in the browser. If you put the modifications where I told you, it should work just fine.

Remember its doing this based on single filenames, I havn't added support for multiple pages via ?this=that etc...

58sniper 06-26-2004 09:27 PM

The first posted fix resolved my issue as well. It's working now.

The one minor thing I'd change it the ability to NOT show a link to the particular location. I've managed to obtain that with this hack by just putting a space in the URL Display field. But a checkbox or something to not show a link would be nice..

Other than that, this was a MUCH needed hack and should become part of vBulletin


All times are GMT. The time now is 10:05 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.01028 seconds
  • Memory Usage 1,738KB
  • 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
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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