vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Miscellaneous Hacks - Prevent Bump on Forum Threads Before X Time (https://vborg.vbsupport.ru/showthread.php?t=214916)

IdanB 05-29-2009 10:00 PM

Prevent Bump on Forum Threads Before X Time
 
1 Attachment(s)

Prevent Bump on Forum Threads Before X Time
By: Idan B.

Note:
This modification was coded to answer request given by vithorius @ https://vborg.vbsupport.ru/showthread.php?t=212173
As with other modifications i've take upon coding from requests section, this sounded like useful modification to entire community, so i believe the time i've spent to code it was worth it.

1. Description & Usage:
This hack will allow any forum admin to configure certain forum in a way that will prevent any users to bump his thread before certain time has passed from the time thread has been created. Any attempt by user to reply before time has passed will show user with error message & showing him the remaining time he has to wait before allowed to reply.

2. Installation:
Please click Mark as Installed.
Installation is pretty easy - just download & install:
  • Goto: AdminCP->Plugin System->Manage Products : Choose "Add/Import Product" and import this product xml (product-prevent_bump.xml)
3. Upgrade From Older Version:
1. Uninstall previous version
2. Download new version xml & install as instructed in previous section.

4. Configuration:
Once installed, the "Forum Manger" under admincp will have extra section for each forum:
Section name: "Prevent Threads Bump"
  • Enabled ? - Yes/No
  • Minimum time before thread bump (#d #h #m #s) - Text
5. Known Bugs:
- None at the moment - please report any found !

6. TO-DO's LIST (Next Versions):
- [S]2nd attempt to reply again after already replied will require to meet with x time rule again[/S] - fixed in v1.0.1.
- Bypass to certain usergroups

7. Extra Notes:
The text used in this modification is fully configured via phrase manager in admincp.
- Error messages is made from 3 phrases:
reply_access_denied_wait_x_time_please
prevent_bump_please_wait_1
prevent_bump_please_wait_2

Enjoy hack & dont forget to click Mark as Installed :)

IdanB 05-30-2009 03:41 PM

Changelog:

20 Jun 2009 11:31 - Version 1.0.1 Released:
  • 2nd attempt to reply again after already replied will require to meet with x time rule again.

CarpHunter 05-30-2009 09:47 PM

This looks like a nice mod indeed.

One question: when someone answers the TS his first post and the TS wants to reply is that allowed by this hack? or does he still have to wait before the time set runs out before replying?

vithorius 05-31-2009 01:25 AM

Dear IdanB,

THANK YOU SO VERY VERY MUCH!!!


:up: :up: :up: :up:

twitch 05-31-2009 03:51 AM

awesome!

IdanB 05-31-2009 04:03 AM

Quote:

Originally Posted by CarpHunter (Post 1820311)
This looks like a nice mod indeed.

One question: when someone answers the TS his first post and the TS wants to reply is that allowed by this hack? or does he still have to wait before the time set runs out before replying?

Yes.
This mod only prevent some1 to bump his own thread if no reply has been made.
Should any reply be made, he can reply to his own thread without problem.

lm3a.net 05-31-2009 05:51 AM

WoW

Installed

thank u,,

bigcurt 05-31-2009 06:09 AM

Can we configure this by usergroup? That way admins can bump whenever they like.

IdanB 05-31-2009 07:08 AM

Quote:

Originally Posted by bigcurt (Post 1820497)
Can we configure this by usergroup? That way admins can bump whenever they like.

Not available in current version, but it's already written on the TO-DO's list.
This will be available on next revision update.

bigcurt 06-01-2009 05:43 AM

Quote:

Originally Posted by IdanB (Post 1820517)
Not available in current version, but it's already written on the TO-DO's list.
This will be available on next revision update.

Thanks bud.

bigcurt 06-01-2009 05:44 AM

Also, can a user reply to his own thread if someone other than him has replied since the last time he did? Like he is answering a question instead of purposely bumping.

IdanB 06-01-2009 05:06 PM

Yes. once thread has some repliy (or replies), thread starter has no longer any restrictions & can reply to his own thread. The mod idea was to prevent initial bump to thread no one has replied to.

bigcurt 06-02-2009 12:49 AM

Great! Thanks. Installed bud.

jaymanfromTFX 06-03-2009 05:36 AM

Can you set what forums you want to use this in or is it just set for every forum?

vithorius 06-03-2009 12:22 PM

Quote:

Originally Posted by jaymanfromTFX (Post 1822568)
Can you set what forums you want to use this in or is it just set for every forum?

Please read carefully what IdanB says on the first post:

Quote:

Originally Posted by IdanB
4. Configuration:
Once installed, the "Forum Manger" under admincp will have extra section for each forum:
Section name: "Prevent Threads Bump"

* Enabled ? - Yes/No
* Minimum time before thread bump (#d #h #m #s) - Text


jaymanfromTFX 06-03-2009 07:44 PM

Thanks, must not have read it right the first time.I installed it but i tried to test it out and does not do anything when i try to bump a thread more then the time i set it for.I have it set for active and 6h.

IdanB 06-05-2009 07:31 AM

Quote:

Originally Posted by jaymanfromTFX (Post 1822949)
Thanks, must not have read it right the first time.I installed it but i tried to test it out and does not do anything when i try to bump a thread more then the time i set it for.I have it set for active and 6h.

Note it will only prevent to bump threads that has no reply (new htread).
Should there be any old thread with already more than 1 post in it, it will not prevent it to be bumped.

vithorius 06-05-2009 07:59 AM

Quote:

Originally Posted by IdanB (Post 1823783)
Note it will only prevent to bump threads that has no reply (new htread).
Should there be any old thread with already more than 1 post in it, it will not prevent it to be bumped.

Dear IdanB,

I was NOT aware of this...! :( :erm:

Is it possible to add any way of preventing ANY kind of 'bump' from the thread's author BEFORE the time that we set on the admincp?

I mean:

- If the thread author wants to reply, he must wait for the 'X' days in order to be able to reply. When that 'X' days has passed, he CAN reply ('bump') the thread, but now, he must wait ANOTHER 'X' days to be able to 'bump' again...


In my case, nobody will reply in those threads, because only the thread Author is able to reply on those sections.

But if I would give permission to anyone reply on the thread, then the author should WAIT the 'X' days to 'bump' the thread again!



Well, the main idea would be to prevent ANY kind of 'bump' from the thread's author outside that 'X' days periods. Is that possible? :confused:
(that is so very much important for me! :eek: )


Thank you so very much!

IdanB 06-05-2009 08:34 AM

Quote:

Originally Posted by vithorius (Post 1823792)
Dear IdanB,

I was aware of this...! :( :erm:

Is it possible to add any way of preventing ANY kind of 'bump' from the thread's author BEFORE the time that we set on the admincp?

I mean:

- If the thread author wants to reply, he must wait for the 'X' days in order to be able to reply. When that 'X' days has passed, he CAN reply ('bump') the thread, but now, he must wait ANOTHER 'X' days to be able to 'bump' again...


In my case, nobody will reply in those threads, because only the thread Author is able to reply on those sections.

But if I would give permission to anyone reply on the thread, then the author should WAIT the 'X' days to 'bump' the thread again!



Well, the main idea would be to prevent ANY kind of 'bump' from the thread's author outside that 'X' days periods. Is that possible? :confused:
(that is so very much important for me! :eek: )


Thank you so very much!

Problem is if you do that, he wouldnt be able to reply to someone, and i'm not sure this is desired effect.
Assumption is, if more than 1 reply, then some1 answered to him, then i would assume we want to allow thread starter to reply to his own thread.

EDIT: misread your answer.
i'll see what i can do to fix this, so any 2nd attempt to reply again after already replied will require to meet with x time rule again.

vithorius 06-05-2009 08:55 AM

Dear IdanB,

Please excuse my poor english (as my main language is portuguese... :rolleyes: )

When I sayd "I was aware of this...!" I meant "I was NOT aware of this...!" (I forget to write the word "NOT")


Ok, so answering you message:
Quote:

Originally Posted by IdanB (Post 1823801)
EDIT: misread your answer.
i'll see what i can do to fix this, so any 2nd attempt to reply again after already replied will require to meet with x time rule again.

Ok! I believe that it would be simple to do that...

Maybe my case is very different from other people's needs, but what I need is just that:

"any 2nd attempt to reply again after already replied will require to meet with x time rule again."
(and so on... and so on... - until the thread becomes closed or deleted!)

IdanB 06-05-2009 09:16 AM

yea, understood what you meant. i'll do my best to upload a fix for it tonight.
First i need to finish work on some other mod that needs overdue update release (Alt Last Post). when that's finished, i will work on fix for this modification.

regards,
Idan.

jaymanfromTFX 06-07-2009 05:27 AM

Thanks!!! i got it to work.Will be looking forward to what else you do with this mod.

TFEX 06-07-2009 03:40 PM

Quote:

Originally Posted by IdanB (Post 1823801)
...i'll see what i can do to fix this, so any 2nd attempt to reply again after already replied will require to meet with x time rule again.

This is exactly the functionality I am looking for. Did this get uploaded already as mentioned, or are we still waiting on the change?

Also, I can't seem to produce any results from this hack either. I've set it up in a test forum for 5m and active, started a new thread and promptly bumped it with no problems at all... many times... something I am doing wrong on my end?

jaymanfromTFX 06-07-2009 04:44 PM

Well it worked for me last night.I set up a new thread to test it in and it worked.But this morning i went to try it and it let me bump anytime i wanted to bump.Don't know what happened since none of the settings were messed with.

IdanB 06-07-2009 05:06 PM

As mentioned the current version only prevent 1st bump, should any1 already replied to that specific thread, current version doesnt prevent the bump. When next version is released, i'll have in it the feature as described by vithorius (it's already on the TO-DO's list) (read up few posts above)

jaymanfromTFX 06-08-2009 01:23 AM

Ok sorry mis understood what you meant.Thought you were meaning it will work on new threads but not just for the first bump.Thanks

IdanB 06-20-2009 07:30 AM

modification updated - now 2nd attempt to reply again after already replied will require to meet with x time rule again.

jaymanfromTFX 06-21-2009 08:13 PM

cool i am testing it out now.One thing i noticed is when you set the time is it is an hour off.So if i set for 12hrs it really makes them wait 11. So to set for 12hrs you must put 13h instead of 12h.Not that big of problem but just wanted to let you know about it.

IdanB 06-22-2009 02:57 PM

Quote:

Originally Posted by jaymanfromTFX (Post 1834310)
cool i am testing it out now.One thing i noticed is when you set the time is it is an hour off.So if i set for 12hrs it really makes them wait 11. So to set for 12hrs you must put 13h instead of 12h.Not that big of problem but just wanted to let you know about it.

it's probably the "daylight saving time feature" thingy. perhaps i'll allow it as admincp feature on next version.

jaymanfromTFX 06-22-2009 04:12 PM

Make sense, seems to be working great thanks.Nice mod!

vithorius 06-24-2009 12:34 PM

Dear IdanB,

I forgot to mention that my board is using vBulletin v 3.6.11.

What happens is that when I try to upgrade your hack to this new version, I get an SQL error and the upgrade fails... :confused: :(

Quote:

Originally Posted by SQL Error
3.6.11: Invalid SQL:
ALTER TABLE `forum` ADD `prevent_bump_enabled` TINYINT( 1 ) NOT NULL DEFAULT '0',
ADD `prevent_bump_min_time` VARCHAR( 10 ) NOT NULL DEFAULT '14d';

MySQL Error: ->error

Error Number : ->errno

Date : Wednesday, June 24th 2009 @ 01:37:10 PM

Script : http://www.****.net/admincp/plugin.php?do=productimport

Referrer : http://www.****.net/admincp/plugin.php?do=productadd

IP address: ***.***.***.***>

Username : *****

Classname : vB_Database

Note: The asterisks (*) were added by me.

IdanB 06-24-2009 05:04 PM

have you uninstalled first and only after installed or tried to install over existing ?

vithorius 06-24-2009 06:29 PM

Quote:

Originally Posted by IdanB (Post 1836521)
have you uninstalled first and only after installed or tried to install over existing ?

Glup...! :o :D Lame me...! :eek:

I was trying to install over the existing one...


Another question: The hack prevents the first and the second attempt to bump the thread... How about the 'next' times, if the user tries to invalid-bump a third, a fourth, a fifth time, etc...?

jaymanfromTFX 06-25-2009 04:48 PM

It is working fine for me for every time, not just the 2nd. I have been testing it for about 4 days and it has worked every time.

IdanB 06-25-2009 05:02 PM

Quote:

Originally Posted by vithorius (Post 1836590)
Glup...! :o :D Lame me...! :eek:

I was trying to install over the existing one...


Another question: The hack prevents the first and the second attempt to bump the thread... How about the 'next' times, if the user tries to invalid-bump a third, a fourth, a fifth time, etc...?

Yes, it will prevent any "double posting" from author of thread, regardless of number of posts, meaning the author of thread cannot do 2 replies to his own thread one after another, he needs some1 else to reply to be able to reply to himself again :)

spankaveli 06-29-2009 02:15 PM

can this be setup to affect only certain subforums?

vithorius 06-29-2009 02:36 PM

Quote:

Originally Posted by spankaveli (Post 1839591)
can this be setup to affect only certain subforums?

Yes! :up:

ageurtse 07-05-2009 02:29 PM

When i translate this very nice peace of a hack, all is translated but Days, Hours Minutes and seconds

how do i translate these, when i search my board these words are translated to dutch (dag(en) etc.)

where do i change these words



Code:

U mag niet binnen de vastgestelde tijd uw eigen aanbieding omhoog sturen. Wacht 2 Day(s), 22 Hour(s), 43 Minute(s), 10 Second(s) voordat u uw advertentie opnieuw kunt opwaarderen

IdanB 07-05-2009 05:46 PM

That text currently inside the core code:

PHP Code:

if ( $days_diff $time_remains "$days_diff Day(s)";
if ( 
$hours_diff $time_remains .= ", $hours_diff Hour(s)";
if ( 
$mins_diff $time_remains .= ", $mins_diff Minute(s)";
if ( 
$secs_diff $time_remains .= ", $secs_diff Second(s)"

For next revision i'll take this "outside" of hack into phrase(s).
regards.

phonexpo 07-05-2009 06:07 PM

Installed. + I changed the phrase so it reads "You are not allowed to reply to your own thread before the minimum allowed time has passed. You may try edit your last post. Please wait , 21 Hour(s), 6 Minute(s), 10 Second(s) before attempting to reply to your own thread.", to stop spammers.

:)

Thanks


All times are GMT. The time now is 05:50 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.02291 seconds
  • Memory Usage 1,840KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (15)bbcode_quote_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
  • (40)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