vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Countdown For Banned Users (https://vborg.vbsupport.ru/showthread.php?t=155474)

bigcurt 09-19-2007 01:19 AM

This would be nice to see.

G0F0RBR0KE 09-19-2007 02:15 AM

I hope it's release, if not. I'll take a look at it (which I am rite now ;) )

Breathex 09-21-2007 07:17 PM

Quote:

Originally Posted by EvilAkuma (Post 1342188)
I hope it's release, if not. I'll take a look at it (which I am rite now ;) )

This is a good new, now 2 coders will look at it :p

In my forum there is only 1 usergroup for banned users and i use a hack that shows banned users in a list. Permanently banned users and the users banned for a while appear in this list together, but in messages (Postbit) both users appear as "Banned User". If in postbit or anywhere else in the message area shows the lift date of the ban, then it will be very understandable for users, admins and mods.

If this is not so hard to do, i will be glad to see this hack completed as soon as possible. :up:

FullyTested 09-23-2007 08:49 AM

If all you want to do is display the time remaining on the ban whenever the user tries to log on, then...

1). Open 'includes/functions.php'
2). Find eval(standard_error(fetch_error('nopermission_bann ed', $reason['reason'], $date)));
3). ABOVE it insert:
PHP Code:

// start code 'ban time'

        
if ($date != $vbphrase['never'])
        {
            
$remain $reason['liftdate'] - TIMENOW;
            
$remain_days floor($remain 86400);
            
$remain_hours ceil(($remain - ($remain_days 86400)) / 3600);
            if (
$remain_hours == 24)
            {
                
$remain_days += 1;
                
$remain_hours 0;
            }

            if (
$remain_days <= 0)
            {
                
$timeremaining "<i>Will be lifted soon.</i>";
            }
            else
            {
                if (
$remain_days == 1)
                {
                    
$day_word $vbphrase['day'];
                }
                else
                {
                    
$day_word $vbphrase['days'];
                }
                if (
$remain_hours == 1)
                {
                    
$hour_word $vbphrase['hour'];
                }
                else
                {
                    
$hour_word $vbphrase['hours'];
                }

                
$timeremaining "$remain_days $day_word$remain_hours $hour_word";
            }

            
$date .= "<br />Time Remaining: $timeremaining";
        }

// end code 'ban time' 


Cheers,
David.

iogames 09-23-2007 10:08 PM

Lol... :p

I was about to tell them :mad:

Breathex 09-23-2007 10:48 PM

Quote:

Originally Posted by FullyTested (Post 1345061)
If all you want to do is display the time remaining on the ban whenever the user tries to log on, then...

1). Open 'includes/functions.php'
2). Find eval(standard_error(fetch_error('nopermission_bann ed', $reason['reason'], $date)));
3). ABOVE it insert:
PHP Code:

// start code 'ban time'

        
if ($date != $vbphrase['never'])
        {
            
$remain $reason['liftdate'] - TIMENOW;
            
$remain_days floor($remain 86400);
            
$remain_hours ceil(($remain - ($remain_days 86400)) / 3600);
            if (
$remain_hours == 24)
            {
                
$remain_days += 1;
                
$remain_hours 0;
            }

            if (
$remain_days <= 0)
            {
                
$timeremaining "<i>Will be lifted soon.</i>";
            }
            else
            {
                if (
$remain_days == 1)
                {
                    
$day_word $vbphrase['day'];
                }
                else
                {
                    
$day_word $vbphrase['days'];
                }
                if (
$remain_hours == 1)
                {
                    
$hour_word $vbphrase['hour'];
                }
                else
                {
                    
$hour_word $vbphrase['hours'];
                }

                
$timeremaining "$remain_days $day_word$remain_hours $hour_word";
            }

            
$date .= "<br />Time Remaining: $timeremaining";
        }

// end code 'ban time' 


Cheers,
David.

FullyTested, thanks for your interest but i'm not talking about this. I need a countdown which will show in postbit under the nick name or under the age, and only unbanned users will see this countdown.

FullyTested 09-24-2007 12:02 AM

Hi Breathex,

I've attached a simple mod to this post.
It will display the time remaining on a ban inside the postbit.
All members will see this.

Edit...
For the actual code, please see:
https://vborg.vbsupport.ru/showthread.php?t=158800

Breathex 09-24-2007 02:41 PM

Quote:

Originally Posted by FullyTested (Post 1345534)
Hi Breathex,

I've attached a simple mod to this post.
It will display the time remaining on a ban inside the postbit.
All members will see this.

Install Instructions:

1). Import the product via the Admin CP
2). Open the 'postbit' and 'postbit_legacy' templates and
Find:
Code:

<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
BELOW it insert:
Code:

<!-- start code 'sbt' -->
<if condition="$post['ban_time_remaining']"><div class="smallfont">$post[ban_time_remaining]</div></if>
<!-- end code 'sbt' -->

3). Done.

I hope this is what you are looking for.
David.

Hi David,

It works like a charm my friend, thanks alot. :)

FullyTested 09-24-2007 05:10 PM

You are very welcome.

Breathex 09-24-2007 11:20 PM

David, i have a small but important problem with the codes. After i imported the product, it writes "Ban is Permanent!" on some of my members postbits but they are not banned. I'll be glad if u find a solution for this problem.


All times are GMT. The time now is 10: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.04505 seconds
  • Memory Usage 1,781KB
  • 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
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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