The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
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
|
Comments |
#152
|
||||
|
||||
gonna be installing this in a few
awesome hack. thanks a lot I'm sure this will be used frequently on my teen forum :up: |
#153
|
|||
|
|||
Bira:
I hope you don't mind but I have added a couple of things to the main script and the control panel script Where you have: // Leave Away Message in Profile (v1.0) if ($away=="1") { $awaysql = ",away='$away',awaydate='".time()."',returndate='" .$awayyear."-".$awaymonth."-".$awayday."',awayreason='".addslashes(htmlspecial chars(censortext($awayreason)))."'"; } else { $awaysql = ",away='0',awaydate='',returndate='',awayreason='' "; } // Leave Away Message in Profile (v1.0) in the member.php file change this to: // Leave Away Message in Profile (v1.0) if ($away=="1") { $awaysql = ",away='$away',awaydate='".time()."',returndate='" .$awayyear."-".$awaymonth."-".$awayday."',awayreason='".addslashes(htmlspecial chars(censortext($awayreason)))."'"; $showemail=0; } else { $awaysql = ",away='0',awaydate='',returndate='',awayreason='' "; $showemail=1; } // Leave Away Message in Profile (v1.0) and then in the user.php file where you have: if ($awaydate!="") { $awaydate="UNIX_TIMESTAMP('".addslashes($awaydate) ."')"; } else { $awaydate=""; } just below this put if ($away==1) { $showemail=0; } else { $showemail=1; } The changes to the member.php file I highlighted and user.php file is just the add on. Both will set the showemail option to either one or zero if they are away or back. That way people can't email them if they are away. Parker |
#154
|
||||
|
||||
Parker,
The problem with your add-on is that it forces the change on the user, and without his knowledge. Example: say you have showemail=0 by default. You set yourself away, it stays 0. You return, and it changes it to 1 without you knowing... Likewise, if you WANT to continue getting e-mails while you're away, you're not gonna be able to, and you won't even know that it's disabled. Cheers, Bira |
#155
|
|||
|
|||
Bira:
Hmm.....I will have to work on this. Thanks, Parker |
#156
|
|||
|
|||
This isn't a big deal but when a user is away and the Buddy List alt tag message says "User is Away-line"
|
#157
|
|||
|
|||
The installation went well and I did all the manual changes by the letter. Yet I get the following error message when I try to access the admin panel in order to do the necessary template changes:
"Parse error: parse error in /home/*****/public_html/memberarea/admin/functions.php on line 242 Fatal error: Call to undefined function: getuserinfo() in /home/*****/public_html/memberarea/admin/sessions.php on line 108" Dex |
#158
|
||||
|
||||
mines just plainly not showing up.....heres a screenshot
http://teleblaze.com/asp/HackNotShowing.jpg |
#159
|
|||
|
|||
FUNKTION.PHP
Find if ($post['lastactivity'] > $datecut and !$post['invisible'] and $post['lastvisit'] != $post['lastactivity']) { eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";"); } else { eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";"); } REPLACE that with: // Leave Away Message in Profile (v1.2) if ($post[away]=="1") { eval("\$onlinestatus = \"".gettemplate("postbit_away")."\";"); } else { if ($post['lastactivity'] > $datecut and !$post['invisible'] and $post['lastvisit'] != $post['lastactivity']) { eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";"); } else { eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";"); } } // Leave Away Message in Profile (v1.2) By this Code Pharsen Error in Funktions.php Pleas Help MFG PS: Very God HAck |
#160
|
|||
|
|||
Bira, did you add all the addons, including the_sisko's cpanel addon to the zip?
|
#161
|
||||
|
||||
Thx, great hack, ...
but one question: What changes do I have to make in the "showgroups.php" to the forum-staff is away or not? |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|