vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Guests may post XX times before needing to register (https://vborg.vbsupport.ru/showthread.php?t=40492)

Paul 07-01-2002 04:02 AM

Guests may post XX times before needing to register
 
Hi guys,

We've been having a problem on our forum with guests flooding the forum with abusive messages. Unfortunately, we are not able to restrict posting to members due to the nature of the forum. What we would like to do is have the ability to restrict users from being able to post any further without registering after X number of posts. For example, if set to 5, then a guest could post 5 messages. After that, when they returned to the site and attempted to post again, it would show them the registration page and require them to register before being able to post more messages (making banning and deleting a lot easier :D

Any ideas on how to do this?
Thanks!
Paul

Edit: The following thread looks like a start on how to approach it: https://vborg.vbsupport.ru/showthrea...threadid=40107

hypedave 07-01-2002 05:35 AM

I need something like this as well

Paul 07-01-2002 03:51 PM

The problem with the thread I referenced above is that it uses the number of posts a user makes on the forum as a check for permission to post. I don't think that vbulletin keeps track of the number of posts any one guest might make.

Is this information in the cookie it sends out? What would be a good way to keep track of this? I assume somehow through the session, if cookies weren't enabled on the browser.

Paul 07-01-2002 05:48 PM

Well, silly me. I didn't remember that there is a session database. Would adding a field such as 'numofposts' be a good way of doing this that would work for both cookied and non-cookied users? Then just increment that value and do a check to see if userid=0 and numofposts=y where y is the predefined number of posts allowed before registration is required whenever someone tries to reply or post a new thread?

This seems like it would work. Are there any security issues I should be considering here?

Paul

Paul 07-02-2002 04:33 AM

For those interested, I will try creating this hack, however my experience with hacking vbulletin is very small. If anyone else could help out, I'd appreciate it. I've created a field in the session table called numofposts (int-10, unsigned, default=0) and plan on incrementing that number each time a new topic or reply is made. I also want to figure out how to store this number in the cookie and grab it for those who have cookies enabled when they return. Therefore:

1. A user who has no cookies enabled will be limited to xx posts/session before being required to register
2. A user who allows cookies will be limited to xx posts total before being required to register.

Paul 07-04-2002 02:55 PM

I hate to keep replying to my own thread, but I've reached a point where I'm not really sure how to go about doing this hack. Anyone out there that could help me with this?

Paul

g-force2k2 07-04-2002 08:20 PM

I really don't think its possible... because the only thing you have on the user is his/her ip logged... that really won't do anything if they don't have a consistent ip number ;\ so i doubt it'll be fairly accurate... then again i am new at coding as well so i don't know much ;)

g-force2k2

Logician 07-04-2002 09:14 PM

g-force2k2 is right.

You cant trust their IP because most of the users have dynamic IPs, so everytime they connected to the internet, their IP will change.

You cant trust to cookies either, because some may disable it, or can disable whenever they want to pass your restriction.

So even though you design a system for this, it would be quite awkard and not very efficient.

One solution would be to restrict guest posts to X posts in Y hours but this restriction cant apply to a specific guest but all guests instead. For example if you limit it to 5 posts per day, guest X can post 5 and no other guests cant post anymore for that day. A basic IP check can work to restrict guest X post to eg.1 only, but this again wouldnt be very trustworthy for the reasons I mentioned above.

I suggest putting the guests' posts in moderation if you cant disable them alltogether. Most efficient solution IMO..

Paul 07-04-2002 09:16 PM

Hi,

Quote:

I really don't think its possible... because the only thing you
have on the user is his/her ip logged... that really won't do anything
if they don't have a consistent ip number ;\ so i doubt it'll be fairly
accurate...
Well, I'm not looking for total accuracy. This would be stored via the
session and carried via a cookie. Those that have cookies disabled
wouldn't see it unless they posted xx posts in one session. Chances are
if you're posting that many messages to a forum (say 5, for example)
you'll want to register anyway to get e-mail notification, etc.

I'm just trying to encourage registration and prevent few people from posting a large number of messages at once. This shouldn't be based on IP address, rather via a number stored in the session table and on the user's cookie (if they have cookies enabled). At the very least, regardless of whether or not a person accepts cookies, they would not be able to post more than xx posts per session.

Thanks,
Paul

g-force2k2 07-04-2002 09:25 PM

i'd probably follow logician's lead and go with moderating unregs posts i mean i'll help you if needed... but if your looking for that kind of registration then just disable the email notification... and use a quick register type form ;)

g-force2k2

Paul 07-05-2002 05:12 AM

Thanks ;)

You wouldn't happen to know how to set a value in the cookie would you? I haven't been able to find the part of the code that deals with cookies.

I'm exhausted now, but tomorrow I'll post a rough sketch on how this thing should work.

Paul

Paul 07-06-2002 12:56 AM

Functionality outline:

User visits site -->
-- If guest or not logged in -->
----- On post new thread or reply:
---------- check value of numofposts in cookie and set numofposts in the session table to equal that value
------------- if >= number of posts limit set in control panel
------------------ show error_guestpostlimitreached
------------- else
------------------ increment numofposts value by 1 in session table (small int)
------------------ increment numofposts value by 1 in cookie (however this is done)

This system is not meant to be perfect, only to limit the number of posts made by guests per session and to encourage registration. If cookies are enabled, to carry the numofposts data throughout each visit until the limit is reached. I understand that it is not the most secure way of going about this, but I'm not really looking for heightened security. I have a very active staff who read all new posts.

Anyone that can put the above into useable code would really be helping me out.

Thanks,
Paul

dano 06-11-2003 02:28 AM

I am seeing this in motion right now at a site, and I would love to have this.

Does anyone know where this code is, becuase someone has it and it is installed.

Logician?

Paul 06-11-2003 09:48 AM

We have developed and are using a similar modification. I'll see if I get some time if I can post the necessary code changes here.

dano 06-11-2003 02:58 PM

Quote:

Today at 11:48 AM LoveShack said this in Post #14
We have developed and are using a similar modification. I'll see if I get some time if I can post the necessary code changes here.

That would be great, thanks!

dano 06-13-2003 05:31 PM

^

kunle 12-03-2005 11:03 AM

where's the code?


All times are GMT. The time now is 02:04 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.01039 seconds
  • Memory Usage 1,755KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (17)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