Skip to content

Commit 2aa47d0

Browse files
committed
Release v1.1.5.3
1 parent 2f1947e commit 2aa47d0

File tree

6 files changed

+80
-4
lines changed

6 files changed

+80
-4
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"helpers/image_helper.php",
3636
"helpers/ip_helper.php",
3737
"helpers/assets_helper.php",
38+
"helpers/chart_render.php",
3839
"helpers/array_helper.php",
3940
"helpers/debug_helper.php",
4041
"helpers/facebook_helper.php",

helpers/chart_render.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
/**
3+
* Project codeigniter-basic-helper
4+
* Created by PhpStorm
5+
* User: 713uk13m <dev@nguyenanhung.com>
6+
* Copyright: 713uk13m <dev@nguyenanhung.com>
7+
* Date: 30/07/2022
8+
* Time: 01:05
9+
*/
10+
if (!function_exists('bear_framework_default_get_data_chart')) {
11+
function bear_framework_default_get_data_chart($item_list, $valueGet, $total)
12+
{
13+
return (new \nguyenanhung\CodeIgniter\BasicHelper\ChartRender())->get_data_chart($item_list, $valueGet, $total);
14+
}
15+
}
16+
17+
if (!function_exists('bear_framework_default_get_data_chart_report')) {
18+
function bear_framework_default_get_data_chart_report($item_list, $valueGet)
19+
{
20+
return (new \nguyenanhung\CodeIgniter\BasicHelper\ChartRender())->get_data_chart_report($item_list, $valueGet);
21+
}
22+
}

helpers/html_helper.php

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function stripHtmlTag($str)
112112
*
113113
* @param $str
114114
* @param $tags
115-
* @param bool $stripContent
115+
* @param bool $stripContent
116116
*
117117
* @return string|string[]|null
118118
* @author : 713uk13m <dev@nguyenanhung.com>
@@ -166,3 +166,30 @@ function tracking_google_analytics($analytics_id = '', $analytics_mode = 'auto')
166166
return trim($html);
167167
}
168168
}
169+
if (!function_exists('tracking_google_gtag_analytics_default')) {
170+
/**
171+
* Function tracking_google_gtag_analytics_default
172+
*
173+
* @param string $ID
174+
*
175+
* @return string
176+
* @author : 713uk13m <dev@nguyenanhung.com>
177+
* @copyright: 713uk13m <dev@nguyenanhung.com>
178+
* @time : 30/07/2022 15:59
179+
*/
180+
function tracking_google_gtag_analytics_default($ID = '')
181+
{
182+
$html = "<!-- Global site tag (gtag.js) - Google Analytics -->" . PHP_EOL;
183+
$html .= "<script async src='https://www.googletagmanager.com/gtag/js?id=" . trim($ID) . "'></script>" . PHP_EOL;
184+
$html .= "<script>
185+
window.dataLayer = window.dataLayer || [];
186+
function gtag() {
187+
dataLayer.push(arguments);
188+
}
189+
gtag('js', new Date());
190+
gtag('config', '" . trim($ID) . "');
191+
</script>";
192+
193+
return $html;
194+
}
195+
}

helpers/image_helper.php

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ function bear_framework_image_url($input = '', $server = '', $base = 'live')
107107
if (trim(mb_substr($images_url, 0, 12)) == 'crawler-news') {
108108
$images_url = trim('uploads/' . $images_url);
109109
}
110+
$images_url = str_replace('upload-vcms/news/news/', 'upload-vcms/news/', $images_url);
111+
$images_url = str_replace('upload-vcms/mheath/mheath/', 'upload-vcms/mheath/', $images_url);
110112

111113
return config_item('static_url') . $images_url;
112114
}
@@ -116,6 +118,24 @@ function bear_framework_image_url($input = '', $server = '', $base = 'live')
116118
return $images_url;
117119
}
118120
}
121+
if (!function_exists('bear_framework_create_image_thumbnail')) {
122+
/**
123+
* Function bear_framework_create_image_thumbnail
124+
*
125+
* @param $url
126+
* @param $width
127+
* @param $height
128+
*
129+
* @return mixed|string|null
130+
* @author : 713uk13m <dev@nguyenanhung.com>
131+
* @copyright: 713uk13m <dev@nguyenanhung.com>
132+
* @time : 15/06/2022 03:06
133+
*/
134+
function bear_framework_create_image_thumbnail($url = '', $width = 100, $height = 100)
135+
{
136+
return create_image_thumbnail($url, $width, $height);
137+
}
138+
}
119139
if (!function_exists('create_image_thumbnail')) {
120140
/**
121141
* Function create_image_thumbnail
@@ -133,4 +153,4 @@ function create_image_thumbnail($url = '', $width = 100, $height = 100)
133153
{
134154
return nguyenanhung\CodeIgniter\BasicHelper\ImageHelper::createThumbnail($url, $width, $height);
135155
}
136-
}
156+
}

helpers/request_helper.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,9 @@ function sendSimpleGetRequest($url = '', $data = array(), $method = 'GET')
5050
return $response;
5151
}
5252
}
53+
if (!function_exists('sendSimpleRestfulExecuteRequest')) {
54+
function sendSimpleRestfulExecuteRequest($url, $type, $data = "", $header = null)
55+
{
56+
return \nguyenanhung\CodeIgniter\BasicHelper\SimpleRestful::execute($url, $type, $data, $header);
57+
}
58+
}

src/Environment.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
*/
2020
interface Environment
2121
{
22-
const VERSION = '1.1.5.2';
23-
const LAST_MODIFIED = '2022-07-21';
22+
const VERSION = '1.1.5.3';
23+
const LAST_MODIFIED = '2022-07-30';
2424
const AUTHOR_NAME = 'Hung Nguyen';
2525
const AUTHOR_EMAIL = 'dev@nguyenanhung.com';
2626
const PROJECT_NAME = 'CodeIgniter - Basic Helper';

0 commit comments

Comments
 (0)