Frumph.NET

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

How to add social media icons to the Menubar w/ the ComicPress and Easel themes.

Dec25
by Philip M. Hofer (Frumph) on December 25, 2010 at 9:03 pm and modified on July 14, 2019. at 5:51 am
Posted In: Wordpress

The first thing to understand is that there are ‘action’ locations all over the Easel theme and some in the ComicPress theme, ComicPress 2.9.2.28+ has a new one in the menunav area of the menubar, while the Easel theme’s menunav had some previously a new one is introduced in version 1.1.7

Those action locations allow you to use your child theme to ‘inject’ code into certain areas of the theme. With Easel the action location we are going to use is called ‘easel-menubar-menunav’ and in ComicPress it’s called ‘comicpress-menubar-menunav’ see the trend in the naming conventions yet? /grin

In both themes there’s a file available to be used in your child theme, it’s called “child-functions.php” If you do not have one you can create it.

The first thing we’re going to do is go to the Easel Options & ComicPress Options and disable the RSS feed from displaying in the menubar.

After that, open up the child-functions.php file in your child theme and let’s start adding the code.

For Easel:

add_action('easel-menubar-menunav', 'easel_social_icons');

function easel_social_icons() {
echo '<a href="http://www.twitter.com/Frumph" title="Follow Frumph on Twitter" class="menunav-social menunav-twitter">Twitter</a>'."rn";
echo '<a href="http://www.facebook.com/philip.hofer" title="Friend Frumph on Facebook" class="menunav-social menunav-facebook">Facebook</a>'."rn";
echo '<a href="'.get_bloginfo('rss2_url').'" title="RSS Feed" class="menunav-social menunav-rss2">RSS</a>'."rn";
}

For ComicPress:

add_action('comicpress-menubar-menunav', 'comicpress_social_icons');

function comicpress_social_icons() {
echo '<a href="http://www.twitter.com/Frumph" title="Follow Frumph on Twitter" class="menunav-social menunav-twitter">Twitter</a>'."rn";
echo '<a href="http://www.facebook.com/philip.hofer" title="Friend Frumph on Facebook" class="menunav-social menunav-facebook">Facebook</a>'."rn";
echo '<a href="'.get_bloginfo('rss2_url').'" title="RSS Feed" class="menunav-social menunav-rss2">RSS</a>'."rn";
}

Then we’re going to place 3 images into the images directory of your child theme, I put them into a subdirectory of that images directory called icons because i’m a stickler for organization.

The RSS, Twitter and Facebook images that I use

Notice that with these 3 images that the actually consist of a “normal” state and a “hover” state inside of the image itself, that way we do not need so many images loading all the time. The more CSS proficient people can add them all into a single image and do background-position’ing to find the right locations to use.

Next is the CSS, the CSS is the same for both ComicPress and Easel; you should put the CSS into the child-themes style.css so that it can be easier to path to the images in the images directory.

Now for the CSS

/* menunav social icons */

.menunav-social {
text-indent: -9999px;
display: inline-block;
float: left;
height: 25px;
width: 25px;
}

.menunav-twitter {
background: url('images/icons/twitter.png') no-repeat;
}

.menunav-rss2 {
background: url('images/icons/rss.png') no-repeat;
margin-right: 3px;
}

.menunav-facebook {
background: url('images/icons/facebook.png') no-repeat;
}

.menunav-social:hover {
background-position: 0 -25px;
}

If you look at this css, the .menunav-social sets the block removes the text from displaying and allocations the 25px by 25px space to use, then each of the relative icons have their own class for which image to use, finally the .menunav-social:hover changes the positioning to show the hover state of the graphic when the icon is moused over.

… erm.. and that’s it, now you have social icons in your menubar.

  • Phil
└ Tags: comicpress, easel, guide, How-To, social media
6 Comments

How to distribute child-themes with your parent theme

Dec15
by Philip M. Hofer (Frumph) on December 15, 2010 at 5:48 am
Posted In: Wordpress

A very large issue with child-themes is distribution, the need and want to have your child theme available to your end users so they can have a different variety of looks available that go along with your parent theme.

The following is the method on how to include your child themes with your main parent theme download.

The WordPress Dev team doesn’t recommend this method. In the future there will be child-themes available to be added to the repo, however this is just a side note on how to implement it if you want to.

The first step is to create a directory in your parent theme called “child-themes” and inside that directory, toss all of your child themes that are available for your parent theme into it.

Then, open up your parent themes functions.php file and we’re going to add some code to it, preferably where you init your other functions.

add_action('init', 'easel_init_child_theme_directory');

function easel_init_child_theme_directory() {
	register_theme_directory(get_template_directory().'child-themes');
// fix for windows servers and the  / issue.
	add_filter('stylesheet_uri', 'easel_fix_path');
}

function easel_fix_path($stylesheet_uri) {
	$stylesheet_uri = str_replace('', '/', $stylesheet_uri);
	return $stylesheet_uri;
}

Using the above addition to your functions.php file is telling WordPress to register the child-themes directory that is IN your template directory (parent) as an additional theme directory to look at for themes. Also take note to use the instead of / when using the register_theme_directory() function.

The next step is adjusting your child themes css import, normally with a child theme you would import by going up one directory and then back down to the parent theme directory to find the style.css of the parent, like so:

@import url('../easel/style.css');

However, since the child themes are now being stored within the parent we need to change the location of where to find the style.css of the parent for importing, such as this:

@import url('../../style.css');

Basically going up two directories to where the parent themes template root is.

.. and that’s it. Now when people activate the theme and go to look in the appearance -> themes, it will also show all the child themes you have available AND you now can distribute your child themes with your parent theme, even on the WordPress.org repository.

– Phil

└ Tags: Child Theme, distribute, How-To
 Comment 

Browser Specific CSS

Dec10
by Philip M. Hofer (Frumph) on December 10, 2010 at 9:22 pm
Posted In: Guide

With ComicPress, you can specify unique and individual changes for each browser type, including mobile devices. [1. This is a ComicPress specific ability, won’t work on other themes.]

Browser Specific ‘targetting’ CSS element identifiers:

.lynx
.gecko
.opera
.ns4
.safari
.chrome
.ie
.iphone

Basically if you use any of these identifiers *before* another css Class or ID in your css it will specifically only be used for that browser that views the page.

For example:

.somecssbox {
      margin-top: 10px;
}

^ The above will make a margin-top of 10px on whatever CSS element you chose, however say it doesn’t look correct in IE browsers because IE does whatever IE does and gives it another additional pixel.

So this is how you override it by being browser specific”

.somecssbox {
      margin-top: 10px;
}

.ie .somecssbox {
      margin-top: 9px;
}

All browsers will use the margin-top: 10px; and because you put the .ie .somecssbox directly after it, all IE based browsers will use the 9px margin-top. Which fixes the look of your site specifically for IE.

You of course can do this for all the other browser types as well. [2. iphone refers to most mobile phones apparently.]

 Comment 

Frumph’s ComicPress

Dec08
by Philip M. Hofer (Frumph) on December 8, 2010 at 3:50 am
Posted In: Blog

As everyone knows; I’ve taken over ComicPress’s development for several years now (sorta) as a group with the others then when they bowed out kept it going because end-users use ComicPress.

Unfortunately any donations that people have given for the developement of ComicPress and it’s usage has not gone to me. The donation button on the ComicPress.org site goes to Tyler Martin. Which in all reality it should. However, it’s come to the point where Tyler is MIA in development and hasn’t included himself in anything since 2.8.0.r5 was released.

I personally have nothing against Tyler, I dig the lug and hope whatever he’s doing is awesomesauce.

For the last year I have been trying to get out of developing ComicPress for several reasons, one of them is my health. Two times this year I have been to the point where I wouldn’t think I would see the next day, both times I have been blessed to recover nicely. The other reason is financial. Medical bills, living, a son that eats like a racehorse and a never ending multitude of fiasco’s involving a lemon of a car I bought. Lastly, I really like you guys (and girls – rawr) and feel that keeping ComicPress updated makes a real difference to you, that you have a viable means to show your art and story on the web. Ultimately I guess it’s a deep sadness that all the times that people have “appreciated” my efforts and assistance in helping you and them with your site is not specifically going towards me; to this I mean the donations on the ComicPress.org site. I do not and have not received any donations from that, minus one time where in the notes it specifically put my name in it.
↓ Read the rest of this entry…

16 Comments

Stick it to the email spammers.

Nov23
by Philip M. Hofer (Frumph) on November 23, 2010 at 4:21 am
Posted In: Blog

Tired of getting spam emails? .. want to get some revenge? Want to make it so that those spammers can never spam *anyone* ever again?

Now mind you, this really has mostly to do with people who run email smtp/pop3 servers of their own.

Most all email daemons, like mailenable and others will let you configure your servers to use a ‘blacklist’ which is called a DNS-bsed Blackhole list i.e. DNSBL.

More info on wikipedia.

These blacklists allow your mailer daemon (the program that handles incoming and outgoing mail) to be checked with the blacklist on incoming mail to make sure that if the incoming mail is ON the blacklist to not let it through.

I use Spamcop,  Spamcop is a DNSBL that my email server uses to check incoming mail to see if its registered spam or not.

How can you ‘stick it’ to the email spammers?  Well that’s easy, you can report email to spamcop.net by logging onto their site and copy-pasting the email (or forwarding it to the email they provide).

Once you have reported the spam, Spamcop will register that domain/service as a spam site and will not allow any more mail be received by anyone using spamcop as their DNSBL (blacklist)

There are a couple of things to remember though, you cannot report spam emails that you have opted in for to begin with, find a way to deop yourself from receiving those, no other way; otherwise reporting all spam using spamcop is very valid.   The other general rule of thumb is that the mail has to be an advertisement of some sort, you cannot report an email from a friend or you, yourself will be removed from ever being able to report spam again.

Read the documentation on the spamcop site to find out how you can get the correct information that they require for reporting, the easiest way is just to forward it to the email they provide you when registering, but I personally like to copy paste the email itself (the whole properties -> view source of email) thing including headers.   That way I know its working right.

– Phil

Note: heres a mailenable response for blocked spam now:

3DEADA763F958.MAI	732	195.34.224.86	QUIT	QUIT	-	6	0	
11/23/10 04:19:06	SMTP-IN	52E13C90FBAE4C49994F8F81B69D2077.MAI	716	201.35.220.29			220 frumph.org ESMTP MailEnable Service, Version: 4.23-- ready at 11/23/10 04:19:06	0	0	
11/23/10 04:19:06	SMTP-IN	52E13C90FBAE4C49994F8F81B69D2077.MAI	716	201.35.220.29	HELO	HELO 201-35-220-29.jvece701.dsl.brasiltelecom.net.br	250 Requested mail action okay, completed	43	54	
11/23/10 04:19:06	SMTP-IN	52E13C90FBAE4C49994F8F81B69D2077.MAI	716	201.35.220.29	MAIL	MAIL FROM:&lt;vendas@rastriblock.com.br&gt;	250 Requested mail action okay, completed	43	39	
11/23/10 04:19:07	SMTP-IN	52E13C90FBAE4C49994F8F81B69D2077.MAI	716	201.35.220.29	RCPT	RCPT TO:&lt;philip@frumph.net&gt;	250 Requested mail action okay, completed	43	29	
11/23/10 04:19:07	SMTP-IN	52E13C90FBAE4C49994F8F81B69D2077.MAI	716	201.35.220.29	DATA	DATA	354 Start mail input; end with &lt;CRLF&gt;.&lt;CRLF&gt;	46	6	
11/23/10 04:19:09	SMTP-IN	028A05E5456342469DA39BF8A8A2F1DA.MAI	716	201.35.220.29	QUIT	QUIT	221 Service closing transmission channel	42	6	
11/23/10 04:23:54	SMTP-OU	9820172B56F44A9AAD43DEADA763F958.MAI	636	195.34.224.86	CONN		220 merlin.lipetsk.ru ESMTP ESMTP server ready; Tue Nov 23 15:23:59 2010	0	74	
11/23/10 04:23:54	SMTP-OU	9820172B56F44A9AAD43DEADA763F958.MAI	636	195.34.224.86	EHLO	EHLO frumph.org	250 Hello, spam sender. Pleased to be wasting your time.	17	58	
11/23/10 04:23:54	SMTP-OU	9820172B56F44A9AAD43DEADA763F958.MAI	636	195.34.224.86	MAIL	MAIL FROM:&lt;info@frumph.net&gt;	250 You are about to try to deliver spam. Your time will be spent, for nothing.	29	81	
11/23/10 04:23:54	SMTP-OU	9820172B56F44A9AAD43DEADA763F958.MAI	636	195.34.224.86	RCPT	RCPT TO:&lt;BethanieCerva5252@lipetsk.ru&gt;	451 Temporary failure, please try again later.	40	48	
11/23/10 04:23:54	SMTP-OU	9820172B56F44A9AAD43DEADA763F958.MAI	636	195.34.224.86	QUIT	QUIT	-	6	0
 Comment 
  • Page 19 of 30
  • « First
  • «
  • 17
  • 18
  • 19
  • 20
  • 21
  • »
  • 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 ↑