Jump to content

HMBeaty

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

About HMBeaty

  • Birthday 07/14/1982

Contact Methods

  • AIM
    hmbeaty
  • MSN
    hmbeaty@hotmail.com
  • Website URL
    http://www.usmilitarylife.com
  • Yahoo
    hmbeaty1

Profile Information

  • Gender
    Male
  • Location
    Chesapeake, VA

HMBeaty's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I guess the best way I could explain the request would be to post the PM conversation between us. So here we are .... No, I won't be available at that time as I don't get off work until 8pm EST. I went ahead and whipped something up though if you want to go ahead and test it. It was developed on my vB 4 test site, but should still work for vB 3 since a few of my other modifications use a similar code to function. You can download it here: http://www.usmilitarylife.com/minchar.zip Let me know how it works for you Brooks, this works very well. I just installed it, tested it with one of my dummy accounts and it works just as I expected. Excellent work. One thing which I would ask, is if you can incorporate a solution so users are prevented from bypassing the character limit, when they just type blank spaces etc... In other words blank spaces not to be counted. There is a solution for that here, but it is archived and I cannot access it. Maybe you as a moderator can access the files here http://www.vbulletin.org/forum/showthread.php?t=67263 My users are quite savvy and would probably find a way to bypass the limits with blank spaces. Nevertheless, it's wonderful work and I really appreciate your time. Thank you very much. My best regards, Val from Kosovo. Incidentally, as you have a website about military life, families etc... are/were you also a US servicemember? I served as an interpreter for US Army for 4 years and I have many many great memories. Correction, I am not a moderator I'm an advisor, therefore, I don't have permission to access that particular modification. I am also (at the moment) not quite sure on how to count blank spaces as characters, but I'm sure I can figure something out Hi Brooks, Many thanks for your answer. Sorry for mixing your position. Please take as much time as you need. I am in no big rush. I have applied the hack and it's already showing its effects, however, I noticed that one particular user started to bypass this by typing a bunch of punctuation marks and hiding them by wrapping them in white color. Is theer a way to also exclude ,.;:'"/?!@ and other non-letter/number symbols from character count? A simple regex expression inside your hack could maybe help. I know this one ^[a-zA-Z0-9@\._ ]+$ helps me to get rid of unwanted characters in user registration form, btu that all I know, and anything past that is unknown to me. Best regards, Val. Also, upon reading this again, I botched the request a little. It seems he does NOT want to count the spaces as characters. Sorry for the confusion
  2. Good afternoon everyone First off, I'm in the process of creating a modification for another user on vBulletin which lets you set the minimum character count a member is allowed to post. I made that pretty quickly using the default code from vBulletin, however, now he's found that his users are getting around this new restriction he's put in place. Here is the code I'm currently using: global $vbulletin; $restricted_groups = explode(',', $vbulletin->options['usml_postminchar_usergroups']); $restricted_users = explode(',', $vbulletin->options['usml_postminchar_users']); $this->registry->options['usml_postminchar_count'] = intval($this->registry->options['usml_postminchar_count']); if ($vbulletin->options['usml_postminchar_onoff']) { if (in_array($vbulletin->userinfo['userid'], $restricted_users) OR is_member_of($vbulletin->userinfo, $restricted_groups)) { if ($this->registry->options['usml_postminchar_count'] <= 0) { $this->registry->options['usml_postminchar_count'] = 1; } if (vbstrlen(strip_bbcode($pagetext, $this->registry->options['ignorequotechars'])) < $this->registry->options['usml_postminchar_count']) { $this->error('tooshort', $this->registry->options['usml_postminchar_count']); return false; } } } The new addition to this that he's asking for is to count spaces as characters, and exclude all.....non-letters from the character count (such as !@#$%^&*:;"'{}[]<>,./\|) Could anyone help me figure out how to do this please? Thanks in advance
  3. Hoping someone can help me on this, but I had some help on getting this code (or part of it) to finally work the way I wanted it, however, there are a few end-user issues with it now. What this code does is disables the user(s) from posting any kind of links (www.example.com or example.com). However, now I'm trying to....expand it a little I guess. Here is the current code: if (stristr($pagetext, 'http://') OR stristr($pagetext, 'www.') OR stristr($pagetext,'@') OR stristr($pagetext, '[url') OR stristr($pagetext, '[url') OR stristr($pagetext, '[img') OR stristr($pagetext, '[img') OR preg_match("#[a-z0-9]([-a-z0-9]+)?(\.[a-z]{2,3})?(\.[a-z]{2,4})#i", $pagetext)) { more code here } Now, I KNOW what most of that code does, but what I need, is what exactly this code does: preg_match("#[a-z0-9]([-a-z0-9]+)?(\.[a-z]{2,3})?(\.[a-z]{2,4})#i", $pagetext) Can anyone break this down and tell me what exactly does what? Thanks in advance
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.