WebDev $lol Just another WordPress site

22Dec/110

$lol->php – Alpha v1.0 released

Just incase you have not already taken note, early this week, Weston packaged up and released the $lol->php framework with its MVC components added into it, for an even easier and an even more rapid development experience.

Download Now!

It is essentially the same framework, but with a bunch more libraries and configs added:

  • closure_compiler - Google's closure compiler used for Javascript. Basically its a code-based version of this application.
  • css - handle the loading of cascading style sheets into your MVC.
  • data - miscellaneous data that we find to be often used by web developers (eg: months, states).
  • db - MySQL Database class, it also parses your sql query to know what to return.. as long as you don't start with a new line as your sql..
  • developer - I don't really use this one all that often.. it may have one of our random IP addresses statically coded in there, but its supposed to be used for debugging things on a live website so that you can see them and your client(s) cannot.
  • error - show an error when the lol framework hits an error (you may also use it to show errors, ie: restricting access to a user group)
  • files - handle some file stuff.
  • input_filter - mostly used to block cross-site scripting attacks, also used by DB in its "esc" function for cleaning data before inserting into the database.
  • js - handle the loading of javascript (inline & in-script) into your MVC.
  • output - handle the output buffer (the template class uses this for the most part, but you also have access to it).
  • plugins - loads plugins.
  • template - sets (and renders) the template, handles loading views as well.
  • text - format your text!
  • url - parses and redistributes the url into the MVC structure.
  • validate - validate that ____ is a phone number, or that ______ is an email, etc~.
  • view - load views into your template, and pass those views (optional) variables.

Another main difference is that if you want to use the MVC structure instead of just the base object loader, then you call ignite.php instead of fire.php. You also must rename and move the .htaccess file into the root of your web server.

Filed under: Uncategorized No Comments
14Dec/110

SOPA = BAD

I found a good web page that describes a part of why Protect IP and SOPA are bad ideas.

If you are in America, please read, please join the fight. This is very important and will shape all of our futures.. the world will have less innovation if either of these bills pass. If you are not in america, please read it anyways, as something like this may be coming to your country soon, if it is not already there.

Read This: http://americancensorship.org/infographic.html

Edit: And/Or Read these web comics: http://www.getyourcensoron.com/

Filed under: Life, WebDev No Comments
4Dec/110

New Server – Blog Successfully Moved

The aredelicio.us domain was transferred over almost painlessly. For the most part, this is just a test post.

Filed under: Life No Comments
1Dec/110

New Server – Moving Soon!

Ever since my blog launched (late 2009), I've had all of my personal domains hosted on a GoDaddy VPS. It was great at first, they had awesome linux techs and I rarely had any issues, however lately I've been having a ton of firewall issues, and their techs all suddenly got foreign accents, and seem to know less and less about how those tubes transfer the internet from mars to earth every time I call.

So for the last few months or so I've been looking for a new hosting company. I've found one, and I am slowly but surely transfering my domains over there. I am transfering the least important first to make sure I get the transfers down properly and don't screw myself over when I move lol-php.com, or *.aredelicio.us.

We ended up having to get this new server because of GoDaddy's unpredictability in letting us connect to it, and we are planning on having an API for auto-downloading $lol-php libraries and eventually some plugins as well.

If any of you are curious, or are looking for a good hosting company, I can recommend WebbyNode, you pay monthly, and they give you a blank slate, its UI is minimalistic (which I like), but if you know how to use linux bash commands you should be 100% fine.  Personally, the first thing I did was install CentOS through their GUI, then SSHed in and installed Webmin. All in all, I really like this new server.

Filed under: Life, WebDev No Comments
2Nov/110

$lol->PHP Alpha Release

Hello all,
We have successfully stripped the $lol->php framework down to its nuts and bolts, and it is now available for download, within the next few weeks, I hope to have documentation up for it on the website, but for now you can download and check it out from the $lol->PHP website.

For now, I will say that you can use this to load multiple libraries dynamically, to do this, set your class name to be the same as the file name, and place it in the /lol/O.o/libs/ folder, then to call it, open a new file, and do a require_once() for the file located in /lol/fire.php. This will automatically create your $lol variable.

Now call $lol->{class_name}->{method_name}(paramiters);

It will automatically load the class, and run the method that you call with the parameters you pass, and return whatever that method normally returns.. cool, huh? I thought so, and thats why I made this framework. The system also supports configuration files for your libraries, but thats more advanced.. basically the same deal, except you make the file (with same name as library) in the configs directory, then .

As of right now, between myself, Weston, and the company we work for (Avallo, inc), we have built about 40 libraries (However, I think I see a few duplicates in there, so maybe 35ish?), and about 7 plugins. Not all of these will be published, as some of them are crap, some are dumb, and some are going to be kept secret by Avallo, since it took us about 7 months to build one of those plugins.

Talk at you all soon,
-Aaron

PS: By Default, the /lol/ folder should be in the document_root of your website, otherwise you'll have to change stuff in config.php.

9Oct/110

My Absence

Okay - I've been gone for a few months, but we've been busy (sadly, not working on PHP side projects). I've been busy buying a house, researching, learning, looking, being grossed out, the list goes on.

However some good news, I have found a house, and I am closing on it (moving in) at the end of this month! After that, I intend to try brewing mead, as mead is awesome, as well as paint the new place and fix it up a little - but THEN! We shall be back at it, and launching POD. I know, I'm lame, but I am also willing to make it up to you - Anyone who asks for an alpha release of the lol library (yes, I did just say library object loader library), just email me asking for one, and you shall receive it. Sadly, the comments on this blog are 99% spam, so I don't tend to them as well as I should.

I am also going to be working with Weston to try and get a "Basic Install" version of pod, then release it on the lol-php.com website for public download - half the work in this is going to be finding the right license for us to use, and learning how to use it - as neither of us have ever released open source software.

 

Filed under: Life No Comments
25Aug/110

Looping Categories in PHP

I love it when I loop through a categories array in PHP.. I always tend to say:

foreach($cats as $kittens)
{ /* do stuff */ }

or

foreach($mommy_cats as $little_meows)
{ /* do stuff */ }

There are many variations you can use - I suggest trying them all out, and mixing it up from time to time.  Have fun with code, don't make it all professional and about work - if you do that, then you'll end up bored with your job, which makes you less creative, and less productive.     =P

Filed under: WebDev No Comments
18Aug/110

MySQL Proper Function

Its awesome.  Its like a "MySQL UC First" function.

I stole it from here: http://www.artfulsoftware.com/infotree/queries.php#122
They have more handy little MySQL functions: http://www.artfulsoftware.com/infotree/queries.php

Just incase link is down, here it is:

DROP FUNCTION IF EXISTS proper;
SET GLOBAL  log_bin_trust_function_creators=TRUE;
DELIMITER |
CREATE FUNCTION proper( str VARCHAR(128) )
RETURNS VARCHAR(128)
BEGIN
DECLARE c CHAR(1);
DECLARE s VARCHAR(128);
DECLARE i INT DEFAULT 1;
DECLARE bool INT DEFAULT 1;
DECLARE punct CHAR(18) DEFAULT ' ()[]{},.-_!@;:?/'; -- David Rabby added \'
SET s = LCASE( str );
WHILE i <= LENGTH( str ) DO -- Jesse Palmer corrected from < to <= for last char
BEGIN
SET c = SUBSTRING( s, i, 1 );
IF LOCATE( c, punct ) > 0 THEN
SET bool = 1;
ELSEIF bool=1 THEN
BEGIN
IF c >= 'a' AND c <= 'z' THEN
BEGIN
SET s = CONCAT(LEFT(s,i-1),UCASE(c),SUBSTRING(s,i+1));
SET bool = 0;
END;
ELSEIF c >= '0' AND c <= '9' THEN
SET bool = 0;
END IF;
END;
END IF;
SET i = i+1;
END;
END WHILE;
RETURN s;
END;
|
DELIMITER ;

Filed under: Uncategorized No Comments
17Jul/110

POD Update – Mid July

The two newest things for POD are:

  • New File - Working, almost fully polished.
  • Started on Contextual menus.
  • Made the FTP LIST command parser much more solid (it lists the files from your ftp server). Still needs to be tested on more ftp servers though.
That's all, just a quick little "what we're up to". Weston is working on it more tonight, so this is probably shorter than it should be.
Filed under: POD No Comments
4Jul/110

POD Update

Hiyea folks, just another update on the status of POD and how its coming along. We are now (well sometime tomorrow) accepting any requests for the Alpha-2 version of POD.

  • Loads of bugfixes
  • Loading & Storing multiple sites
  • Login / Registration
  • Add "ftp sites" to your account.
  • Read data from "ftp site" you select and load into its files for the editor (Hooray!!)
  • Encryption on Passwords - I am not going to say how, since that would decay the security just by saying "lol its an md5" (by the way, its not just an md5), at any rate the important fact I want to share is that a crazy encrypted string is stored in our database - not your FTP password.  Then the FTP password is decoded upon the time that it goes to get used. This is so that if our system is ever hacked and they steal our database, they won't be able to easily retrieve your FTP passwords. Host and User are not encrypted - I felt that might be going overboard.
  • Added support for future stuff, like line-height, scroll speed, etc--
  • Added a Code Navigator (OOoooo! Fancy! - but fairly buggy right now. Works great on smaller files, large files murder it)
  • Split FTP files into 2 seconds - FTP Tree and FTP Files, concept was taken from Filezilla (I love filezilla!). If you find this feature annoying, the code navigator shares a space with the ftp tree, so you can just never open the ftp tree if you don't want to.
  • Added FTP Passive/Active mode option.
  • Added an option for SSL to FTP connection.

Sorry if I seem disjointed, I just got done working on this stuff, and its 2am, so I am quite sleepy. Goodnight, Everybody!!

Notice: Not all of these features listed above are 100% complete, some of them are just started on.

Filed under: Uncategorized No Comments