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)
-   -   Away message for users (https://vborg.vbsupport.ru/showthread.php?t=33099)

Lesane 12-14-2001 11:26 AM

hehe aight :D

TheComputerGuy, were you drunk or something? :D

bira 12-14-2001 11:50 AM

[QUOTE]Originally posted by Tarion
Bira: how can I get a complet list of the members who has marked as away??? like the staff list or in the memberlist with an extra link in the navbar.

Can you explane me how can i do that!

THX for this great hack.

Lesane 12-14-2001 12:59 PM

[QUOTE]Originally posted by bira
1) If you want an extra link in the memberlist's navbar, then open memberlist.php and find:

Code:

  if ($what=="datejoined") {
    $orderby="joindate";
    $direction="DESC";
  }

AFTER it ADD

Code:

  if ($what=="away") {
          $condition.="away='1'";
  }


bira 12-14-2001 02:18 PM

Lesane, that's not the only possible condition though. So the dot is necessary. It wasn't a mistake.

Lesane 12-14-2001 03:13 PM

Strange because with the dot i receive this error:
Database error in vBulletin: Invalid SQL: SELECT COUNT(*) AS users
FROM user,userfield
WHERE 1=1away='1' AND
user.userid = userfield.userid
AND usergroupid NOT IN (1,3,4)

mysql error: Unknown column '1away' in 'where clause'
mysql error number: 1054
Date: Friday 14th of December 2001 04:04:42 PM
Script: /board/memberlist.php?what=away

Without the dot it works perfect :confused:

bira 12-14-2001 03:22 PM

A-ha! That's cos it is missing the space AND space :D

Code:

  if ($what=="away") {
          $condition.="[high] AND [/high]away='1'";
  }


Lesane 12-14-2001 03:38 PM

haha :D

but it works good without the dot :p

bira 12-14-2001 03:47 PM

well yes, because without the dot it diminishes the rest of the conditions, which means there's no need for an AND and spaces.

A dot is a connector.

PHP Code:

$condition 1;
echo 
$condition// will output "[b]1[/b]"

$condition .= 2;
echo 
$condition// will output "[b]12[/b]"

$condition 2
echo 
$condition// will output "[b]2[/b]" 

Comprende? :D

Lesane 12-14-2001 04:01 PM

haha, cool :cool:

Thanks, learned something day ;)

KuraFire 12-15-2001 02:38 PM

Bira, your hack, albeit really nice, is killer to making a backup of a database. For me, at least.


I installed your hack, then later on I added the Admin Panel bit so that I could check everyone's status in the AP and change it, and then I took the test.

I made a backup dump through the Admin Panel, all settings to Yes (as the default is), saved it as vbulletin.sql - then I made a new directory (this is all on my personal computer, not online or anything), threw the files of vBulletin in there, installed it again (on a new database, completely empty, fresh install), added the files of all my hacks, installed the Away user hack again (ran the install_awayusers.php script) but didn't yet add the Admin Panel bit, then I went into phpMyAdmin and clicked on the new database with a fresh install of vB (but overwrote the files with the hacked php files from the already customized board where everything's working), and below the textfield "Run Queries on database ....:" I entered the location of the vbulletin.sql (the one where you're supposed to enter .sql files) and hit GO.

At first, it started inserting the dump file nicely into the database, but then the user table came and it quit at the second entry. Why not the first? The first is my own entry, which was on Away status for 10 or so days when I made the dump. The second entry wasn't. The input process errored out saying:

"MySQL says: column 'awaydate' cannot be NULL!"

Now, how can I fix this? If I look at the working database and working version where I installed this hack and many others, all the users that haven't put themselves on Away status (i.e. everyone except for myself, because this is an offline board only for hacking and preparing) all their values in the AWAYDATE column in the user table are NULL - but when I want to update the database with a backup dump, MySQL says that the value CANNOT be null!!

Please help!


All times are GMT. The time now is 11:10 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.01504 seconds
  • Memory Usage 1,742KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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