vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   forums open only in some hour of the day (https://vborg.vbsupport.ru/showthread.php?t=125537)

Follie Folli 09-01-2006 05:25 PM

forums open only in some hour of the day
 
I need a mod for my Vbullettin 3.6.0 forum to create a forum open only in some hours of the day.
For example: the forum automatically opens at 11.00PM and automatically closes at 5.00AM everyday.

Does this mod exists? If it doesn't, can you create this mod?

Follie Folli 09-09-2006 08:56 PM

can you help me?

Adrian Schneider 09-09-2006 10:18 PM

Something like this (in global_start plugin) would work:
PHP Code:

$hour date('G');

if (
$hour 23 or $hour >= 5)
{
    
standard_error('Some message to display when the board is closed.');


This is your server time, let me know if you want it user time instead (though, they could technically keep altering the time before their time is up...)


a big nevermind if you mean an actual forum and not your site, though the same method can be applied...

Follie Folli 09-30-2006 02:51 PM

Hello,
You didn't understand what I want.
You didn't understand what i want. I don't need the entire board to open and close, but only one forum. I need that this forum automatically opens at 11.00PM and automatically closes at 5.00 AM, while all the other forums in my board have to stay open all the day.


Bodwin 10-03-2006 05:02 AM

Is anyone able to help with this? I've been trying to find a solution for a long time!

Follie Folli 10-06-2006 06:52 AM

Is there a coder can help me and create this modification for my community ?

Masiello 10-06-2006 09:39 AM

Post it here: https://vborg.vbsupport.ru/forumdisplay.php?f=30
and surely you have your mod's ;)
Have Fun

LLcoolMP 10-06-2006 01:18 PM

I need this modification too... anyone have got some ideas?

Quarterbore 10-06-2006 02:22 PM

You do realize what you ask for is complicated if you want it so that the forum (forumdisplay) as well as any threads and posts inside that forum will give this error, right?

Or, do you only need this for the forum view itself (not impact threads or posts inside the forum)?

If you only care about the forum itself...

Just open the forumdisplay.php file and hardcode:

FIND:

PHP Code:

// ############################### start enter password ############################### 

ABOVE ADD

PHP Code:

if ($foruminfo['forumid'] == '1')
{
    
standard_error('Some message to display when the forum is closed.');


Now, I think this issue has potential to be an interesting hack...

It would not be too hard to add to the forum table rows for "OPEN" and "CLOSE" and then modify the Forum Options to allow for an OPEN and CLOSE time for each forum. Then use conditionals so that if ($foruminfo['open'] AND $foruminfo['close']) exist, then we know if ($foruminfo['open'] < NOW < $foruminfo['close']) that the forum is open (ASSUMING OPEN < CLOSE) if not then we would use ($foruminfo['close'] < NOW < $foruminfo['open']) to see the forum is open.

I have all the projects I can handle and I don't need this myself but it would be interesting especually if it could work with the pluggin system so no file edits!

Now, I tried to figure out how to do this with a pluggin but I couldn't get it to work...

Perhaps if nobody else codes this I may try...

LLcoolMP 10-11-2006 02:12 PM

Thank you for your interest
It would be a very interesting and useful hack to develop, i hope that you will realize it soon!

Let us know how the work goes on!


All times are GMT. The time now is 04:01 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.01585 seconds
  • Memory Usage 1,737KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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