Teach The Net
Home of the Seanybob
  • Home
  • About Me
  • Links
  • My Portfolio
  • My Programs
  • USURP

Archive for November, 2009

Tip: Get WordPress Functions in Standalone Plugin Scripts

-Programming/Coding, Php No Comments »

This week for work, I’ve been creating a WordPress plugin to generate a contact form and send the e-mail via an AJAX call to a standalone script. However, because the script is standalone (i.e., not being used within the context of being called by WordPress itself) to get some of the information that the user configures in the plugin options, I need to include WordPress functionality.

The quick way to do this is to just include the wp-config.php file that is in the root directory of your WordPress installation. However, you have to include it in the main body of the standalone script – i.e., you can’t include it in a function or class (it will fail if you do this).

TL;DR: Just include this line at the very top of your standalone PHP script:

require_once(“../../../wp-config.php”);

This assumes that your plugin has its own directory within wp-content/plugins/. If you’re just using a single file in the plugins folder, take out the extra ../ at the beginning:

require_once(“../../wp-config.php”);


November 13th, 2009 |



Hosting – Virtual Private Servers (vps)

Random (Other) No Comments »

Just wanted to share a new service I’ve been trying out.

Wiredtree.com has some excellent vps deals. They have the standard prices for the industry, but have some crazy coupons (google for them, I found one that cut my first month bill in half and gave me an extra 50% free RAM on my server).

Beyond that though, they have the best customer service I’ve EVER seen, anywhere in life. I actually enjoy going to them with my problems. Normally, I hate customer service lines, and will avoid them at all costs – not so with wiredtree.

I encourage you to check them out if you need a vps server.


November 12th, 2009 |



Converting CSV to MYSQL / SQL

-Programming/Coding, Php, Programs I Use No Comments »

Excellent website that allows you to upload a csv file and outputs it into sql. Saved me quite a bit of time.

http://www.sqldbu.com/eng/sections/tips/mysqlimport.html


November 4th, 2009 |



7′s and Stripes Slots

Php No Comments »

This code was written specifically for the McCodes/DBS Code game engine, but will work on virtually any system that uses a user/mysql database system.

This is a slots mod. Play is the same as 7′s and Stripes slots in the casino, with the same probabilities, but with two progressive jackpots added, as well as random events (like finding a dollar on the ground). Pretty spiffy little graphics.

Demo:

http://seanybob.net/mccodesv2

Cost: $25

My paypal: sean.kooyman@gmail.com


November 3rd, 2009 |



  • You are currently browsing the Teach The Net blog archives for November, 2009.

  • Categories

    • -Personal (135)
      • My Comics (23)
      • Programs I Use (2)
      • Quotations (85)
        • Assorted (17)
        • Bible (11)
        • C. S. Lewis (44)
        • Douglas Wilson (8)
        • George MacDonald (4)
      • Random (personal) (9)
      • Reflections (21)
    • -Programming/Coding (75)
      • AutoIt v3 (3)
      • c++ (4)
      • Call of duty (3)
      • CSS (3)
      • Design (1)
      • HTML (3)
      • Javascript (6)
      • LISP (1)
      • My Programs (31)
      • Php (20)
      • Regular Expressions (1)
      • Robotics (9)
      • Security (1)
      • Visual Basic (24)
    • CSUSB (15)
      • HUM 319 – Myths (7)
      • Mus 180 (8)
    • Other (29)
      • Easter Eggs (4)
      • Funny Stuff (8)
      • Hacks/Tricks (13)
      • Random (Other) (4)
      • Roll Towards Me (Band) (1)
    • USURP (3)
  • Archives

    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • November 2009
    • October 2009
    • September 2009
    • August 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
  • Recent Posts

    • Random Post: Sharing solitude with many
    • Women were not an afterthought.
    • The Cutting Edge
    • Micah 7:18-19
    • Micah 6:8
    • Selected quotes from “A Grief Observed”
    • A very good bed
    • God is good; He is not evil.
    • Merely blank paper
    • Two types of faith.
    • Relative and Absolute will

Copyright © 2010 Teach The Net All Rights Reserved
RSS XHTML CSS Log in
Wp Theme by n Graphic Design
Powered by Wordpress