Skip to content

Instantly share code, notes, and snippets.

View manchumahara's full-sized avatar
💭
Life is beautiful!

Sabuj Kundu manchumahara

💭
Life is beautiful!
View GitHub Profile
//gather the data
var cbxdata = '<?php echo json_encode($content_graph); ?>';
cbxdata = jQuery.parseJSON(cbxdata);
console.log(cbxdata);
//var randomScalingFactor = function(){ return Math.round(Math.random()*100)};
var chartdata = {
labels : cbxdata.legend,
@manchumahara
manchumahara / gist:80946065dfec8ade865a
Created October 28, 2015 05:20
CBX Author Glossary for wordpress
Shortcode details
shortcode: [cbxauthorglossary]
example:
[cbxauthorglossary role="author" ]
[cbxauthorglossary role="author, editor"]
all possible parameters example
[cbxauthorglossary role="author" number="30" order="desc" orderby="display_name" include="1,,2,3" exclude="4,5,6" blogid="5"]
.cbxcouponref_btn{
display: inline-block;
zoom: 1;
line-height: normal;
white-space: nowrap;
vertical-align: middle;
text-align: center;
cursor: pointer;
-webkit-user-drag: none;
-webkit-user-select: none;
if(!is_admin()){
add_filter('number_format_i18n', 'wpbanglatools_i18n_digit', 10, 1);
add_filter('date_i18n', 'wpbanglatools_i18n_date',10,2);
}
if(!function_exists('wpbanglatools_i18n_digit')):
function wpbanglatools_i18n_digit($en_number){
$en_digits = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
$bn_digits = array('০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯');
$en_number = str_replace($en_digits, $bn_digits, $en_number);
var gulp = require('gulp'),
less = require('gulp-less'),
rename = require('gulp-rename'),
minifyCss = require('gulp-minify-css'),
watch = require('gulp-watch');
var templatedir = "D:/xampp/htdocs/joomla3/administrator/templates/poweradmin";
//The standalone rating form function is used to show the rating form using direct function call from theme or other plugin
//Make sure you are in wordpress loop , to know more about loop please visit here https://codex.wordpress.org/The_Loop
if(function_exists('standalonePostingRatingSystem')):
global $post;
$formid = 1;
$postid = $post->ID; //or write the post id
$rating = standalonePostingRatingSystem($formid, $postid, 'basic', true);
echo '<div class="mycustom_class_name">'.$rating.'</div>';
endif;
@manchumahara
manchumahara / gist:83829ebb2017440d874c
Created January 11, 2016 18:02
CBX Rating & Review - Showing avg rating for post id (or multiple id) http://wpboxr.com/cbx-multi-criteria-rating-review-system-documentation
//write this code in wordoress loop, if you don't understand what is loop in wordpress then please see it here https://codex.wordpress.org/The_Loop
if(function_exists('standaloneSinglePostRatingSummary')):
global $post; //if you are using this outside of wordpress loop then comment this
$form_id = 1; //asign form id as you need.
$post_id = $post->ID; //if you are using this outside of wordpress loop then set the post id as it need , example $post_id = your post id here ;
$option = array(
'form_id' => array($form_id),
'post_id' => array($post_id)
@manchumahara
manchumahara / gist:dd1916e4c674d7c23286
Created January 11, 2016 18:20
CBX Rating & Review - order by avg rating using meta key for any form id http://wpboxr.com/cbx-multi-criteria-rating-review-system-documentation
$form_id = 5; //suppose we want to sort woocommerce products with avg rating using custom query
$args = array(
'post_type' => 'product',
'orderby' => 'meta_value_num',
'meta_key' => 'cbrating'.$form_id
);
$query = new WP_Query( $args );
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
.idea/workspace.xml
<?xml version="1.0" encoding="utf-8"?>
<form>
<fieldset name="general">
<field name="id" type="hidden" class="readonly" size="10" default="0" readonly="true"/>
<field name="tagline" type="text" class="inputbox input-large-text"
label="COM_XXX_PROFILE_FIELD_TAGLINE_LABEL"
description="COM_XXX_PROFILE_FIELD_TAGLINE_DESC"
size="255"
default=""/>
</fieldset>