Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by bira bira is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 12-09-2001 Last Update: Never Installs: 109
 
No support by the author.

Hi,

This is something that is common in IRC - /me is away

In BBs, a user is either online or offline (or invisible).

But, on my Bulletin Board, the folks created such a community that every time someone goes on a holiday or goes offline for a while, he/she posts a new thread to annouce they're 'away.

So, I wrote a hack allowing a user to change his/her status to "away", including a return date and an away reason which will show up in their profile.

Likewise, the online/offline icon in postbit and buddy list will change to an away icon (a very faded version of the 'offline' one).

Some demo captures:

The Edit Profile screen, when a user is NOT away:



The Edit Profile screen when a user IS away:



The Get Info (User Profile) screen when a user IS away:



The Get Info (User Profile) screen when a user is NOT away:



The postbit icon when a user is away:




How to install:

Download the attached zip file. Upload away.gif to your images dir (or create your own away.gif).

Upload install_awayuser.php to your admin dir and follow the instructions.

Cheers,

Bira

newest version by sho here:
https://vborg.vbsupport.ru/showthrea...606#post287606

Show Your Support

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

Comments
  #92  
Old 12-14-2001, 11:26 AM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hehe aight

TheComputerGuy, were you drunk or something?
Reply With Quote
  #93  
Old 12-14-2001, 11:50 AM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[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.
Reply With Quote
  #94  
Old 12-14-2001, 12:59 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[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'";
  }
Reply With Quote
  #95  
Old 12-14-2001, 02:18 PM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lesane, that's not the only possible condition though. So the dot is necessary. It wasn't a mistake.
Reply With Quote
  #96  
Old 12-14-2001, 03:13 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #97  
Old 12-14-2001, 03:22 PM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Code:
  if ($what=="away") {
  	$condition.="[high] AND [/high]away='1'";
  }
Reply With Quote
  #98  
Old 12-14-2001, 03:38 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

haha

but it works good without the dot
Reply With Quote
  #99  
Old 12-14-2001, 03:47 PM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #100  
Old 12-14-2001, 04:01 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

haha, cool

Thanks, learned something day
Reply With Quote
  #101  
Old 12-15-2001, 02:38 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
Reply


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 01:18 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05453 seconds
  • Memory Usage 2,316KB
  • 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
  • (1)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
  • (1)pagenav_pagelinkrel
  • (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