The Brazenly Coded Box for Thesis 2.0

by Rick Beckman on

Due to my growth & multiple changes in my worldview over the years, this post is considered “archived” and is offered here for historical purposes only. Opinions offered above may not necessarily reflect my current beliefs, though you're still more than welcome to participate in the comments, discussing anything from the post. Thank you for understanding.

The Brazenly Coded Box is no longer supported (and may not work at all on current versions of Thesis)! Download OpenHook to take advantage of its OpenBox feature, which provides similar (but better programmed) functionality to the Brazenly Coded Box!

Looking to take your Thesis 2.0 install to the next level? Give yourself nearly limitless customization abilities with the Brazenly Coded Box! It’s more or less just like Thesis’ built-in Text box, which allows you to add plain text and HTML to your site; however, the big difference is that with the Brazenly Coded Box, you have the freedom to include any PHP coding in your site, wherever a box may be placed in Thesis.

Download the Brazenly Coded Box now!

If you’re familiar with OpenHook and how it allowed you to execute custom code wherever Thesis pre-2.0 had hooks, then this concept should be a little familiar to you. Note: Code inserted in the box will need wrapped in the appropriate <?php ?> tags; otherwise, this box will perform pretty much just like the default Thesis text box!

Do take note that, as always, having the power to add completely custom code to your site means having the power to completely hose the entire site. Seriously, if you wanted to, you could create a box that wipes your entire database upon which your WordPress is installed. Be careful! Double-check those codes, don’t install this if you don’t trust every user who has access to your Thesis admin area, and so on.

And don’t blame me if, through the use of this, your site explodes in your face!

Installation

Within your Thesis 2.0 administration panel, choose “Boxes -> Select Boxes.” On that page, upload brazenly_coded_box.zip; after it installs, tick the checkbox next to it, save your boxes, and then visit the skin editor for whichever template you wish to edit. On the editing screen’s “Add Box” widget, choose “Custom Code.”

Be creative, and have fun!

{ 20 comments in the conversation. Add yours! }

Hesham Zebida October 22, 2012 at 22:02

mmm…

And don’t blame me if, through the use of this, your site explodes in your face!

This is the first thing I thought of, which make this Box very dangerous, sorry but I won’t support this idea!

Reply

Rick Beckman October 22, 2012 at 22:14 Student of the sciences, the religions, the science fictions, and the fantasies… But mostly I’m just trying to find my groove in this big, crazy world.YouTubeGravatar

It was possible to break the site just the same with OpenHook, but that didn’t stop it from being used by countless Thesis users, especially those who were less tech savvy. I never received a complaint from them that they broke their site through adding invalid code.

I merely put the disclaimer up there because it’s a real possibility.

It’s no more dangerous (indeed, is less so) than modifying the WordPress configuration file, but it’s the first thing the WordPress install asks of its users. ;)

Nathan October 25, 2012 at 00:05

Just what I was in search of!

You da man!

Reply

Rick Beckman October 25, 2012 at 01:01 Student of the sciences, the religions, the science fictions, and the fantasies… But mostly I’m just trying to find my groove in this big, crazy world.YouTubeGravatar

Spread the word! A DIYthemes developer has already said how “dangerous” this box is on Twitter. So go forth and show how this box allows users to unleash whatever their imagination devises on their sites!

Reply

Avinash November 3, 2012 at 12:14 Gravatar

I am a great fan of Thesis Open Hook plugin which gave me limitless options to use thesis without worrying much abt the custom_functions.php.

Great to have this box again which was needed to start playing with Thesis 2. Thanks for all your hard work and releasing it for free. :)

Reply

Rick Beckman November 3, 2012 at 18:31 Student of the sciences, the religions, the science fictions, and the fantasies… But mostly I’m just trying to find my groove in this big, crazy world.YouTubeGravatar

Thanks, Avinash! Be sure to share the Coded Box with everyone you know who needs complete flexibility with Thesis 2.0!

Reply

Clarence Johnson November 7, 2012 at 07:27 Visit my website at http://www.eyewearphotoblog.comGravatar

Thank you for creating such a great tool. Appreciated!

Reply

karmen November 7, 2012 at 19:39 Gravatar

This is all kinds of awesome – exactly what I needed… How else are we supposed to add custom php code.

Reply

Rick Beckman November 8, 2012 at 20:50 Student of the sciences, the religions, the science fictions, and the fantasies… But mostly I’m just trying to find my groove in this big, crazy world.YouTubeGravatar

There’s some undocumented method involving files added to the /wp-content/ folder. Good luck if you want to go that route.

Jami November 14, 2012 at 15:02 Designer of graphics, websites; developer; coder; and all-around geek. Blogger @ www.bionic-beauty.com, www.amazingwoo.com and www.bionic-style.com. Would you like to know more curiosities about me? http://tinyurl.com/6aebwnGoogle+LinkedInYouTubeGravatar

THANK YOU!!! I’m a long-time Thesis designer/user (years & years & countless websites) currently working on a development and design project for a friend. We just loaded up Thesis 2.0.1 onto the domain. I couldn’t find a darn way to add a bit of php into the footer… until I found your wonderful “box”. I truly appreciate your hard work!

Reply

Rick Beckman November 14, 2012 at 19:48 Student of the sciences, the religions, the science fictions, and the fantasies… But mostly I’m just trying to find my groove in this big, crazy world.YouTubeGravatar

Fantastic! Thanks for your kind words, Jami!

Reply

Stephanie November 27, 2012 at 06:51

Rick – this is exactly the kind of thing I was looking for!

Question: I had everything working, but then this morning this error showed up on my site where the box was, which was at the bottom of the post on the home page, down where the “leave a comment” link is:

Warning: str_repeat() expects parameter 2 to be long, array given in /home/livelik8/public_html/penelopesays/wp-content/thesis/boxes/brazenly_coded_box/box.php on line 53

It shows up even if I delete all the code in the custom code box, so I didn’t think it’s my code – any suggestions for what I’m doing wrong? (I took the box out for the time being so they won’t be there if you actually go to the site.) Thanks so much!

Reply

Rick Beckman November 28, 2012 at 01:14 Student of the sciences, the religions, the science fictions, and the fantasies… But mostly I’m just trying to find my groove in this big, crazy world.YouTubeGravatar

Hey, Stephanie. I’m not sure why that error would start appearing; have you changed anything on your site lately?

In any event, if you can modify the wp-content/thesis/boxes/brazenly-coded-box/box.php file, we may be able to get things working fine for you.

You’ll want to find the following line (line #53) in the file; it’s right near the bottom of the file so should be easy to spot: $tab = str_repeat("\t", $depth);

Simply replace that line entirely with this: $tab = '';

This should fix the error you’re experiencing.

Rick Beckman November 30, 2012 at 18:32 Student of the sciences, the religions, the science fictions, and the fantasies… But mostly I’m just trying to find my groove in this big, crazy world.YouTubeGravatar

If you’ve enjoyed this box, then you should definitely check out OpenHook 3.4, which includes a similar box (called OpenBox) which allows complete freedom of expression wherever you’d like in your Thesis 2 skin editor!

Reply

Stephanie December 8, 2012 at 07:43

Woot! Thanks a bunch! That worked like a charm :-)

Reply

chaoxfu December 19, 2012 at 04:16 My name is Owen Huang and I am a Web Designer, Web Developer, Freelance, Wordpress Developer currently residing in the lovely city of Singapore and Taiwan.Gravatar

Thanks your sharing ^^

Reply

Nate December 27, 2012 at 10:53

Hello,

I love this box, but I just updated Wordpress and Thesis, and now get this error:

Warning: Missing argument 1 for brazenly_coded_box::html() in /home/nickname/public_html/wp-content/thesis/boxes/brazenly_coded_box/box.php on line 50

I appreciate your support!

Reply

Rick Beckman December 27, 2012 at 15:20 Student of the sciences, the religions, the science fictions, and the fantasies… But mostly I’m just trying to find my groove in this big, crazy world.YouTubeGravatar

Brazenly Coded Box was very quickly replaced by a newer, more streamlined version. Unfortunately, there is no update mechanism for boxes (that I could find), so I bundled it into the WordPress plugin OpenHook. Install OpenHook, and you’ll get a new box automatically called OpenBox.

Raaj Trambadia April 16, 2013 at 10:43

“Warning: Missing argument 1 for brazenly_coded_box::html() in /home/nickname/public_html/wp-content/thesis/boxes/brazenly_coded_box/box.php on line 50″ – the following should solve the problem.

Change (on line 50) -

..public function html($depth) {

to

..public function html($depth = ”) {

I guess that should solve it.

Reply

Nate December 27, 2012 at 23:01

Great, everything is back to normal! Appreciate it!

Reply

Leave a Comment

Your email address will not be published. Required fields are marked *.

You may use these tags and attributes to format your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <p> <q cite=""> <strike> <strong>

Use your Gravatar-enabled email address while commenting to automatically enhance your comment with some of Gravatar's open profile data.

{ 1 linkback }

Previous post:

Next post: