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)

Tarion 12-17-2001 10:06 AM

[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";
  }

AFTER it ADD

Code:

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

The open the memberlist template and add a link to memberlist.php?s=$session[sessionhash]&what=away

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'";
    }

AFTER it ADD

Code:

    if ($away=="1") {
            $condition.=" AND away='1'";
    } elseif ($away=="2") {
            $condition.=" AND away='0'";
    }

Open template memberlistsearch, and find:

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>

AFTER it ADD:

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>


JJR512 12-17-2001 12:14 PM

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? :D).

Hooper 12-17-2001 12:33 PM

Amen JJ,

I'll sing different strokes with you! :D

ptbyjason 12-17-2001 01:48 PM

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. :confused:

Lesane 12-17-2001 02:21 PM

Well, check again :p because i'm using also 2.0.3 and the code matched.

ptbyjason 12-17-2001 02:59 PM

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.

Remi 12-17-2001 03:11 PM

Hi Bira

It is me, again :D

what can I do, I love your hacks :D

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

Lesane 12-17-2001 03:19 PM

[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.

ptbyjason 12-17-2001 03:34 PM

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")."\";");
}
*****

eva2000 12-17-2001 04:04 PM

i'm just going through 'Bira only made' hacks today and wow !!!

Going to be adding some of these hacks right after christmas :D


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