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)

Lesane 12-17-2001 05:10 PM

[QUOTE]Originally posted by ptbyjason
Sure

In the usercp.php I can't find

*****
$sql="SELECT userid,username,invisible,lastactivity
*****

Right, thats this rule on 20:

$sql="SELECT DISTINCT session.lastactivity, user.userid,username,session.userid AS online,invisible,away

(i have added away on the end)

ptbyjason 12-17-2001 05:25 PM

Ok, now that was what I needed. Thank you so much Lesane. Now last question before I change this. Since I have changed the code I was looking for, do I put the code in that is says in the original install or do I need to alter it in anyway?

Lesane 12-17-2001 06:32 PM

Here are the instructions for the usercp.php code.

ptbyjason 12-17-2001 07:25 PM

The whole database goes down and I get the following error when I follow the instructions:

Parse error: parse error in /business/bclapp/html/vbulletin/admin/functions.php on line 2103

Fatal error: Call to undefined function: getuserinfo() in /business/bclapp/html/vbulletin/admin/sessions.php on line 327


This is the code I put in from the for functions.php

PHP Code:

// Leave Away Message in Profile (v1.0)
            
if ($post[away]=="1") {
                eval(
"\$onlinestatus = \"".gettemplate("postbit_away")."\";");
            } else {
                if (
$post[sessionuserid]>0) {
                    eval(
"\$onlinestatus = \"".gettemplate("postbit_online")."\";");
                } else {
                    eval(
"\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
                }
            }
            
// Leave Away Message in Profile (v1.0) 


Lesane, I am so sorry that I haven't gotten this down yet. I haven't had any trouble installing anything until this one.




Adding this:


functions.php line 2103

$DB_site->query("DELETE FROM post WHERE postid IN ($postids"."0)");


Sessions.php is still original.

ptbyjason 12-17-2001 07:59 PM

D'oh figured it out. Sorry. Who would have thought placing a code after what it is suppose to replace in functions.php could cause the problem? jk :)

Thank you for your patience Lesane, I couldn't have done it without you.

Lesane 12-18-2001 09:05 AM

Your welcome :), so it works fine now?

ptbyjason 12-18-2001 12:19 PM

It works perfectly now Lesane. I couldn't be happier. :D

Tarion 12-18-2001 01:46 PM

Hi Bira,

i have a little problem viewing my modifie_profile template, wenn i add an bithday, the day and the month of the birthday is also showing in the selectboxes of your hack, i tried to get it work but it doesn't.

here the template:
PHP Code:

<tr>
    <
td bgcolor="{tableheadbgcolor}" colspan="2"><normalfont color="{tableheadtextcolor}" class="thtcolor"><b>Abwesenheitsinformation</b></normalfont> <smallfont color="{tableheadtextcolor}" class=thtcolor>Benutze diese Option um anderen Mitglieder deine Abwesenheit zu signalisieren</smallfont></td>
</
tr>
<
tr>
    <
td bgcolor="{secondaltcolor}"><b><normalfont>Abwesenheits Status</normalfont></b><br><smallfont>$awaystatus</smallfont></td>
    <
td bgcolor="{secondaltcolor}"><normalfont><input type="radio" name="away" value="0" $away0checkedBin da &nbsp;&nbsp;&nbsp; <input type="radio" name="away" value="1" $away1checkedBin abwesend</normalfont></td>
</
tr>
<
tr>
    <
td bgcolor="{firstaltcolor}"><b><normalfont>Abwesenheits Grund:</normalfont></b><br><smallfont>max200 Zeichen</smallfont></td>
    <
td bgcolor="{firstaltcolor}"><normalfont><input type="text" class="bginput" name="awayreason" value="$bbuserinfo[awayreason]size="30" maxlength="200"></normalfont></td>
</
tr>
<
tr>
    <
td bgcolor="{secondaltcolor}"><b><normalfont>R?ckkehr Datum:</normalfont></b></td>
    <
td bgcolor="{secondaltcolor}">
        <
table border="0" cellspacing="0" cellpadding="2">
        <
tr>
        <
td><smallfont><select name="awayday">
            <
option value="">Tag</option>
            <
option value="1" $day01selected>1</option>
            <
option value="2" $day02selected>2</option>
            <
option value="3" $day03selected>3</option>
            <
option value="4" $day04selected>4</option>
            <
option value="5" $day05selected>5</option>
            <
option value="6" $day06selected>6</option>
            <
option value="7" $day07selected>7</option>
            <
option value="8" $day08selected>8</option>
            <
option value="9" $day09selected>9</option>
            <
option value="10" $day10selected>10</option>
            <
option value="11" $day11selected>11</option>
            <
option value="12" $day12selected>12</option>
            <
option value="13" $day13selected>13</option>
            <
option value="14" $day14selected>14</option>
            <
option value="15" $day15selected>15</option>
            <
option value="16" $day16selected>16</option>
            <
option value="17" $day17selected>17</option>
            <
option value="18" $day18selected>18</option>
            <
option value="19" $day19selected>19</option>
            <
option value="20" $day20selected>20</option>
            <
option value="21" $day21selected>21</option>
            <
option value="22" $day22selected>22</option>
            <
option value="23" $day23selected>23</option>
            <
option value="24" $day24selected>24</option>
            <
option value="25" $day25selected>25</option>
            <
option value="26" $day26selected>26</option>
            <
option value="27" $day27selected>27</option>
            <
option value="28" $day28selected>28</option>
            <
option value="29" $day29selected>29</option>
            <
option value="30" $day30selected>30</option>
            <
option value="31" $day31selected>31</option>
        </
select></smallfont></td>
        <
td>
<
td><smallfont><select name="awaymonth">
            <
option value="">Monat</option>
            <
option value="1" $month01selected>Januar</option>
            <
option value="2" $month02selected>Februar</option>
            <
option value="3" $month03selected>M?rz</option>
            <
option value="4" $month04selected>April</option>
            <
option value="5" $month05selected>Mai</option>
            <
option value="6" $month06selected>Juni</option>
            <
option value="7" $month07selected>Juli</option>
            <
option value="8" $month08selected>August</option>
            <
option value="9" $month09selected>September</option>
            <
option value="10" $month10selected>Oktober</option>
            <
option value="11" $month11selected>November</option>
            <
option value="12" $month12selected>Dezember</option>
        </
select></smallfont></td>
        <
td><smallfont><select name="awayyear">
            <
option value="">Jahr</option>
            <
option value="01" $year2001selected>2001</option>
            <
option value="02" $year2002selected>2002</option>
            <
option value="03" $year2003selected>2003</option>
            <
option value="04" $year2004selected>2004</option>
        </
select></smallfont></td>
        </
tr>
        </
table>
    </
td>
</
tr

and here the part of member.php i insert your code:

PHP Code:

  // Get referrals
  
if ($usereferrer) {
    if (
$backcolor=="#13486D") {
      
$backcolor="#1C5780";
      
$bgclass "alt2";
    } else {
      
$backcolor="#13486D";
      
$bgclass "alt1";
    }
    
$refcount $DB_site->query_first("SELECT count(*) AS count
                                       FROM user
                                       WHERE referrerid = '
$userinfo[userid]'");
    
$referrals $refcount[count];
    eval(
"\$referrals = \"".gettemplate("getinfo_referrals")."\";");
  }
// Leave Away Message in Profile (v1.2)
  
if ($userinfo[away]=="1") {
      
$sincedate vbdate($dateformat$userinfo[awaydate]);
    if (
$userinfo[returndate]=="0000-00-00") {
        
$returndate "Unbekannt";
    } else {
          
$returnaway explode("-"$userinfo[returndate]);
          
$returndate vbdate($dateformatmktime(0,0,0,$returnaway[1],$returnaway[2],$returnaway[0]));
      }
      eval(
"\$away .= \"".gettemplate("getinfo_away")."\";");
  } else {
      
$away "";
  }
// Leave Away Message in Profile (v1.2)



  // get extra profile fields 

THX Bira

Sorry but the template is in german, i hope you understand this so far ;)

bira 12-18-2001 07:40 PM

Tarion, yes, that was a mistake I made which FireFly commented about in the first page of this thread :)

You need to change all the $xxxxxselected> in the template to $xxxxxaway> (replace 'selected' with 'away').

Then, in member.php, find:

Code:

    $dayname = "day".$returndate[2]."selected";
    $$dayname = "selected";
    $monthname = "month".$returndate[1]."selected";
    $$monthname = "selected";
    $yearname = "year".$returndate[0]."selected";
    $$yearname = "selected";

And replace it with:

Code:

    $dayname = "day".$returndate[2]."[high]away[/high]";
    $$dayname = "selected";
    $monthname = "month".$returndate[1]."[high]away[/high]";
    $$monthname = "selected";
    $yearname = "year".$returndate[0]."[high]away[/high]";
    $$yearname = "selected";


Remi 12-19-2001 09:02 AM

[QUOTE]Originally posted by Remi
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


All times are GMT. The time now is 11:01 AM.

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.01681 seconds
  • Memory Usage 1,838KB
  • 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
  • (2)bbcode_code_printable
  • (3)bbcode_php_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