This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function codex_custom_init() { | |
$labels = array( | |
'name' => 'Books', | |
'singular_name' => 'Book', | |
'add_new' => 'Add New', | |
'add_new_item' => 'Add New Book', | |
'edit_item' => 'Edit Book', | |
'new_item' => 'New Book', | |
'all_items' => 'All Books', | |
'view_item' => 'View Book', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Show avg rating for multiple posts for same form id, | |
* calls from shortcode or direct function call or from widget | |
* | |
* @param $option | |
* @param int $show_title | |
* @param int $show_form_id | |
* @param int $show_text | |
* @param int $show_star | |
* @param int $show_single |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$postid = $post->ID; | |
$rating = standalonePostingRatingSystem('4', $postid); | |
echo '<div style="left-margin:200px;">'.$rating.'</div>'; | |
adjust the margin . | |
in other theme hopefully you dont have to do anything. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* If you are in WP loop leave this blank. The id will be automatically inhertited. | |
*/ | |
$postId = ''; | |
/* | |
* If you don't know the rating form ID, please go to the "Rating System"->"Rating Form Listing" page from admin | |
* and get the ID of the rating form. If you yet cannot get the ID leave this blank, the default form will be loaded. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//The standalone rating form function is used to show the rating form using direct function call from theme or ther plugin. | |
/** | |
* This function add standalone rating form or custom rating form call. | |
* This will add both rating form and review list both based on form setting and permission | |
* | |
* Also it'll not be cached just like as the comment system of wp | |
* | |
* @param $form_id rating form id, if empty then will use the default one | |
* @param $post_id post id, if empty then will use the post id from the loop | |
* @param $theme_key if empty then will use from default setting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Go to(windows style path) joomla root/components/com_k2/views/item/view.html.php | |
// and comment line from 445 to 455 | |
/* | |
$document->setMetaData('og:url', $uri->toString()); | |
$document->setMetaData('og:title', htmlspecialchars($document->getTitle(), ENT_QUOTES, 'UTF-8')); | |
$document->setMetaData('og:type', 'Article'); | |
$facebookImage = 'image'.$params->get('facebookImage', 'Small'); | |
if ($item->$facebookImage && JFile::exists(JPATH_SITE.$item->$facebookImage)) | |
{ | |
$image = substr(JURI::root(), 0, -1).str_replace(JURI::root(true), '', $item->$facebookImage); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
else if(JRequest::getCmd('option') == 'com_content') { | |
//var_dump($context); | |
if(!($context == 'com_content.article' || $context == 'com_content.category')) {return; } | |
$comcontent = true; | |
if($this->_floatcontent && (JRequest::getCmd('view') == 'article') && $float){$float = true;}else{$float = false;} | |
$this->_floatpos = $this->_floatposcontent; | |
$this->_floathmargin = $this->_floathmargincontent; | |
$this->_floatvmargin = $this->_floatvmargincontent; | |
//$this->_floatdistance = $this->_floatdistancecontent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Function: Add Download Query Vars | |
add_filter('query_vars', 'cbreport_query_vars'); | |
function cbreport_query_vars($public_query_vars) { | |
$public_query_vars[] = "report_ids"; | |
return $public_query_vars; | |
} | |
add_action('template_redirect', 'reportdownload_file', 5); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Simple shortcode | |
{cbscrollpane} | |
text here | |
{/cbscrollpane} | |
For width and left align |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @package Joomla.Administrator | |
* @subpackage Templates.isis | |
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE.txt | |
* @since 3.0 | |
*/ | |
(function($) | |
{ |
NewerOlder