Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 07-06-2011, 09:44 PM
S3Ponline S3Ponline is offline
 
Join Date: May 2010
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 07-07-2011, 04:00 AM
Badshah93 Badshah93 is offline
 
Join Date: Jun 2010
Location: India
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #3  
Old 07-07-2011, 04:27 AM
S3Ponline S3Ponline is offline
 
Join Date: May 2010
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 07-07-2011, 04:56 AM
Badshah93 Badshah93 is offline
 
Join Date: Jun 2010
Location: India
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 07-07-2011, 07:08 AM
S3Ponline S3Ponline is offline
 
Join Date: May 2010
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:54 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.03883 seconds
  • Memory Usage 2,213KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete