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 |
#122
|
||||
|
||||
[QUOTE]Originally posted by bira
Hi Tarion, that requires an extra condition - so it depends where you want it. 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"; } Code:
if ($what=="away") { $condition.=" AND away='1'"; } 2) if you want to add the away to the ADVANCED SEARCH in the member's list, Find: Code:
if ($postsupper!="") { $condition.=" AND posts<'$postsupper'"; } Code:
if ($away=="1") { $condition.=" AND away='1'"; } elseif ($away=="2") { $condition.=" AND away='0'"; } Code:
<tr> <td bgcolor="#F1F1F1"><normalfont><b>and Number of Posts is less than</b></normalfont></td> <td bgcolor="#F1F1F1"><normalfont><input type="text" class="bginput" size="35" name="postsupper" value=""></normalfont></td> </tr> Code:
<tr> <td bgcolor="#DFDFDF"><normalfont><b>and user is away or not</b></normalfont></td> <td bgcolor="#DFDFDF"><normalfont><select name="away"> <option value=""></option> <option value="2">user is NOT away</option> <option value="1">user IS away</option> </select></normalfont></td> </tr> |
#123
|
||||
|
||||
Yes, those hacks do exist. They don't have to exist plentifully; all you need is one, that modified just one line that another later hack also wants to modify. One such very extensive hack is ethank's persistent mark forum read hack.
And yes, you can search for just a part of the line. The potential problem with that is that as you make your search less specific, the chances increase of you finding what you're searching for more than once. In that event, you can either look at the text around each hit, and see if it looks close enough to what you're supposed to be looking for that you can reasonably decide you've found it. Alternatively, line numbers would make that process a lot easier; you would just have to find the partial search terms at or near the specified line number. Please understand, I am not saying that line numbers are the ultimate best solution. There are multiple ways for handling any situation here, and what might be best for you, might not be best for some (anybody feel like singing the theme song from Diff'rent Strokes? ). |
#124
|
||||
|
||||
Amen JJ,
I'll sing different strokes with you! |
#125
|
||||
|
||||
I think this is a great hack, and I can't wait to use it. I ran into a problem installing it though. I am running version 2.03 and when I look in my usercp.php I cannot find any code that matches the two I am suppose to find.
|
#126
|
||||
|
||||
Well, check again because i'm using also 2.0.3 and the code matched.
|
#127
|
||||
|
||||
I've tried it several times now and I just tried it again. I have used my search command and I have even searched for just part of the string in case my code is messed up. The code is still the original without modification, so I don't know why it wouldn't be in there. I saw the code that you had help with on the first page for functions.php and I couldn't find the original code in the download nor the code bira suggested. Functions.php and usercp.php are the only ones that I am having problems with. Everything else was found easily.
|
#128
|
|||
|
|||
Hi Bira
It is me, again what can I do, I love your hacks Is this hack compatable with tha Random Password hack. I noticed this in the /root/member.php $bbuserinfo[usergroupid]'$changepw $awaysql WHERE userid='$bbuserinfo[userid]' is that the right order Thanks |
#129
|
||||
|
||||
[QUOTE]Originally posted by ptbyjason
I've tried it several times now and I just tried it again. I have used my search command and I have even searched for just part of the string in case my code is messed up. The code is still the original without modification, so I don't know why it wouldn't be in there. I saw the code that you had help with on the first page for functions.php and I couldn't find the original code in the download nor the code bira suggested. Functions.php and usercp.php are the only ones that I am having problems with. Everything else was found easily. |
#130
|
||||
|
||||
Sure
In the usercp.php I can't find ***** $sql="SELECT userid,username,invisible,lastactivity ***** AND I can't find ***** if ((!$buddy[invisible] or $bbuserinfo['usergroupid']==6) and $buddy[lastactivity]>$datecut) { $onoff="on"; } else { $onoff="off"; } ***** In the functions.php I can't find (orginal install) ***** if ($post['lastactivity'] > $datecut and !$post['invisible'] and $post['lastvisit'] != $post['lastactivity']) { eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";"); } else { eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";"); } ***** NOR (modified by bira on page 1) ***** if ($post[sessionuserid]>0) { eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";"); } else { eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";"); } ***** |
#131
|
||||
|
||||
i'm just going through 'Bira only made' hacks today and wow !!!
Going to be adding some of these hacks right after christmas |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|