Categories
ASP VBscript

Freebie: Handy VBscript Nonce Script

Here’s a handy snippet to help you keep your VBscript forms secure. (If you’re ever using vbscript for any reason)

<%

Session("last_nonce") = Session("current_nonce")

sent = Request.Form("current_nonce")
valid = Session("last_nonce")

max=100000
min=1
Randomize

Session("uwbkst_nonce") = "n"&(Int((max-min+1)*Rnd+min))

%>

And then, somewhere in your form, include

<input type="text" name="uwbkst_nonce" value="<%=Session("uwbkst_nonce") %>">

And then in your form processor file


<% If sent = valid Then
' do something
End If %>
Categories
Statuses

Facebook releases an official …

Facebook releases an official plugin for @WordPress (finally): https://t.co/QWLs7Vk0

Categories
Statuses

“I’m here for the big show.” -…

“I’m here for the big show.” — Juno

Categories
Statuses

I just unlocked the “Bento” ba…

I just unlocked the “Bento” badge on @foursquare for checking in at Japanese Restaurants! Irasshaimase! http://t.co/ZREG7gEt

Categories
PHP Programming WordPress

Make Twitter Tools respect your Tweets

Twitter Tools is defacto Twitter-WordPress integration software, but it has one glitch that is easy to fix: tweet posts are formatted so horribly, it’s criminal.

By default Twitter Tools places the full text of a Tweet in post_content, and an abbreviated, ugly version of the tweet in post_title.  This is fine, because there are (usually, depending on your theme) formats for the proper display of a status.

Open twitter-tools.php.  After line 515, which reads

add_post_meta($post_id, 'aktt_twitter_id', $tweet->tw_id, true);

type a new line that reads

set_post_format($post_id, 'status');

Next time Twitter Tools fetches tweets, it will format them as statuses.

Categories
Statuses

hey @wontonjon3 are you in lar…

hey @wontonjon3 are you in laramie with @masoninspain?

Categories
Statuses

Are you in Laramie yet, @Mason…

Are you in Laramie yet, @MasonMagagna

Categories
Statuses

#derp

#derp

Categories
Announcements

New Blog Again

Some jerkwad script-kiddies hacked my last site, so I deleted the whole site and start anew. Stay tuned for fresh perspectives, tons of cynicism, and some handy code snippets, maybe.