PDA

View Full Version : clan_freadtopic.ash / clan_fpost.ash -- add quick reply to clan forums



zarqon
03-05-2011, 11:34 AM
I know I posted this before, but it doesn't seem to exist anymore, so I'm reposting since I've just made a few updates.

Put both of these in your relay folder to add quick reply to your clan forums. Posts and deletes also now redirect back to the thread.

As mentioned before in the now-nonexistent thread for this script, the response box is also prepopulated with a random entertaining message. I recommend actually posting them in your clan's forum and watching your popularity soar!

I'm also accepting suggestions for further entertaining messages to include.

Enjoy!

Veracity
03-05-2011, 02:19 PM
Clans have forums?

zarqon
03-05-2011, 02:35 PM
Just barely.

But some have more than one!

Winterbay
03-05-2011, 09:53 PM
Also, I'm guessing the messages are all in English and would then make me look rather odd in the in-game forum if I posted them since 99% of the rest are in Swedish :)

zarqon
03-06-2011, 01:43 AM
그러면, 스웨덴어로 문장 추가하자.^^

icon315
03-06-2011, 04:19 AM
그러면, 스웨덴어로 문장 추가하자.^^
Sonra biz İsveç danışmaq olmayan şəxslər üçün nə verir?

Bale
03-06-2011, 06:26 AM
Vad är det för fel med svenska? Googlefish är kul!

icon315: Azerbaijani, really? Do you really speak that?

Winterbay
03-06-2011, 08:12 AM
그러면, 스웨덴어로 문장 추가하자.^^

Sure, go ahead and do that :)
I've no idea what it shoud be though so...

Also Bale: What did you enter in order to get google-fish out of it? :)

Bale
03-06-2011, 08:32 AM
Well, I call it googlefish since it is google's version of babelfish. Without its automatic detection I would never has guessed that icon315 was posting in Azerbaijani.

It's awesome: http://translate.google.com/

Winterbay
03-06-2011, 08:38 AM
Ahh. I've never called it that, but I totally should :)
I would've guessed on Turkish since that is the main language I know where ü is such a prominent letter.

slyz
03-06-2011, 09:12 AM
Je ne comprends plus rien dans ce topic !

Winterbay
03-06-2011, 09:28 AM
"I don't understand add laugh dance the topic"? (translated using my own brain that has never ever understood the point of French) :)

icon315
03-06-2011, 03:56 PM
icon315: Azerbaijani, really? Do you really speak that?
Por supuesto que si hablo ese lenguaje(ge-I can't ever remember which). No, de verdad

Winterbay
03-06-2011, 06:56 PM
"-je", I don't think there are any -ge endings in Spanish, but I may be wrong.

zarqon
03-08-2011, 03:02 PM
Special note: I tried out my new regex tongs when making this update! The little beasties squirmed around very threateningly, nearly backslashing me in their efforts to escape, but with my regex tongs firmly gripped in hand, I wrested them into submission.

I feel much more confident abut handling regexes now. Perhaps... too confident?

matt.chugg
03-08-2011, 04:30 PM
Special note: I tried out my new regex tongs when making this update! The little beasties squirmed around very threateningly, nearly backslashing me in their efforts to escape, but with my regex tongs firmly gripped in hand, I wrested them into submission.

I feel much more confident abut handling regexes now. Perhaps... too confident?

OOH, please lend me those tongs, I love and hate regexes in equal amounts, so useful, but I still have to fire up this (http://www.radsoftware.com.au/regexdesigner/) whenever I want to use one!

Here are 2 I used 20 minutes ago (not written by me, google won this time). 10 points to Zargon (and some gold plated tongs) if you can tell me what they do :) (Hint: I'm in the UK)



return preg_match('/^(GIR 0AA)|(((A[BL]|B[ABDHLNRSTX]?|C[ABFHMORTVW]|D[ADEGHLNTY]|E[HNX]?|F[KY]|G[LUY]?|H[ADGPRSUX]|I[GMPV]|JE|K[ATWY]|L[ADELNSU]?|M[EKL]?|N[EGNPRW]?|O[LX]|P[AEHLOR]|R[GHM]|S[AEGKLMNOPRSTY]?|T[ADFNQRSW]|UB|W[ADFNRSV]|YO|ZE)[1-9]?[0-9]|((E|N|NW|SE|SW|W)1|EC[1-4]|WC[12])[A-HJKMNPR-Y]|(SW|W)([2-9]|[1-9][0-9])|EC[1-9][0-9]) [0-9][ABD-HJLNP-UW-Z]{2})$/i',$var-renamed-to-remove-answer);




$regexp = "^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$";

xKiv
03-08-2011, 04:42 PM
Hehe. I see you managed to remove the var name just before I wanted to point it out ;)

And the second one is obviously a "deconstruct an email", except it wont work if somebody uses uppercase letters, and will leave in the dots.

matt.chugg
03-08-2011, 04:51 PM
its just to validate an email, thats just the pattern, it also won't work for .museum addresses I don't think but it does the job for me, if it passes that, then the script in question checks for a mx record on the domain, this isn't validation for user input, its for staff, with an ajax request on blur event, so it just gives a headsup that there 'may' be a typo!

I guess you get the tongs!

zarqon
03-08-2011, 04:53 PM
He does it without tongs. Showoff.

matt.chugg
03-08-2011, 05:23 PM
He does it without tongs. Showoff.

Douglas Adams said it better than I could:



It startled xKiv even more when just after he was awarded the Galactic Institute's Prize for Extreme Cleverness he got lynched by a rampaging mob of respectable kolmafia scripters who had finally realized that the one thing they really couldn't stand was a smart ass

bordemstirs
03-11-2011, 07:27 AM
$regexp = "^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$";


I would like to point out that it is this bastard of a matcher that makes so many websites not support +messaging in emails.
Is it so bad that I'd like to make sorting mail easier for myself?

zarqon
03-11-2011, 08:24 AM
Man, no comments on my puns? I thought it was some of my best work.

matt.chugg
03-11-2011, 11:58 AM
backslashing me in their efforts to escape


I noticed "backslashing" but I only just noticed "escape" (and the conjunction of the two!)

Very clever, 2 gold stars! :)