Trang chủ
Các bài mới
Latest activity
Biên tập viên
Diễn Đàn
Bài viết mới
Tìm kiếm diễn đàn
Tin Mới
Bài viết mới
New resources
Bài đăng tiểu sử mới
Hoạt động mới nhất
Resources
Latest reviews
Search resources
Thành Viên
Khách truy cập hiện tại
Bài mới trên trang cá nhân
Tìm kiếm bài đăng trong trang cá nhân
Tool
SMTool - Công cụ đăng bài tự động Facebook
50 SEO Tools
Photoshop online
Facebook Video Down
Cầu nguyện Genshin
Biolink
Genshin map
Đăng nhập
Đăng ký
Mới
Tìm kiếm
Tìm kiếm
Chỉ tìm trong tiêu đề
bởi:
Bài viết mới
Tìm kiếm diễn đàn
Menu
Đăng nhập
Đăng ký
Install the app
Install
28/06 cập nhật đăng ký đăng nhập qua Google & Facebook
Diễn Đàn
Thủ thuật
Thủ thuật internet
Search Block for 66biolinks - Search block
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Nội dung
<blockquote data-quote="TenHoshi" data-source="post: 15380" data-attributes="member: 1"><p>This is not a built-in utility, more changes are needed on the source code</p><p></p><p>Step 1: Go to: [ICODE]/app/controllers/BiolinkBlockAjax.php[/ICODE]</p><p>Line 195 var <strong>$individual_blocks</strong> add new <strong>'search'</strong> to var</p><p></p><p style="text-align: center"><img src="https://upanh.nhatkythuthuat.com/images/2022/07/08/image.png" alt="" class="fr-fic fr-dii fr-draggable " style="width: 650px" /></p><p></p><p>Find fuction have "<strong>create_biolink_</strong>" to the last function Add new private function <strong>create_biolink_search</strong>()</p><p></p><p style="text-align: center"><img src="https://upanh.nhatkythuthuat.com/images/2022/07/08/imagef4d945c6b368c5bc.png" alt="" class="fr-fic fr-dii fr-draggable " style="width: 650px" /></p><p></p><p>[CODE=php]</p><p>private function create_biolink_search() {</p><p> $_POST['link_id'] = (int) $_POST['link_id'];</p><p></p><p> if(!$link = db()->where('link_id', $_POST['link_id'])->where('user_id', $this->user->user_id)->getOne('links')) {</p><p> die();</p><p> }</p><p></p><p> $type = 'search';</p><p> $settings = json_encode([</p><p> </p><p> 'display_countries' => [],</p><p> 'display_devices' => [],</p><p> 'display_languages' => [],</p><p> 'display_operating_systems' => [],</p><p> ]);</p><p></p><p> </p><p> db()->insert('biolinks_blocks', [</p><p> 'user_id' => $this->user->user_id,</p><p> 'link_id' => $_POST['link_id'],</p><p> 'type' => $type,</p><p> 'location_url' => null,</p><p> 'settings' => $settings,</p><p> 'order' => $this->total_biolink_blocks,</p><p> 'datetime' => \Altum\Date::$date,</p><p> ]);</p><p></p><p> </p><p> \Altum\Cache::$adapter->deleteItem('link?link_id=' . $_POST['link_id']);</p><p></p><p> Response::json('', 'success', ['url' => url('link/' . $_POST['link_id'] . '?tab=links')]);</p><p> }[/CODE]</p><p></p><p>Step 2: Go to [ICODE]/plugins/ultimate-blocks/ultimate_blocks.php[/ICODE] add search</p><p></p><p style="text-align: center"><img src="https://upanh.nhatkythuthuat.com/images/2022/07/08/imagee89796f1c915cf71.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p>[CODE=php]'search' => [</p><p> 'type' => 'ultimate',</p><p> 'icon' => 'fas fa-search',</p><p> 'color' => '#00ce18',</p><p> 'has_statistics' => false,</p><p> 'display_dynamic_name' => false,</p><p> ],[/CODE]</p><p></p><p>Step 3 Go to: [ICODE]/plugins/ultimate-blocks/views/l/biolink_blocks/[/ICODE] add [ICODE]search.php[/ICODE]</p><p></p><p>[CODE=php]</p><p><?php defined('ALTUMCODE') || die() ?></p><p></p><p><div id="<?= 'biolink_block_id_' . $data->link->biolink_block_id ?>" data-biolink-block-id="<?= $data->link->biolink_block_id ?>" class="col-12 my-2"></p><p> <input id="txt_search" type="text" class="form-control" placeholder="<?= l('create_biolink_search_modal.input') ?>"></p><p></div></p><p><?php ob_start() ?></p><p><script></p><p> $('#txt_search').bind('keyup keydown paste', function() {</p><p></p><p> var thisBlock=$(this).closest('div[data-biolink-block-id]').data('biolink-block-id');</p><p> </p><p> var blocks = $('main[id="links"] div[data-biolink-block-id]');</p><p></p><p> var key = $(this).val();</p><p></p><p> if (key == '') {</p><p> $.each(blocks, function(k, v) {</p><p></p><p> $(v).css('display', 'block');</p><p></p><p></p><p> });</p><p> } else {</p><p> $.each(blocks, function(k, v) {</p><p></p><p> if (!removeAccents($(v).text().toLowerCase()).includes(removeAccents(key.toLowerCase())) && $(v).data('biolink-block-id') != thisBlock)</p><p> $(v).css('display', 'none');</p><p></p><p> });</p><p></p><p> }</p><p></p><p> function removeAccents(str) {</p><p> var AccentsMap = [</p><p> "aàảãáạăằẳẵắặâầẩẫấậ",</p><p> "AÀẢÃÁẠĂẰẲẴẮẶÂẦẨẪẤẬ",</p><p> "dđ", "DĐ",</p><p> "eèẻẽéẹêềểễếệ",</p><p> "EÈẺẼÉẸÊỀỂỄẾỆ",</p><p> "iìỉĩíị",</p><p> "IÌỈĨÍỊ",</p><p> "oòỏõóọôồổỗốộơờởỡớợ",</p><p> "OÒỎÕÓỌÔỒỔỖỐỘƠỜỞỠỚỢ",</p><p> "uùủũúụưừửữứự",</p><p> "UÙỦŨÚỤƯỪỬỮỨỰ",</p><p> "yỳỷỹýỵ",</p><p> "YỲỶỸÝỴ"</p><p> ];</p><p> for (var i = 0; i < AccentsMap.length; i++) {</p><p> var re = new RegExp('[' + AccentsMap[i].substr(1) + ']', 'g');</p><p> var char = AccentsMap[i][0];</p><p> str = str.replace(re, char);</p><p> }</p><p> return str;</p><p> }</p><p> });</p><p></script></p><p><?php \Altum\Event::add_content(ob_get_clean(), 'javascript') ?>[/CODE]</p><p></p><p>Step 4 Go to: [ICODE]/themes/altum/views/link/settings/biolink_blocks/[/ICODE] add search folder</p><p></p><p>File: [ICODE]search_create_modal.php[/ICODE]</p><p></p><p>[CODE=php]<?php defined('ALTUMCODE') || die() ?></p><p></p><p><div class="modal fade" id="create_biolink_search" tabindex="-1" role="dialog" aria-hidden="true"></p><p> <div class="modal-dialog modal-dialog-centered" role="document"></p><p> <div class="modal-content"></p><p></p><p> <div class="modal-header"></p><p> <button type="button" data-toggle="modal" data-target="#biolink_link_create_modal" data-dismiss="modal" class="btn btn-sm btn-link"><i class="fa fa-fw fa-chevron-circle-left text-muted"></i></button></p><p> <h5 class="modal-title"><?= l('create_biolink_search_modal.header') ?></h5></p><p> <button type="button" class="close" data-dismiss="modal" aria-label="<?= l('global.close') ?>"></p><p> <span aria-hidden="true">&times;</span></p><p> </button></p><p> </div></p><p></p><p> <p class="text-muted modal-subheader"><?= l('create_biolink_search_modal.subheader') ?></p></p><p></p><p> <div class="modal-body"></p><p> <form name="create_biolink_search" method="post" role="form"></p><p> <input type="hidden" name="token" value="<?= \Altum\Middlewares\Csrf::get() ?>" required="required" /></p><p> <input type="hidden" name="request_type" value="create" /></p><p> <input type="hidden" name="link_id" value="<?= $data->link->link_id ?>" /></p><p> <input type="hidden" name="block_type" value="search" /></p><p></p><p> <div class="notification-container"></div></p><p></p><p> <div class="text-center mt-4"></p><p> <button type="submit" name="submit" class="btn btn-block btn-primary"><?= l('global.submit') ?></button></p><p> </div></p><p> </form></p><p> </div></p><p></p><p> </div></p><p> </div></p><p></div></p><p>[/CODE]</p><p></p><p>File: [ICODE]search_update_form.php[/ICODE]</p><p></p><p>[CODE=php]<?php defined('ALTUMCODE') || die() ?></p><p></p><p><form name="update_biolink_" method="post" role="form"></p><p> <input type="hidden" name="token" value="<?= \Altum\Middlewares\Csrf::get() ?>" required="required" /></p><p> <input type="hidden" name="request_type" value="update" /></p><p> <input type="hidden" name="block_type" value="search" /></p><p> <input type="hidden" name="biolink_block_id" value="<?= $row->biolink_block_id ?>" /></p><p></p><p> <div class="notification-container"></div></p><p></p><p> <button class="btn btn-block btn-gray-300 my-4" type="button" data-toggle="collapse" data-target="#<?= 'display_settings_container_' . $row->biolink_block_id ?>" aria-expanded="false" aria-controls="<?= 'display_settings_container_' . $row->biolink_block_id ?>"></p><p> <?= l('create_biolink_link_modal.display_settings_header') ?></p><p> </button></p><p></p><p> <div class="collapse" id="<?= 'display_settings_container_' . $row->biolink_block_id ?>"></p><p> <div <?= $this->user->plan_settings->temporary_url_is_enabled ? null : 'data-toggle="tooltip" title="' . l('global.info_message.plan_feature_no_access') . '"' ?>></p><p> <div class="<?= $this->user->plan_settings->temporary_url_is_enabled ? null : 'container-disabled' ?>"></p><p> <div class="custom-control custom-switch mb-3"></p><p> <input</p><p> id="<?= 'link_schedule_' . $row->biolink_block_id ?>"</p><p> name="schedule" type="checkbox"</p><p> class="custom-control-input"</p><p> <?= !empty($row->start_date) && !empty($row->end_date) ? 'checked="checked"' : null ?></p><p> <?= $this->user->plan_settings->temporary_url_is_enabled ? null : 'disabled="disabled"' ?></p><p> ></p><p> <label class="custom-control-label" for="<?= 'link_schedule_' . $row->biolink_block_id ?>"><?= l('link.settings.schedule') ?></label></p><p> <small class="form-text text-muted"><?= l('link.settings.schedule_help') ?></small></p><p> </div></p><p> </div></p><p> </div></p><p></p><p> <div class="mt-3 schedule_container" style="display: none;"></p><p> <div <?= $this->user->plan_settings->temporary_url_is_enabled ? null : 'data-toggle="tooltip" title="' . l('global.info_message.plan_feature_no_access') . '"' ?>></p><p> <div class="<?= $this->user->plan_settings->temporary_url_is_enabled ? null : 'container-disabled' ?>"></p><p> <div class="row"></p><p> <div class="col"></p><p> <div class="form-group"></p><p> <label for="<?= 'link_start_date_' . $row->biolink_block_id ?>"><i class="fa fa-fw fa-clock fa-sm text-muted mr-1"></i> <?= l('link.settings.start_date') ?></label></p><p> <input</p><p> id="<?= 'link_start_date_' . $row->biolink_block_id ?>"</p><p> type="text"</p><p> class="form-control"</p><p> name="start_date"</p><p> value="<?= \Altum\Date::get($row->start_date, 1) ?>"</p><p> placeholder="<?= l('link.settings.start_date') ?>"</p><p> autocomplete="off"</p><p> data-daterangepicker</p><p> ></p><p> </div></p><p> </div></p><p></p><p> <div class="col"></p><p> <div class="form-group"></p><p> <label for="<?= 'link_end_date_' . $row->biolink_block_id ?>"><i class="fa fa-fw fa-clock fa-sm text-muted mr-1"></i> <?= l('link.settings.end_date') ?></label></p><p> <input</p><p> id="<?= 'link_end_date_' . $row->biolink_block_id ?>"</p><p> type="text"</p><p> class="form-control"</p><p> name="end_date"</p><p> value="<?= \Altum\Date::get($row->end_date, 1) ?>"</p><p> placeholder="<?= l('link.settings.end_date') ?>"</p><p> autocomplete="off"</p><p> data-daterangepicker</p><p> ></p><p> </div></p><p> </div></p><p> </div></p><p> </div></p><p> </div></p><p> </div></p><p></p><p> <div class="form-group"></p><p> <label for="<?= 'link_display_countries_' . $row->biolink_block_id ?>"><i class="fa fa-fw fa-globe fa-sm text-muted mr-1"></i> <?= l('create_biolink_link_modal.input.display_countries') ?></label></p><p> <select id="<?= 'link_display_countries_' . $row->biolink_block_id ?>" name="display_countries[]" class="form-control" multiple="multiple"></p><p> <?php foreach(get_countries_array() as $country => $country_name): ?></p><p> <option value="<?= $country ?>" <?= in_array($country, $row->settings->display_countries ?? []) ? 'selected="selected"' : null ?>><?= $country_name ?></option></p><p> <?php endforeach ?></p><p> </select></p><p> <small class="form-text text-muted"><?= l('create_biolink_link_modal.input.display_countries_help') ?></small></p><p> </div></p><p></p><p> <div class="form-group"></p><p> <label for="<?= 'link_display_devices_' . $row->biolink_block_id ?>"><i class="fa fa-fw fa-laptop fa-sm text-muted mr-1"></i> <?= l('create_biolink_link_modal.input.display_devices') ?></label></p><p> <select id="<?= 'link_display_devices_' . $row->biolink_block_id ?>" name="display_devices[]" class="form-control" multiple="multiple"></p><p> <?php foreach(['desktop', 'tablet', 'mobile'] as $device_type): ?></p><p> <option value="<?= $device_type ?>" <?= in_array($device_type, $row->settings->display_devices ?? []) ? 'selected="selected"' : null ?>><?= l('global.device.' . $device_type) ?></option></p><p> <?php endforeach ?></p><p> </select></p><p> <small class="form-text text-muted"><?= l('create_biolink_link_modal.input.display_devices_help') ?></small></p><p> </div></p><p></p><p> <div class="form-group"></p><p> <label for="<?= 'link_display_languages_' . $row->biolink_block_id ?>"><i class="fa fa-fw fa-language fa-sm text-muted mr-1"></i> <?= l('create_biolink_link_modal.input.display_languages') ?></label></p><p> <select id="<?= 'link_display_languages_' . $row->biolink_block_id ?>" name="display_languages[]" class="form-control" multiple="multiple"></p><p> <?php foreach(get_locale_languages_array() as $locale => $language): ?></p><p> <option value="<?= $locale ?>" <?= in_array($locale, $row->settings->display_languages ?? []) ? 'selected="selected"' : null ?>><?= $language ?></option></p><p> <?php endforeach ?></p><p> </select></p><p> <small class="form-text text-muted"><?= l('create_biolink_link_modal.input.display_languages_help') ?></small></p><p> </div></p><p></p><p> <div class="form-group"></p><p> <label for="<?= 'link_display_operating_systems_' . $row->biolink_block_id ?>"><i class="fa fa-fw fa-window-restore fa-sm text-muted mr-1"></i> <?= l('create_biolink_link_modal.input.display_operating_systems') ?></label></p><p> <select id="<?= 'link_display_operating_systems_' . $row->biolink_block_id ?>" name="display_operating_systems[]" class="form-control" multiple="multiple"></p><p> <?php foreach(['iOS', 'Android', 'Windows', 'OS X', 'Linux', 'Ubuntu', 'Chrome OS'] as $os_name): ?></p><p> <option value="<?= $os_name ?>" <?= in_array($os_name, $row->settings->display_operating_systems ?? []) ? 'selected="selected"' : null ?>><?= $os_name ?></option></p><p> <?php endforeach ?></p><p> </select></p><p> <small class="form-text text-muted"><?= l('create_biolink_link_modal.input.display_operating_systems_help') ?></small></p><p> </div></p><p> </div></p><p></p><p></p><p> <div class="mt-4"></p><p> <button type="submit" name="submit" class="btn btn-block btn-primary"><?= l('global.update') ?></button></p><p> </div></p><p></form></p><p>[/CODE]</p><p></p><p>Step 5 Go to:[ICODE] /app/helpers/Link.php[/ICODE] on function get_biolink_link add search case</p><p></p><p style="text-align: center"><img src="https://upanh.nhatkythuthuat.com/images/2022/07/08/imagee526c2047c201ca0.png" alt="" class="fr-fic fr-dii fr-draggable " style="width: 650px" /></p><p></p><p>[CODE=php]case 'search':</p><p></p><p> $view_path = \Altum\Plugin::get('ultimate-blocks')->path . 'views/l/biolink_blocks/' . $link->type . '.php';</p><p></p><p> break;[/CODE]</p><p></p><p>Step 6 Go to /app/languages/english#en#active.php</p><p></p><p>[CODE]'create_biolink_search_modal.header' => 'Add search',</p><p>'create_biolink_search_modal.subheader' => 'Add a block search',</p><p>'create_biolink_search_modal.input' => 'Type to search',[/CODE]</p><p></p><p>Done.</p><p></p><p style="text-align: center"><img src="https://upanh.nhatkythuthuat.com/images/2022/07/08/imageb2c2658762640ec8.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p></blockquote><p></p>
[QUOTE="TenHoshi, post: 15380, member: 1"] This is not a built-in utility, more changes are needed on the source code Step 1: Go to: [ICODE]/app/controllers/BiolinkBlockAjax.php[/ICODE] Line 195 var [B]$individual_blocks[/B] add new [B]'search'[/B] to var [CENTER][IMG width="650px"]https://upanh.nhatkythuthuat.com/images/2022/07/08/image.png[/IMG][/CENTER] Find fuction have "[B]create_biolink_[/B]" to the last function Add new private function [B]create_biolink_search[/B]() [CENTER][IMG width="650px"]https://upanh.nhatkythuthuat.com/images/2022/07/08/imagef4d945c6b368c5bc.png[/IMG][/CENTER] [CODE=php] private function create_biolink_search() { $_POST['link_id'] = (int) $_POST['link_id']; if(!$link = db()->where('link_id', $_POST['link_id'])->where('user_id', $this->user->user_id)->getOne('links')) { die(); } $type = 'search'; $settings = json_encode([ 'display_countries' => [], 'display_devices' => [], 'display_languages' => [], 'display_operating_systems' => [], ]); db()->insert('biolinks_blocks', [ 'user_id' => $this->user->user_id, 'link_id' => $_POST['link_id'], 'type' => $type, 'location_url' => null, 'settings' => $settings, 'order' => $this->total_biolink_blocks, 'datetime' => \Altum\Date::$date, ]); \Altum\Cache::$adapter->deleteItem('link?link_id=' . $_POST['link_id']); Response::json('', 'success', ['url' => url('link/' . $_POST['link_id'] . '?tab=links')]); }[/CODE] Step 2: Go to [ICODE]/plugins/ultimate-blocks/ultimate_blocks.php[/ICODE] add search [CENTER][IMG]https://upanh.nhatkythuthuat.com/images/2022/07/08/imagee89796f1c915cf71.png[/IMG][/CENTER] [CODE=php]'search' => [ 'type' => 'ultimate', 'icon' => 'fas fa-search', 'color' => '#00ce18', 'has_statistics' => false, 'display_dynamic_name' => false, ],[/CODE] Step 3 Go to: [ICODE]/plugins/ultimate-blocks/views/l/biolink_blocks/[/ICODE] add [ICODE]search.php[/ICODE] [CODE=php] <?php defined('ALTUMCODE') || die() ?> <div id="<?= 'biolink_block_id_' . $data->link->biolink_block_id ?>" data-biolink-block-id="<?= $data->link->biolink_block_id ?>" class="col-12 my-2"> <input id="txt_search" type="text" class="form-control" placeholder="<?= l('create_biolink_search_modal.input') ?>"> </div> <?php ob_start() ?> <script> $('#txt_search').bind('keyup keydown paste', function() { var thisBlock=$(this).closest('div[data-biolink-block-id]').data('biolink-block-id'); var blocks = $('main[id="links"] div[data-biolink-block-id]'); var key = $(this).val(); if (key == '') { $.each(blocks, function(k, v) { $(v).css('display', 'block'); }); } else { $.each(blocks, function(k, v) { if (!removeAccents($(v).text().toLowerCase()).includes(removeAccents(key.toLowerCase())) && $(v).data('biolink-block-id') != thisBlock) $(v).css('display', 'none'); }); } function removeAccents(str) { var AccentsMap = [ "aàảãáạăằẳẵắặâầẩẫấậ", "AÀẢÃÁẠĂẰẲẴẮẶÂẦẨẪẤẬ", "dđ", "DĐ", "eèẻẽéẹêềểễếệ", "EÈẺẼÉẸÊỀỂỄẾỆ", "iìỉĩíị", "IÌỈĨÍỊ", "oòỏõóọôồổỗốộơờởỡớợ", "OÒỎÕÓỌÔỒỔỖỐỘƠỜỞỠỚỢ", "uùủũúụưừửữứự", "UÙỦŨÚỤƯỪỬỮỨỰ", "yỳỷỹýỵ", "YỲỶỸÝỴ" ]; for (var i = 0; i < AccentsMap.length; i++) { var re = new RegExp('[' + AccentsMap[i].substr(1) + ']', 'g'); var char = AccentsMap[i][0]; str = str.replace(re, char); } return str; } }); </script> <?php \Altum\Event::add_content(ob_get_clean(), 'javascript') ?>[/CODE] Step 4 Go to: [ICODE]/themes/altum/views/link/settings/biolink_blocks/[/ICODE] add search folder File: [ICODE]search_create_modal.php[/ICODE] [CODE=php]<?php defined('ALTUMCODE') || die() ?> <div class="modal fade" id="create_biolink_search" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" data-toggle="modal" data-target="#biolink_link_create_modal" data-dismiss="modal" class="btn btn-sm btn-link"><i class="fa fa-fw fa-chevron-circle-left text-muted"></i></button> <h5 class="modal-title"><?= l('create_biolink_search_modal.header') ?></h5> <button type="button" class="close" data-dismiss="modal" aria-label="<?= l('global.close') ?>"> <span aria-hidden="true">×</span> </button> </div> <p class="text-muted modal-subheader"><?= l('create_biolink_search_modal.subheader') ?></p> <div class="modal-body"> <form name="create_biolink_search" method="post" role="form"> <input type="hidden" name="token" value="<?= \Altum\Middlewares\Csrf::get() ?>" required="required" /> <input type="hidden" name="request_type" value="create" /> <input type="hidden" name="link_id" value="<?= $data->link->link_id ?>" /> <input type="hidden" name="block_type" value="search" /> <div class="notification-container"></div> <div class="text-center mt-4"> <button type="submit" name="submit" class="btn btn-block btn-primary"><?= l('global.submit') ?></button> </div> </form> </div> </div> </div> </div> [/CODE] File: [ICODE]search_update_form.php[/ICODE] [CODE=php]<?php defined('ALTUMCODE') || die() ?> <form name="update_biolink_" method="post" role="form"> <input type="hidden" name="token" value="<?= \Altum\Middlewares\Csrf::get() ?>" required="required" /> <input type="hidden" name="request_type" value="update" /> <input type="hidden" name="block_type" value="search" /> <input type="hidden" name="biolink_block_id" value="<?= $row->biolink_block_id ?>" /> <div class="notification-container"></div> <button class="btn btn-block btn-gray-300 my-4" type="button" data-toggle="collapse" data-target="#<?= 'display_settings_container_' . $row->biolink_block_id ?>" aria-expanded="false" aria-controls="<?= 'display_settings_container_' . $row->biolink_block_id ?>"> <?= l('create_biolink_link_modal.display_settings_header') ?> </button> <div class="collapse" id="<?= 'display_settings_container_' . $row->biolink_block_id ?>"> <div <?= $this->user->plan_settings->temporary_url_is_enabled ? null : 'data-toggle="tooltip" title="' . l('global.info_message.plan_feature_no_access') . '"' ?>> <div class="<?= $this->user->plan_settings->temporary_url_is_enabled ? null : 'container-disabled' ?>"> <div class="custom-control custom-switch mb-3"> <input id="<?= 'link_schedule_' . $row->biolink_block_id ?>" name="schedule" type="checkbox" class="custom-control-input" <?= !empty($row->start_date) && !empty($row->end_date) ? 'checked="checked"' : null ?> <?= $this->user->plan_settings->temporary_url_is_enabled ? null : 'disabled="disabled"' ?> > <label class="custom-control-label" for="<?= 'link_schedule_' . $row->biolink_block_id ?>"><?= l('link.settings.schedule') ?></label> <small class="form-text text-muted"><?= l('link.settings.schedule_help') ?></small> </div> </div> </div> <div class="mt-3 schedule_container" style="display: none;"> <div <?= $this->user->plan_settings->temporary_url_is_enabled ? null : 'data-toggle="tooltip" title="' . l('global.info_message.plan_feature_no_access') . '"' ?>> <div class="<?= $this->user->plan_settings->temporary_url_is_enabled ? null : 'container-disabled' ?>"> <div class="row"> <div class="col"> <div class="form-group"> <label for="<?= 'link_start_date_' . $row->biolink_block_id ?>"><i class="fa fa-fw fa-clock fa-sm text-muted mr-1"></i> <?= l('link.settings.start_date') ?></label> <input id="<?= 'link_start_date_' . $row->biolink_block_id ?>" type="text" class="form-control" name="start_date" value="<?= \Altum\Date::get($row->start_date, 1) ?>" placeholder="<?= l('link.settings.start_date') ?>" autocomplete="off" data-daterangepicker > </div> </div> <div class="col"> <div class="form-group"> <label for="<?= 'link_end_date_' . $row->biolink_block_id ?>"><i class="fa fa-fw fa-clock fa-sm text-muted mr-1"></i> <?= l('link.settings.end_date') ?></label> <input id="<?= 'link_end_date_' . $row->biolink_block_id ?>" type="text" class="form-control" name="end_date" value="<?= \Altum\Date::get($row->end_date, 1) ?>" placeholder="<?= l('link.settings.end_date') ?>" autocomplete="off" data-daterangepicker > </div> </div> </div> </div> </div> </div> <div class="form-group"> <label for="<?= 'link_display_countries_' . $row->biolink_block_id ?>"><i class="fa fa-fw fa-globe fa-sm text-muted mr-1"></i> <?= l('create_biolink_link_modal.input.display_countries') ?></label> <select id="<?= 'link_display_countries_' . $row->biolink_block_id ?>" name="display_countries[]" class="form-control" multiple="multiple"> <?php foreach(get_countries_array() as $country => $country_name): ?> <option value="<?= $country ?>" <?= in_array($country, $row->settings->display_countries ?? []) ? 'selected="selected"' : null ?>><?= $country_name ?></option> <?php endforeach ?> </select> <small class="form-text text-muted"><?= l('create_biolink_link_modal.input.display_countries_help') ?></small> </div> <div class="form-group"> <label for="<?= 'link_display_devices_' . $row->biolink_block_id ?>"><i class="fa fa-fw fa-laptop fa-sm text-muted mr-1"></i> <?= l('create_biolink_link_modal.input.display_devices') ?></label> <select id="<?= 'link_display_devices_' . $row->biolink_block_id ?>" name="display_devices[]" class="form-control" multiple="multiple"> <?php foreach(['desktop', 'tablet', 'mobile'] as $device_type): ?> <option value="<?= $device_type ?>" <?= in_array($device_type, $row->settings->display_devices ?? []) ? 'selected="selected"' : null ?>><?= l('global.device.' . $device_type) ?></option> <?php endforeach ?> </select> <small class="form-text text-muted"><?= l('create_biolink_link_modal.input.display_devices_help') ?></small> </div> <div class="form-group"> <label for="<?= 'link_display_languages_' . $row->biolink_block_id ?>"><i class="fa fa-fw fa-language fa-sm text-muted mr-1"></i> <?= l('create_biolink_link_modal.input.display_languages') ?></label> <select id="<?= 'link_display_languages_' . $row->biolink_block_id ?>" name="display_languages[]" class="form-control" multiple="multiple"> <?php foreach(get_locale_languages_array() as $locale => $language): ?> <option value="<?= $locale ?>" <?= in_array($locale, $row->settings->display_languages ?? []) ? 'selected="selected"' : null ?>><?= $language ?></option> <?php endforeach ?> </select> <small class="form-text text-muted"><?= l('create_biolink_link_modal.input.display_languages_help') ?></small> </div> <div class="form-group"> <label for="<?= 'link_display_operating_systems_' . $row->biolink_block_id ?>"><i class="fa fa-fw fa-window-restore fa-sm text-muted mr-1"></i> <?= l('create_biolink_link_modal.input.display_operating_systems') ?></label> <select id="<?= 'link_display_operating_systems_' . $row->biolink_block_id ?>" name="display_operating_systems[]" class="form-control" multiple="multiple"> <?php foreach(['iOS', 'Android', 'Windows', 'OS X', 'Linux', 'Ubuntu', 'Chrome OS'] as $os_name): ?> <option value="<?= $os_name ?>" <?= in_array($os_name, $row->settings->display_operating_systems ?? []) ? 'selected="selected"' : null ?>><?= $os_name ?></option> <?php endforeach ?> </select> <small class="form-text text-muted"><?= l('create_biolink_link_modal.input.display_operating_systems_help') ?></small> </div> </div> <div class="mt-4"> <button type="submit" name="submit" class="btn btn-block btn-primary"><?= l('global.update') ?></button> </div> </form> [/CODE] Step 5 Go to:[ICODE] /app/helpers/Link.php[/ICODE] on function get_biolink_link add search case [CENTER][IMG width="650px"]https://upanh.nhatkythuthuat.com/images/2022/07/08/imagee526c2047c201ca0.png[/IMG][/CENTER] [CODE=php]case 'search': $view_path = \Altum\Plugin::get('ultimate-blocks')->path . 'views/l/biolink_blocks/' . $link->type . '.php'; break;[/CODE] Step 6 Go to /app/languages/english#en#active.php [CODE]'create_biolink_search_modal.header' => 'Add search', 'create_biolink_search_modal.subheader' => 'Add a block search', 'create_biolink_search_modal.input' => 'Type to search',[/CODE] Done. [CENTER][IMG]https://upanh.nhatkythuthuat.com/images/2022/07/08/imageb2c2658762640ec8.png[/IMG][/CENTER] [/QUOTE]
Name
Xác nhận
Gửi đi
Diễn Đàn
Thủ thuật
Thủ thuật internet
Search Block for 66biolinks - Search block
Top