Frumph.NET

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

Centering the menu items within the menuber wrapper in the Easel theme.

Jul19
by Philip M. Hofer (Frumph) on July 19, 2013 at 11:36 am and modified on July 19, 2013. at 2:26 pm
Posted In: Easel

It’s really simple, you add this CSS to your stylesheet, whether the style of the child theme you use or Jetpack’s edit CSS

.menu-container { display: table; margin: 0 auto; }

That’s it 😉

(edit: .menu- not .menubar-)

11 Comments

my boy made me some banners for father’s day

Jun16
by Philip M. Hofer (Frumph) on June 16, 2013 at 2:15 pm and modified on August 11, 2013. at 6:39 pm
Posted In: Blog

draft1

draft2

draft3

<3 them! cause they were made by him.

6 Comments

You’re not going to believe this, but hey. Why not, right?

Apr27
by Philip M. Hofer (Frumph) on April 27, 2013 at 2:04 pm and modified on April 27, 2013. at 2:52 pm
Posted In: ComicPress, Wordpress

I am currently making a “ComicPress – Plugin” designed after the Comic Easel plugin, but uses the ComicPress coding scheme that will work in conjunction with ComicPress Manager. Which will allow you to use ComicPress on the Easel theme and integrate it into any theme on the WordPress repository.

It’s either that or I take the Easel theme and move ComicPress into it ;/ ONE OR THE OTHER! Which one would you rather have? .. seriously, need to know.

– Phil

Additionally do you think we should retire ComicPress altogether in favor of the better Comic Management Systems that are available?

32 Comments

Use my custom default random avatars code in any theme.

Apr19
by Philip M. Hofer (Frumph) on April 19, 2013 at 9:37 pm and modified on November 23, 2016. at 6:15 am
Posted In: Wordpress

What this does is give your users who do *not* have gravatars from gravatar.com when they post comments, custom avatars that you create. It will pick one from inside the directory and constantly use it based on the end users email address that they use when making a comment.

This code will only replace “default” avatars, not ones that people have made at gravatar.com.

The ComicPress and Easel themes already have this, this is a code snippet for ‘other’ themes.

This is not code for someone who is completely new to PHP and WordPress coding.

Include this into your functions.php file of your main theme you use, not the child theme. You will have to add it again if your theme updates. This is meant for theme author’s to include it in their themes on updates.

function frumph_random_default_avatar_callback( $id_or_email = '' ) {
	if (!empty($id_or_email)) {
		$count = count($results = glob(get_stylesheet_directory() . '/images/avatars/*'));
		if ($count) { 
			$checknum = hexdec(substr(md5($id_or_email),0,5)) % $count;
			if ($count > 0) {
				$custom_avatar = basename($results[(int)$checknum]); 
				$replace_src_avatar = get_stylesheet_directory_uri().'/images/avatars/'.$custom_avatar;
				return $replace_src_avatar;
			}
		} else
			return get_option('avatar_default');
	} else
		return get_option('avatar_default');
}

THEN, you need to modify your get_avatar call in your theme (if your theme has it), this code is if your theme HAS a call to the get_avatar function.

What you do is you search for the function ‘get_avatar’ within the theme you are using, for example the thematic theme in the library/extensions/ has a file called ‘comments-extensions’ inside of it and the line with get_avatar looks like this:

$avatar = str_replace( "class='avatar", "class='photo avatar", get_avatar( $avatar_email, $avatar_size ) );

You want to modify the get_avatar function in it, the 3rd position is the the reference to the ‘default’ image, right after size, you will pass the email of the commenter to the function.

$avatar = str_replace( "class='avatar", "class='photo avatar", get_avatar( $avatar_email, $avatar_size, frumph_random_default_avatar_callback($avatar_email) ) );

In the twentytwelve theme, it’s in the content*.php files, looks something like this:

<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 68 ) ); ?>

You modify it to add the 3rd argument which changes the default image that it uses, with my code you also pass the email of the commenter in the function.

<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 68 ), frumph_random_default_avatar_callback(get_the_author_meta('user_email')) ); ?>

THEN
Add your images into the theme (or child theme’s) images/avatars/ directory so wp-content/themes/mychildtheme/images/avatars/ directory.

The reason I use get_stylesheet_directory is so that the images are retained in the child theme and if the child theme doesn’t exist the end user can put them in their main theme, but checks child theme first.

– Phil

3 Comments

Easel (theme) 3.3 Changelog

Apr10
by Philip M. Hofer (Frumph) on April 10, 2013 at 8:06 pm and modified on April 11, 2013. at 11:58 am
Posted In: Comic Easel, Wordpress
  • 1. Removed extra code inside the index.php file and fixed the pre_get_posts in the functions.php to associate the MAIN QUERY ONLY $query-> properly for posts per page.
  • Basically it removes an extra loop which wasn’t needed.

  • 2 & 3. removed the use of the function easel_display_post() – now using get_template_part(‘content’ ref: see format types (content.php) – added format types, which you can ‘skin’ the post area for the format type that you want to look differently for that particular format
  • content-aside.php content.php content-comic.php content-page.php   basically each ‘content type’ has their own php file (which is basically html), this will allow you to modify those ‘post areas’ display look and feel how you want them to in your child theme… basically copy the content- type file over to the child theme and hack away.  You can also create other ‘content’ types which are commented out in the functions.php like for images and video’s etc if you want specific looks for your post areas for whatever content type you want.

  • 4. rewrote the functions.php to stay with the guidelines of the theme review team as well as implement for post formats
  • n/t

  • 5. revamped how the featured image thumbnail for regular posts displays
  • IN the post info area, to the left of the title, the thumbnail will now display all mini like, instead of above everything, looks keen.

  • 6. revamped the display of the .post-info area of posts in the default style-default.css file
  • in the default style I added some ‘look’ to the post info (the header of  each post) to denote it’s difference from the rest of the post.

  • 7. added opengraph information for making a thumbnail for youtube video’s
  • opengraph = facebook – google, etc.

  • 8. css element #column is now #content to stay correctly in tune with other themes
  • This one is very important to CSS skinners, #column no longer exists and it is now #content, so find-replace inside of your CSS file if you used it. This also paved the way to allow the use of Jetpack’s Infinite scrolling. Which allows people to keep scrolling down the page and new posts will pop up. (along with the post formats change)

    NOTE edit the style.css, search for .post-image

    .post-content .post-image {
    	float: left;
    	display: inline-block;
    	padding: 3px 3px 0;
    	border: solid 1px #ccc;
    	margin: 4px;
    }
    
    .post-content .post-image img {
    	width: 100px;
    	height: auto;
    }
    

    Fixes the issue with 3.3 with the post image in the title

    IF you have layout-head.php in your child theme, make sure to change the id=”column” to id=”content” inside of that .php file

    └ Tags: Changelog
    19 Comments
    • Page 11 of 30
    • « First
    • «
    • 9
    • 10
    • 11
    • 12
    • 13
    • »
    • 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 ↑