-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mod_metatags.php
84 lines (71 loc) · 2.49 KB
/
mod_metatags.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
/**
* @package Module for Joomla!
* @subpackage mod_metatags
* @version 4.3.3
* @author Alexon Balangue
* @copyright (C) 2012-2020 Alexonbstudio. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die;
#USING
use Joomla\CMS\Helper\ModuleHelper;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Document;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Language;
use Joomla\CMS\User;
#use Joomla\Component\Finder\Administrator\Indexer\Query;
#use Joomla\Utilities\ArrayHelper;
#GET LIBS
$apps = Factory::getApplication();
$docs = Factory::getDocument();
$configs = Factory::getConfig();
$langs = Factory::getLanguage();
#$langs = Factory::getLanguage(); #LanguageHelper::exists($lang)
$users = Factory::getUser();
$roots = Uri::root();
$base = Uri::base();
$current = Uri::current();
# Get function
$docs->setGenerator(null);//remove generator ->getGenerator()
$sitename = $configs->get('sitename');
$auteur = $apps->get('MetaAuthor');
$title = htmlspecialchars($docs->getTitle(), ENT_COMPAT, 'UTF-8');
$Keyword = htmlspecialchars($configs->get('MetaKeys'), ENT_COMPAT, 'UTF-8');
$desciption = htmlspecialchars($docs->getDescription(), ENT_COMPAT, 'UTF-8');
$language = $langs->getTag(); #$language_FULL = $docs->language;
# Get params XML
$robots = $params->get('robots');
$logo = $params->get('logo');
#Twitter Card
$twitter_card = $params->get('twitter-card');
$twitter_user = $params->get('twitter-user');
# Open Graph
$fb_admins = $params->get('fb-admins');
$fb_app_id = $params->get('fb-app-id');
$fb_profils_id = $params->get('fb-profils-id');
$og_type = $params->get('og-type');
# Analystic & Marketing
$g_tagmanger = $params->get('g-tagmanger');
$g_analytics = $params->get('g-analytics');
$g_adsense = $params->get('g-adsense');
$yx_analytics = $params->get('yx-analytics');
$m_33across = $params->get('m-33across');
$m_awin = $params->get('m-awin');
$m_uiz = $params->get('m-uiz');
$m_quantcast = $params->get('m-quantcast');
# Shares buttin
$s_shareaholic = $params->get('m-shareaholic');
$s_addthis = $params->get('s-addthis');
# Add more script
$head_script_frontend = $params->get('head-script-frontend');
$footer_script_frontend = $params->get('footer-script-frontend');
# Chatbot
$crisp = $params->get('crisp');
$tidio = $params->get('tidio');
# Json-LD
$jld_type = $params->get('jld-type');
$$jld_socialURL = $params->get('jld-socialURL');
require ModuleHelper::getLayoutPath('mod_metatags', $params->get('layout', 'default'));