This seems like it should be a given, but it seems that WordPress has no easy function to get the current URL. I didn’t want to use
$_SERVER variables to get the URL, but after finding no good WordPress solution, I decided to bite the bullet and just make up a
$_SERVER solution for the time being.
Some time passed, I forgot about it and found some other headaches to occupy my time. Then I found this post with a solution that was to my liking. The only thing that I didn’t like about it was that it always appended the original query string, whether you were using permalinks or not. I added a little conditional to it and now I have a
current_url function that I wouldn’t kick out of bed.
function current_url($trailingslash = false)
$current_url = isset($wp->request) ? home_url($wp->request) : add_query_arg($wp->query_string, '', home_url());
return $trailingslash ? trailingslashit($current_url) : $current_url;
When I was putting together my WordPress portfolio plugin, Portfolion, I designed an icon for it in the typical WordPress icon style. I thought that I would release the PSD files as it is hard to find good WordPress icons. All the layers are preserved, so anyone that may want to use it can modify the colors and add to it as they please. Read more …
As I write this post, I am uploading a mess of files that I’ve been working on for the past month or two that make up the first real Abramski site. I use the word real, because I don’t believe downloading a theme you like and calling it your own flies if you are any type of developer or designer. For years now, I’ve had a theme or two up here masquerading as my site while I wrote some blog posts and I’m somewhat embarrassed about it. I had no portfolio to speak of because I had no work that felt like my own that I really wanted to showcase. This site was always meant to be a priority but like many other designers and developers, I put off getting this site together for years. Read more …
The web is always changing its style. Take a look at any of these design showcase sites like Web Creme or The Best Designs and you’ll see certain styles consistent with the flavor of the month. Go back about 30 pages or so and you’ll see that different trends are in vogue at that time. I’ll wager that you see at least one of those wraparound ribbons. I never used that on any of my sites, mostly because I knew it was a fad. You can pretty much tell its all over for a look when some mook makes a generator page for it. Now, it’s mainstream and it’s not something designers want to be a part of anymore. Fashion is fickle and designers are chic. It’s a designer’s job to stay ahead of the status quo. Read more …
I just released an addon module for PyroCMS. For those of you that may not know, PyroCMS is a content management system built on Codeigniter. For those of you that may not know Codeigniter, Google that shit. I can’t explain everything.
The Fonts module manages, protects and obfuscates webfonts. Your webfonts are protected by checking
HTTP_REFERER to make sure that only requests from your website will be allowed to download the fonts. Direct directory download of the fonts is denied with an .htaccess rule in the fonts directory. The physical location of your fonts is hidden with programatic access through an encoded link. Read more …
The public release of my ActionScript framework is now available. Check out the shiny new site where you can find documentation and a user guide to help you get started. To make it even more simple, the site comes with Boilerplate, a utility that creates either a Flex or pure ActionScript project at a single click of a button.
I really think that the learning curve for this framework is minimal compared to some of the big names out there. I think that this is important for some less experienced programmers and some jobs that just don’t need a giant framework to get it done.
I don’t know how much I’ll be updating this framework, it really depends on the community. If it finds a place out there, then I will add to it and make it better. It also depends on jobs I get where I need to make something in ActionScript. If this framework is suitable for the project, I will probably improve upon it as I see where it needs improvement as I work.
A special thanks to Markus Winkler for taking a look and giving his input. You can check out his site here. You can follow the Cyntaxic framework on Twitter.
I just finished up the first public beta release on my ActionScript MVC framework, Cyntaxic. There is going to be a site launch for it coming soon. Right now, the beta can be checked out from my SVN repository. Comments are very welcome. The best place to put those comments is here until the site launch. The documentation can for the framework can be found here. I may make this prettier, or just less Adobe docs looking, but we will see about that for the official site launch.
Also, check out the demos built with Cyntaxic. The Stickies demo is a pure ActionScript application showing off view management and the Cyntils demo is a Flex application displaying the Cyntaxic’s utility classes. The Stickies demo can be checked out from here and the Cyntils demo can be checked out from here.
I have been using CodeIgniter on my most current project and I am really happy with the way it works. If you know anything about MVC and OOP, there is very little learning curve to get moving with this framework.
CodeIgniter allows you to create views to display information passed in from the controller and the models of the application. Usually if you are sending arrays of information to display you will have to loop over the array. I like to write as little markup as possible so I nest views of markup that are reusable. I came across a problem where I wanted to load a view in the middle of a loop and have that nested view be aware of where it is in the loop. I needed the information from that position in the loop. The nested views have access to the variables sent by the controller, but doesn’t keep track of foreach iteration variables.
Here is the solution that I cooked up to get that information over to the nested view. Instead of using a foreach loop I use just a for loop and pass the iterator over in the view’s data parameter. Below is pseudocode of how this might look.
<?php for($i = 0; $i < count($items); $i++): ?>
<h1><?php echo $items[$i]['title']; ?></h1>
<?php $this->load->view('nestedview', array('i' => $i)); ?>
<?php endfor; ?>
<!--[if lte IE 6]>
I was recently forced to make some major upgrades to to my gear. I had two minor catastrophes befall me almost at the same time. First, my laptop died. I’m not sure what caused it but I suspect that it was turning it on before it was up to proper operating temperature. I had it in winter storage while moving. It will run for a while, but I reliably get the “you are fucked in every language” screen. It was a Power Book G4, so it was like a great, great grandpappy to the MacBook Pro now available. It was not really an unexpected loss at that age. Read more …