Friday, 6 September 2013

Blizzard Blue Post for Joomla

Blizzard Blue Post for Joomla

As gamers or press writers we know blizzard uses a quote styled post
called "Blue Post" I made one with a friend a long time ago for Wordpress
and it works perfect how we wanted it.
Now of-course switching to Joomla I have no idea to create one... Yes I
don't have php knowledge (just a little bit) but i have css knowledge as I
styled the "Blue Quote" plugin for wordpress and my friend code'd it!
So is there anyone that could help me out? I'am able to release a blue
post plugin for free after I styled it again.
Note: I Searched on the web / google for those kind like plugins but i
couldn't find any.
So this is how it works on wordpress:
Here is how it looks like Preview Here
In wordpress Posts I had to add the tags: "We called it green quotes
because it was green in our template"
[greenquote author="NAME" link="http://www.site.com/"
source="http://www.site.com/"]
The text that has to be in that quote / greenpost
[/greenquote]
The wordpress plugin code:
<?php
/*
Plugin Name: Green Quotes
Description: Quote Block
Version: 0.6a
Date: 6 Januari 2012
Author: Chrizz
*/
function GreenQuotes( $atts, $content = null ) {
extract(shortcode_atts(array(
"author" => '',
"link" => '',
"source" => ''
), $atts));
$greenquote = '<div class="gq-greenquote">';
if(!(empty($author) and empty($link) and empty($source))) {
$greenquote .= '<div class="gq-postedby">';
if(!empty($author)) {
$greenquote .= __("Originally Posted by", "gq").'
<strong>'.$author.'</strong>';
}
if(!empty($link) and !empty($source)) {
$greenquote .= ' (<a href="'.$link.'"
target="_blank">'.__("Official Post", "gq").'</a> | <a
href="'.$source.'" target="_blank">'.__("Website",
"gq").'</a>)';
}else if(!empty($link)) {
$greenquote .= ' (<a href="'.$link.'"
target="_blank">'.__("Official Post", "gq").'</a>)';
}else if(!empty($source)) {
$greenquote .= ' (<a href="'.$source.'"
target="_blank">'.__("Website", "gq").'</a>)';
}
$greenquote .= '</div><div class="gq-clear"></div>';
}
$greenquote .= $content.'</div><div class="gq-clear"></div>';
return $greenquote;
}
add_shortcode("greenquote", "GreenQuotes");
wp_enqueue_style('green-quotes-custom-css', plugins_url('style.css',
__FILE__));
wp_enqueue_script('green-quotes-jquery.corner',
plugins_url('/js/jquery.corner.js', __FILE__), array('jquery') );
wp_enqueue_script('green-quotes-custom-js', plugins_url('/js/custom.js',
__FILE__), array('jquery', 'green-quotes-jquery.corner') );
?>
The Javascript Code:
jQuery(document).ready(function(){
jQuery(".gq-greenquote").corner();
});

No comments:

Post a Comment