PhotoDune

Posts by bfintal

281 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Philippines
  • Referred between 10 and 49 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 50 000 and 100 000 dollars
bfintal says

Glad people are interested in this! :)

It’s not yet ready, I’m still cleaning the code since I want pure separation of the framework and theme-specific files.

281 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Philippines
  • Referred between 10 and 49 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 50 000 and 100 000 dollars
bfintal says

Okay so that was a bad example to showcase the framework lol! The previous shortcode example was better: http://themeforest.net/forums/thread/thinking-of-releasing-my-wp-theme-framework-for-free/84195?page=2#message_content_708821 or a widget, page/blog meta options example maybe.

But unfortunately if this class isn’t followed, then it would be weird since you’ll do a 1-liner for the menu, then a class for some other thing.. that would definitely be confusing. The reason for classes is that each class is a single file, then different classes go into different model folders for better organization.

281 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Philippines
  • Referred between 10 and 49 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 50 000 and 100 000 dollars
bfintal says

Nope it doesn’t include a slider. What it does however is to make all your files organized as well as makes adding anything easier.

It provides extendable classes to make adding admin panels, admin meta options, menu locations, etc.. easy. For example, to add a new menu location, just create a new model file under the navigation folder which only contains:

<?php

class BFINavigationPrimaryModel extends BFINavigationModel {

    const SLUG = 'primary_menu';

    function __construct() {
        $this->slug = self::SLUG;
        $this->name = 'This is the theme\'s primary menu on the top of the site.';
    }
}

After that, it takes care of the rest and the Appearance > Menus admin panel will have a new drop down for selecting a menu to use for your ‘primary menu’.

Aside from this, the framework provides new helper functions. For example, it provides the function bfi_breadcrumbs which you can just call in your view file and it’ll output some breadcrumbs for your page. The function look like:

bfi_breadcrumbs($class = '', $delimiter = '', $attrString = '')

Here’s a real implementation example. Adding a new admin panel with a bunch of options is a pain. With the framework, to create a new admin panel, you just have to create a class for it. Then for options, you just add them with a function call. For example:

$this->addOption(array(
    "name" => "Background color",
    "type" => "colorpicker",
    "desc" => "The background color of the site. This can be hidden by the page media.",
    "id" => "style_background_color",
    "std" => "#54acf0",
));

The framework will take care of creating the menu in the admin and displaying the option. You can then use the following function to get the value the user saved:

bfi_get_option('style_background_color');

The good thing about this is that the framework already does the caching of the option values so that multiple calls won’t add any database queries. It also doesn’t clutter the database with multiple rows, and just keeps all the theme’s options in just a single row for fast and clean access. :)

281 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Philippines
  • Referred between 10 and 49 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 50 000 and 100 000 dollars
bfintal says

I think it’s because of security and speed. Honestly now that I don’t use timthumb, my images get served faster since the image data doesn’t need to pass through PHP. And there’s the bonus of not asking the buyer to chmod timthumb’s cache folder. Use BFI Thumb instead :)

281 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Philippines
  • Referred between 10 and 49 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 50 000 and 100 000 dollars
bfintal says

Hey everyone who still use Cufon! Just made a small jQuery plugin that allows smooth hover transitions on Cufonized anchor links since Cufon won’t ever support it.

Here’s the demo / script: http://bfintal.github.com/Cufon-Smooth-Hover/

Haven’t tested in IE yet (lazy) but for the awesome browsers, the results look good. I haven’t tested all cases yet, especially on more complex placements of cufon text but I think it should work.

Feel free to use the script! Enhancements and testing are always welcome :)

281 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Philippines
  • Referred between 10 and 49 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 50 000 and 100 000 dollars
bfintal says

Updates: The framework is going to be called BFI Core (since i don’t want to rename ALL the namespacing function prefixes in the library).

I recently released a WP theme that used the framework. Here’s the demo for it: http://themes.mas.gambit.ph/

So here’s some news, I’m updating my themes together with further making the framework stronger. As soon as the themes are updated, I’m going to release BFI Core.

281 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Philippines
  • Referred between 10 and 49 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 50 000 and 100 000 dollars
bfintal says

Previously, you’d have to add ‘crop’ => true to the parameters, since that was how WP’s image editor classes did it.

I recently updated the script in Github to make cropping automatic depending on what dimensions you resize your image. Currently, if the aspect ratio of the dimensions you use doesn’t match the original one, it’ll resize then crop it similar to how timthumb does it.

Made a proper page for it: http://bfintal.github.com/bfi_thumb/ :)

281 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Philippines
  • Referred between 10 and 49 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 50 000 and 100 000 dollars
bfintal says

Thanks for making Aqua Resizer also, a snippet of code in BFI Thumb was from that :) btw, added scaling up of images

281 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Philippines
  • Referred between 10 and 49 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 50 000 and 100 000 dollars
bfintal says
Important things I learned from submitting themes:
  1. Double, triple, quadruple check all margins, spacing & alignment
  2. Use a framework or create your own or else updating all themes will be a pain (I’m currently experiencing it now)
  3. When faced with a hard rejection, take a break first. Watch a movie, tv series, go for a walk before working again
  4. Support is a b!@#$
  5. When the theme gets accepted, stop hitting the refresh button to check sales and turn on the xbox or ps3 and go play first then go to work on the next one
281 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Philippines
  • Referred between 10 and 49 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 50 000 and 100 000 dollars
bfintal says

Okay so I got my theme accepted now. I removed all timthumb from my theme then created BFI Thumb, an on the fly image resizer that can apply some image filters as well as scale/resize images up or down.

It’s easy to implement, just include the script in your theme then use it (almost) like timthumb:

require_once('BFI_Thumb.php');
$params = { 'width' => 400 };
echo "<img src="" . bfi_thumb( "URL-to-image.jpg", $params ) . "" />";

The script also does caching inside the uploads folder, extends WP’s native classes and only allows images from the WP instance to be resized.

If anyone has this timthumb problem also, feel free to use my script. Code and instructions are in the Github page.

by
by
by
by
by