vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Time on posbit for banned user (https://vborg.vbsupport.ru/showthread.php?t=266388)

S3Ponline 07-06-2011 09:44 PM

Time on posbit for banned user
 
Just wondering if there?s code out there that will display the time someone is ?Banned? in the postbit.

Thank you :)

Badshah93 07-07-2011 04:00 AM

Make A New Plugin

Hook Location: postbit_display_start
Title: Postbit Banned Date

Plugin PHP Code

PHP Code:

$postban $this->registry->db->query("SELECT bandate FROM ".TABLE_PREFIX."userban 
where userid = '"
.$post['userid']."'");
$postbans $this->registry->db->fetch_array($postban);
if (!empty(
$postbans['bandate'])) {
$post['bandate'] = vbdate($this->registry->options['dateformat'], $postbans['bandate']);


and save it.


Now in postbit or postbit legacy (depend upon which one u r using)

Find:

Code:

<dt>{vb:rawphrase posts}</dt> <dd>{vb:raw post.posts}</dd>
below that add:

Code:

<vb:if condition ="!empty($post['bandate'])">       
<dt>Banned Date</dt> <dd>{vb:raw post.bandate}</dd>
</vb:if>


S3Ponline 07-07-2011 04:27 AM

Thank you!

However, this didn’t seem to work. It might be because I’m using a custom template?

Also, do you know of a way to “ban” someone for hours, days, etc?

Thanks for the quick reply.

Badshah93 07-07-2011 04:56 AM

1 Attachment(s)
this should be working, as i tested it before posting. you must be using postbit or postbit legacy.
i hope you have enable the plugin as default is "no", so in hurry you might have forget to click on yes.

Attachment 130792


to ban someone for a day, open his profile in admincp and click on ban user.
then select for 1 day.

S3Ponline 07-07-2011 07:08 AM

Oh, I see.

Thank you.

I dont’ mean to be overly nitpicky, but I’m looking for a countdown.

See, on my forum I want to put someone into a “timeout” for a few hours. Then I want them to know how much time they have left on their cool down and also so other people will know as well.

I was thinking of something like

Avatar
UserTitle
*CountDown TIll Out of Ban*

Thank you for helping!

Maybe you can make this a modification.


All times are GMT. The time now is 02:32 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.01544 seconds
  • Memory Usage 1,721KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete