Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

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

OK, Kura

I looked into this and this is actually a bug in the database backup.

The away date is NULL by design but when you download the SQL file, it turns it into NOT NULL.

You will need to open your .sql file for the user table, and find:

Code:
   away tinyint(1) NOT NULL,
   awaydate int(10) unsigned [high]NOT NULL[/high],
   returndate date DEFAULT '0000-00-00' [high]NOT NULL[/high],
   awayreason varchar(200) [high]NOT NULL[/high],
And change it to (the highlighted stuff from above should be deleted):

Code:
   away tinyint(1) DEFAULT '0' NOT NULL,
   awaydate int(10) unsigned,
   returndate date DEFAULT '0000-00-00',
   awayreason varchar(200),
After that, you will have no problems.

I will report this bug on vBulletin.com

Cheers,

Bira
Reply With Quote
  #103  
Old 12-15-2001, 03:43 PM
Hooper's Avatar
Hooper Hooper is offline
 
Join Date: Oct 2001
Location: St. Louis, Mo
Posts: 286
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The hack is nice but my files are just to hacked up to install anymore without the hack installations that include line numbers. The installer doesn't show line numbers. No more installer hacks. Maybe someone could add line numbering to the installer proggie.


The hack is very nice though Bira.
Reply With Quote
  #104  
Old 12-15-2001, 03:44 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great, thanks, I will try this soon (watching a movie, when it's a break I will do this) and let you know what the outcome is.

Thank you
Reply With Quote
  #105  
Old 12-15-2001, 03:51 PM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hooper line numbers will not help you.

If code x was on line 100, then after you hacked your script it will be on line 108, then how would it help if I gave you line #100 in the installer?

Line numbers work ONLY on a very clean and non-hacked script.
Reply With Quote
  #106  
Old 12-15-2001, 03:56 PM
Hooper's Avatar
Hooper Hooper is offline
 
Join Date: Oct 2001
Location: St. Louis, Mo
Posts: 286
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by bira
Hooper line numbers will not help you.

If code x was on line 100, then after you hacked your script it will be on line 108, then how would it help if I gave you line #100 in the installer?

Line numbers work ONLY on a very clean and non-hacked script.
Reply With Quote
  #107  
Old 12-15-2001, 04:06 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hooper, you're awfully demanding and picky, ya know that?

Line numbers are not at all useful with hacks. Hacks that say "find **example line** and ADD ABOVE that **hacked code line**" and the like are much better in this aspect, for no matter what line this will be at, you can simply find it and add to it the necessary changes.

Also, when a new version of vbulletin is released which adds about 60-80 lines above this line, the line numbers would be WAY off, but if you just search for the strings it doesn't matter.
Reply With Quote
  #108  
Old 12-15-2001, 04:16 PM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by Hooper
I just will not install no more hacks that don't display line numbers.
Reply With Quote
  #109  
Old 12-15-2001, 04:35 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

W3rd bira

Btw, it worked this time, I removed the three NOT NULL's and the dump installed sweetly over my empty install.


Only strange thing, however, was the fact (nothing to do with this hack btw) that... well, this:

I had two vbulletins running on my comp, the Couch and the Couch v.2. I only use the first one for installing hacks in preparation of my new sites and everything. The second one is only installed to simulate when I switch hosts and will have to insert a dumpfile into an empty (fresh) install.

Now, the dump-inserting worked, everything worked smoothly and all. But then I made a thread on the Couch v.2, and went to a site (also on my HD) that runs a query that lists all the threads from one specific forum. It listed the new thread. At first I was "Yay it works!" but then I realised, it was a Whole Different Database! But it STILL took the new thread!

So I checked the other Couch, the original one, and the new thread had appeared there as well.

So when i made a thread on ONE forum, it magically copied itself to the database of the OTHER forum. That database has a different name, a different mySQL user and a different mySQL password.

Any idea why on earth this happened??
Reply With Quote
  #110  
Old 12-15-2001, 04:40 PM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

are you sure you didn't overwrite config.php?

If you are running two databases, you gotta make sure you have two different config.php. That's the gateway to the db
Reply With Quote
  #111  
Old 12-15-2001, 04:48 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're very correct.

I *initially* had a different config.php of course, with the new username and db-name and everything. But then I realised that I took the files from the vB221 zip, and thus was missing out on several files (install_awayusers.php being one of them) and I copied all the files from the first board, to the directory of the second board. And I forgot to exclude the config.php file for the DB-settings. Heh..

Thanks for pointing that out to me.
Reply With Quote
Reply

Thread Tools

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 05:55 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.04475 seconds
  • Memory Usage 2,306KB
  • 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
  • (2)bbcode_code
  • (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