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-19-2001 09:04 AM

great bira, it works perfect now :) youre wonderfull and it's a very good hack.

THX for your fast support

bira 12-19-2001 09:05 AM

oops, sorry Remi -- yes, that's the correct order :)

Thanks :)

the_sisko 12-22-2001 03:30 PM

Just a small add on I created and want to share with you:
It's just a small CP add on which shows all away users.

To add it do the following:
In admin/index.php
FIND:
PHP Code:

makenavselect("Users"); 

Add above:
PHP Code:

makenavoption("Find away user","user.php?action=findaway"); 

In admin/user.php
FIND:
PHP Code:

cpfooter(); 

Add above:
PHP Code:

// ###################### Start findaway #######################
if ($action=="findaway") {

  if (
$orderby=="") {
    
$orderby="awaydate";
  }
  if (
$limitstart=="") {
    
$limitstart=0;
  } else {
    
$limitstart--;
  }
  if (
$limitnumber=="") {
    
$limitnumber=99999999;
  }

  
$users=$DB_site->query("SELECT user.userid,username,FROM_UNIXTIME(awaydate) AS awaydate,returndate,awayreason,away FROM user WHERE away = 1 ORDER BY $orderby $direction LIMIT $limitstart,$limitnumber");
  
$countusers=$DB_site->query_first("SELECT COUNT(*) AS users FROM user WHERE away=1");
  
$limitfinish=$limitstart+$limitnumber;

    echo 
"<p>Showing records ".($limitstart+1)." to ".iif($limitfinish>$countusers[users],$countusers[users],$limitfinish)." of $countusers[users]. Click username to view forum profile.</p>";
  
doformheader("","");

  echo 
"<tr class='tblhead'>";
    echo 
"<td><p><b><span class='tblhead'>Name</span></b></p></td>";
    echo 
"<td><p><b><span class='tblhead'>Options</span></b></p></td>";
    echo 
"<td><p><b><span class='tblhead'>Away reason</span></b></p></td>";
    echo 
"<td><p><b><span class='tblhead'>Away date</span></b></p></td>";
    echo 
"<td><p><b><span class='tblhead'>Return date</span></b></p></td>";
  echo 
"</tr>\n";

  while (
$user=$DB_site->fetch_array($users)) {

    echo 
"<tr class='".getrowbg()."'>";
      echo 
"<td><p><a href='../member.php?s=$session[sessionhash]&action=getinfo&userid=$user[userid]' target='_blank'>$user[username]</a>&nbsp;</p></td>";
      echo 
"<td><p>".
                
makelinkcode("edit","user.php?s=$session[sessionhash]&action=edit&userid=$user[userid]")."
                </p></td>"
;
      echo 
"<td><p>$user[awayreason]&nbsp;</p></td>";
      echo 
"<td><p>$user[awaydate]&nbsp;</p></td>";
      echo 
"<td><p>$user[returndate]</p></td>";
    echo 
"</tr>\n";
  } 
// end while
    
  
echo "</table></td></tr></table></form>";

  if (
$limitnumber!=99999999 AND $limitfinish<$countusers[users]) {
    
doformheader("user","findaway");
    
makehiddencode("ausername",$ausername);
    
makehiddencode("awaydate",$awaydate);
    
makehiddencode("returndate",$returndate);
    
makehiddencode("awayreason",$awayreason);
    
makehiddencode("orderby",$orderby);
    
makehiddencode("direction",$direction);
    
makehiddencode("limitstart",$limitstart+$limitnumber+1);
    
makehiddencode("limitnumber",$limitnumber);
   echo 
"<input type=submit value=\"Show Next Page\">";
  }




Upload the two files and you will find a new link under Users: "Find away user ".

Thats all ;)
Not the best, but it works

bira 12-22-2001 03:33 PM

hey the_sisko - long time no see!!!

You know, I was wondering where you were -- I never got the chance to thank you for the Links Directory hack :up: :up: :up:

Thanks for the add-on :)

bira 12-22-2001 03:41 PM

Quote:

user.php[high]4[/high]?action=findaway
Not sure the 4 is required :D

the_sisko 12-22-2001 03:53 PM

Thx bira,...;)

Changed post above with .php. Its my system running on .php4...I always forget to change it :D

Sadie Frost 12-22-2001 05:44 PM

Great add-on! That will be so useful!

Could someone help me with what to put in the postbit template to display in their posts when people are away?

And did somebody say links directory hack? *goes off to search for that one*

lol

Bedhead 12-22-2001 05:59 PM

Thanks the_sisko

Works great

bira 12-22-2001 06:32 PM

Sadie the Links Directory hack can be found at https://vborg.vbsupport.ru/showthrea...threadid=12815

You can see a demonstration of it on my BB:
http://www.atlasf1.com/bb/links.php

Sadie Frost 12-22-2001 07:33 PM

Thanks so much bira (that's a good one!)

:)


All times are GMT. The time now is 09:39 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.01360 seconds
  • Memory Usage 1,769KB
  • 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
  • (4)bbcode_php_printable
  • (1)bbcode_quote_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