Frumph.NET

I'm in your site touching your stuff.
  • Home
  • Contact
  • Documentation
    • Custom Avatars
    • Custom Menubar

Easel Child Theme – High Society

Jan19
by Philip M. Hofer (Frumph) on January 19, 2011 at 8:45 am and modified on July 25, 2014. at 9:28 am
Posted In: Easel

Here’s a new child theme for Easel, @WindSpiritsGN named it for me, it’s High Society. I got some idea’s from other themes available for WordPress to put it together. (love GPL) although I didn’t directly steal their images cause they way the other themes implemented them was .. *shudder* not very well thought out.

This is for Easel 2.0+

You can download the child theme here.

└ Tags: Easel Child Theme
 Comment 

Configurable display of sidebars per-page.

Jan17
by Philip M. Hofer (Frumph) on January 17, 2011 at 2:39 pm
Posted In: Wordpress

One of the new features of my Easel theme is the configuration of each individual page to display sidebars or not.    This is useful for example if you’re using plugins (or your page) that require a a larger area to display the content in.   The Chat and Forum pages on this site  are good representations of this.

The usage of this code will allow people to not be ‘confined’ to their workspace of a normal column width.

To start with, let’s look at the function used to determine if the setting is set on the page.   This is using a meta-field (custom field) in the page editor to store the information for the page.

function easel_sidebars_disabled() {
	global $post;
	if (is_page()) {
		$sidebars_disabled = get_post_meta($post->ID, 'disable-sidebars', true);
		if ($sidebars_disabled) return true;
	}
	return false;
}

What this function is doing is grabbing the disable-sidebar post meta for that page, if it exists it will return true for the function, otherwise false.

Then the part where the code itself utilizes it to determine the column width for the content. Most column widths are static at a specific css width, with ComicPress and Easel I use narrowcolumn to determine the content column, however that’s not going to work to just to force it wider on the pages.

So what I am doing is flipping the css element itself to a different name based on the option.

		<?php if (easel_is_signup() || easel_sidebars_disabled()) { ?>
			<div id="column" class="widecolumn">
		<?php } else { ?>
<?php
if (!easel_is_signup() && !easel_sidebars_disabled()) {
		if (easel_themeinfo('layout') != 'b3cr') get_sidebar('left');
		if (easel_themeinfo('layout') == 'b3cl') get_sidebar('right');
}
?>
			<div id="column" class="narrowcolumn">
		<?php } ?>

As seen above the if (easel_sidebars_disabled()) will return true and set the column area to ‘.widecolumn’ instead of ‘.narrowcolumn’ this lets us specify different widths available in CSS without doing any dynamic junk with creating new stylesheet loads.

UPDATE: Tonight I actually made it easier and made an addition to my body_class() filter where in the body class=”” it adds a “wide” element to it, so that I can do body.wide .narrowcolumn {} and change the width with CSS instead of any switching of element names.

You may have just noticed the easel_is_signup() function call up there, with WPMS – WordPress Multisite, there’s no clear define or function to tell whether or not someone is on the signup page. .. The signup page itself is *not* made for a small column so I also made that check to push to a wider column for the signup page.

function easel_is_signup() {
	if (strpos( $_SERVER['SCRIPT_NAME'], 'wp-signup.php' ) || strpos( $_SERVER['SCRIPT_NAME'], 'wp-activate.php' )) return true;
	return false;
}

With Easel and ComicPress, I use this “if it’s not used, dont parse it” attitude. Which means that this whole functionality isn’t used unless the php file is called. So in the options for the theme there’s a checkbox whether or not to use this feature, if it is used then it will load the php for it. Here’s the rest of the functionality of this feature.

<?php
// page options - extra page options for easel, shown in a meta box in the page editor

function easel_page_editor_options($post) { 
?>
<div class="inside" style="overflow: hidden">
	<?php 
		wp_nonce_field( 'easel_post_options-'.$post->ID, 'easel-update-page-options' ); 
		$disable_sidebars = get_post_meta($post->ID, 'disable-sidebars', true);
	?>
	<table>
		<td valign="top">
			<input id="easel_sidebar_remove" name="easel_sidebar_remove" type="checkbox" value="1"<?php echo $disable_sidebars ? ' checked="checked"' : ''; ?> /> Disable Sidebars
		</td>
	</tr>
	</table>
</div>
<?php
}
add_action('add_meta_boxes', 'easel_add_page_editor_meta_box');

function easel_add_page_editor_meta_box() {
	add_meta_box('easel-page-options', __('Easel Page Options', 'easel'), 'easel_page_editor_options', 'page', 'side', 'high');
}

function easel_save_page_editor_options($post_id) {
	if (isset($_POST['easel-update-page-options']) && !wp_verify_nonce( $_POST['easel-update-page-options'], 'easel_post_options-'.$post_id )) {
		return $post_id;
	} 
	if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) 
		return $post_id;
	if ( $_POST['post_type'] == 'page' ) {
		if ( !current_user_can( 'edit_page', $post_id ) )
			return $post_id;
	} else {
		if ( !current_user_can( 'edit_post', $post_id ) )
			return $post_id;
	}
	
	if (isset($_POST['easel_sidebar_remove'])) {
		update_post_meta($post_id, 'disable-sidebars', '1');
	} else {
		delete_post_meta($post_id, 'disable-sidebars');
	}
	return $post_id;
}
add_action('save_post', 'easel_save_page_editor_options');

?>

Add’s a meta box to the page editor screen with checkbox inside of it, has a save that option routine with the proper _nonce check code to make sure it’s secure from outside attempts at hacking. Also I made sure that if it’s disabled for that page that the post_meta itself is deleted so that it’s not taking up space in the database just saying off or 0.

This feature will be available in Easel 2.0 when it comes out and ComicPress (when I get to it).

– Phil

└ Tags: comicpress, easel
1 Comment

11 Things you should know about ComicPress for WordPress

Jan15
by Philip M. Hofer (Frumph) on January 15, 2011 at 4:39 am and modified on March 21, 2014. at 2:43 pm
Posted In: Blog
  1. ComicPress is designed to be a sequential day to day posting of your comics.   Each day being a new comic.   Its main purpose is not to have multiple comics per day although you can do it by posting the comics on the same day, but only one comic post can be used for all the comics posted on the same date.
  2. Comics can only be set in a single category.   When posting your comic whether you are setting it in the comics category a subcategory of the comics category or a storyline category – you  must only set one category per comic.
  3. ComicPress is built to be used *without* the ComicPress Manager, the ComicPress Manager even though buggy just makes things a bit easier.
  4. Tyler Martin originally designed ComicPress, not me (Frumph), Then John Bintz came around with ComicPress Manager and helped with ComicPress, then I joined up and took over development, literally.  Took.  It.  Over.  ComicPress evolved into something far beyond the original 2.7 scope when I released 2.8 and above.
  5. There will never be a ComicPress 3.0, 2.9.#.#.#.#.#   but never 3.0 and above.  * members read extra info below. – This doesn’t take into account of any spin offs of ComicPress, but it will never be named ‘ComicPress’ by itself, ComicPress Gold, Premium, etc sure; but not ComicPress.
  6. The reason ComicPress has stayed the way it is with the method of displaying comics per day is because Tyler wanted to keep it backwards compatible with previous versions of ComicPress – even though it would be a *very* easy switch to allow a more encompassing ability, its to keep people who have been using ComicPress for years still able to use ComicPress without much hassle.
  7. ComicPress 2.8 and above has been developed to be “if you don’t have it enabled, it doesn’t get parsed/executed.  Which means the less features of ComicPress you have enabled, the faster it goes.
  8. Storyline Categories slows down the process of displaying a page exponentially per child storyline category used.
  9. When people argue that all ComicPress sites look the same there are two reasons for that.  1) Most artists are not web designers, they do not fully encompass themselves into the CSS of a site.  2) It’s a good thing for your readers to have a commonality of finding how to use the site to read your comic.  The more familiar your site is,  the easier it will be for the end user.
  10. You can, indeed post multiple different comics on the same installation.  Unfortunately due to that whole backwards compatibility thing it’s still one comic post per day.
  11. CSS is universal for all websites on the Internet.  When one person bitch’s about ComicPress not easily being skinned it’s because they don’t realize that the same CSS used on one website is the same CSS used on another.  The only difference being the naming convention used for ID and CLASSES;  ComicPress itself has more CSS’ing locations, options and features then any other webcomic CMS available.

 

3 Comments

ComicPress 2.9.2.29.1

Jan13
by Philip M. Hofer (Frumph) on January 13, 2011 at 9:42 pm
Posted In: ComicPress

Having fun with the revision #’s 😉

Just bug fixes and a change to the control panel widget, nothing special.

2.9.2.29.1
$is_comic needed to be set in the archive.php before hand, was giving notice
thanks to @generaltekno for finding bug with footer-text.php with the scroll to top, adjusted it to be enable_scroll_to_top
again thanks to @generaltekno for finding the facebook like widget needing one of the facebook likes active, now changed to check if the widget is active as well
fixed the archive.php to check for non-permalinked cat= properly
change to wp_login_form in the control panel widget

3 Comments

So, you want to add your theme to the WordPress.ORG Repository?

Jan08
by Philip M. Hofer (Frumph) on January 8, 2011 at 5:00 pm
Posted In: Wordpress

Once upon a time in a WordPress far far away, there lived a single individual adding themes to the repository, there were almost no real rules or requirements besides being secure, not a copy of another theme and programmed halfway decently.

Then without warning, the Theme Review team was formed, Guidelines were updated/modified, and members of the WordPress community formed together to take on the daunting task of assuring the themes that go on the repository are up to a certain specification.

The Theme Unit Test to help designers make sure their themes are up to visual compliance was updated.  Plugins like Theme Check, Log Deprecated Notices and Debogger were created to help with making sure themes are created to the best potential they can be.

Those hopeful band of militant code raiders who review every theme on the repository even established their own world on the web, the WPTRT (WordPress Theme Review Team)’s Website even got a couple people looking it over once in awhile.   Weirdly enough, those WPTRT team member’s even reached out the community as a whole for their input!

So? You want to add your theme to the WordPress.org repository?  Well guess what, .. there are requirements, they need to be met.  With the advent of 3.1 the requirements are getting more involved.

↓ Read the rest of this entry…

2 Comments
  • Page 18 of 30
  • « First
  • «
  • 16
  • 17
  • 18
  • 19
  • 20
  • »
  • Last »

Recent Posts

  • The Proginator – Chapter 1-17
  • The Proginator – Chapter 1-16
  • The Proginator – Chapter 1-15
  • The Proginator – Chapter 1-14
  • The Proginator – Chapter 1-13

Recent Comments

  • Philip M. Hofer (Frumph) on ComicPress 2.9 CSS Overview – Part 1 – Entity List
  • James Duran on ComicPress 2.9 CSS Overview – Part 1 – Entity List
  • Philip M. Hofer (Frumph) on Understanding do_action() and add_action() – Revisited
  • sandeep on Understanding do_action() and add_action() – Revisited
  • Philip M. Hofer (Frumph) on ComicPress 4.0 soon to be released.

Categories

  • Articles
  • Blog
  • Chapter 1
  • Comic Easel
  • ComicPress
  • Easel
  • FAQ
  • Guide
  • Information
  • Proginator World 323
  • Prologue
  • Uncategorized
  • Wordpress

©2008-2021 Frumph.NET | Powered by WordPress with ComicPress | Subscribe: RSS | Back to Top ↑