vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin.org Site Feedback (https://vborg.vbsupport.ru/forumdisplay.php?f=7)
-   -   Is the VB Chat turned OFF?? (https://vborg.vbsupport.ru/showthread.php?t=100677)

Lea Verou 11-14-2005 09:34 AM

Quote:

Originally Posted by Brad
At first yes, but once you get the hang of them they become very powerful. :)

Yes, I can understand that but they are still difficult :p
And my book only talks about the other ones (those that work with ereg_replace :()

Brad 11-14-2005 09:49 AM

Shame, I notice a lot of them leave out PCRE.

http://www.tote-taste.de/X-Project/regex/

Hopefully you'll find that link of use. ;)

Lea Verou 11-14-2005 09:51 AM

Quote:

Originally Posted by Brad
Shame, I notice a lot of them leave out PCRE.

http://www.tote-taste.de/X-Project/regex/

Hopefully you'll find that link of use. ;)

Thanks, I bookmarked :)
It looks nice-written :)

Marco van Herwaarden 11-14-2005 09:59 AM

Well by answer was the best for the original question, only to remove the spaces. If you have the choice, a str_replace is much faster. Dean however extended to original question nicely with the removal of some more special characters (although with some limitations that could also be done with str_trplace..

Lea Verou 11-14-2005 10:02 AM

Quote:

Originally Posted by MarcoH64
Well by answer was the best for the original question, only to remove the spaces. If you have the choice, a str_replace is much faster. Dean however extended to original question nicely with the removal of some more special characters (although with some limitations that could also be done with str_trplace..

Yep, why shouldn't that for example be doen with str_replace (many of them for the other characters)? Is it slower?

Marco van Herwaarden 11-14-2005 10:06 AM

BEcause with a str_replace you can only search for a list of chracters. With regular expressions, you can also deny any character that is not in a list.

David Copeland 11-22-2005 02:18 AM

Quote:

Originally Posted by Dean C
Or better yet :D

PHP Code:

$name preg_replace('/[^A-Za-z0-9-_`\[\]]/i'''$name); 



Dean C,

I noticed you are the only one in this thread with a space between first and last name, such as my user name.

So do I have to log out as David Copeland to use this forum's chat?? Or can the webmaster here modify the code to allow anyone with a space to use the live chat?

David

Guest190829 11-22-2005 02:22 AM

No, once you go into the chat and get the error just type:

Quote:

/nick NICKNAME
Replace NICKNAME with any other nickname that you want, and that doesn't produce an error. My username isn't allowed either thanks to the period, but I use Danny on the irc.

Chris M 11-22-2005 02:46 AM

Mine also isn't allowed because of the space - I use ChrisM with no space :)

Chris

Jenta 11-22-2005 02:55 AM

PHP Code:

// bad characters
$cleanchr preg_replace("/[^ \\\\{}\^`\[\]\|\-\w]/"""$vbulletin->userinfo['username']);

// leading numbers and dashes
$cleannum ereg_replace("^[0-9\-]*[0-9\-]"""$cleanchr);

// convert spaces to underscores
$nick ereg_replace(" ""_"$cleannum); 



All times are GMT. The time now is 04:43 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.01613 seconds
  • Memory Usage 1,738KB
  • 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_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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