Customizable – message blocks
-
Awesome Theme, I LOVE it. I do have one request / question….
The “warning message blocks , important message blocks, etc†, is there a way to edit the image/name or to create a new type of this???
I would like to create a “quotes†message box
or “resources” or whatever….
I don’t care if for now it is a hack, but maybe an idea for future options.
Admin
Thanks!!!
Figured it out!!!
you can see here:
http://plucksource.com/resources/test-blocks/
** don’t forget to copy your .png image 48×48 to the /js/buttons/ directory
in the style.css file you need to add/edit
.quote_block {
background: #679BCE url(js/buttons/quote.png) no-repeat scroll 10px 7px;
border: 1px solid #090988;
color: #030303;
}
in the functions.php you need to add/edit:
function quote_block_shortcode_handler( $atts, $content=null, $code="" ) {
return '<div class="quote_block">' . $content . '</div>';
}
add_shortcode( 'quote', 'quote_block_shortcode_handler' );
I edited the mce-shortcodes.js in the js directory added:
ed.addButton('quote', {
title : ed.getLang('grapheneshortcodes.errortitle', 'Add a quote message block'),
image : url+'/buttons/quote.png',
onclick : function() {
ed.selection.setContent('');Quote:' + ed.selection.getContent() + '
}
});but did not get the buttons added to the menu on the page/post edit.
Any ideas??
Mod
Those look awesome! I especially like the smoking hot one.
I haven’t figured out how to add the buttons to the TinyMCE editor, but haven’t looked too much into it. This article tell show to add buttons through creating a plugin, but I’m not sure how to do it just through a child theme.
(Don’t forget to put code between backticks.)
Ken
Well, spent all day but have something AWESOME for you guys:
I have a set of 17 icons in code to just cut and paste into the correct files!
you can get ALL the info HERE:
http://plucksource.com/resources/test-blocks/
Included are samples of each one, and instructions how to edit colors images, etc.
BTW this is my first attempt at a HACK!!
Wahooo, it works!
Mod
Thanks for those. They look great.
BTW, I had an issue where I wanted to include one shortcode inside of another. It didn’t work. (Specifically, I created another shortcode so that I could mark single words within a paragraph as
code. It didn’t work when I included it inside the about “smalltext” shortcode.A bit of nosing around in the WordPress Codex gave me the following tweak. Just add the following lines to the top of your
functions.phpfile:define('FILTERPRIORITY', 10);
add_filter('the_content', 'do_shortcode', FILTERPRIORITY);
add_filter('widget_text', 'do_shortcode', FILTERPRIORITY);Does the trick.
I haven’t had time to figure out the Tiny MCE buttons yet. Maybe later.
Ken
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.
