<?php
/**
* @version $Id: coolfeed.php 100 2012-04-14 17:42:51Z hide@address.com $
* @copyright JoomAvatar.com
* @author Nguyen Quang Trung
* @link http://joomavatar.com
* @license License GNU General Public License version 2 or later http://www.gnu.org/licenses/gpl-2.0.html
* @package Avatar Dream Framework Template
* @facebook http://www.facebook.com/pages/JoomAvatar/120705031368683
* @twitter https://twitter.com/#!/JoomAvatar
* @support http://joomavatar.com/forum/
*/
// no direct access
defined('_JEXEC') or die;
require_once dirname(dirname(__FILE__)).DS.'helpers/params.php';
$seo = PlgAvatarParams::getParams();
?>
<script type="text/javascript">
jQuery.noConflict();
(function($)
{
function toggleAvatarTools()
{
var box = $('#avatar-tool-box');
var display = box.css('display');
console.log(display);
if (display == 'none') {
box.css('margin', 'auto').slideToggle();
} else {
box.slideToggle(function(){
$(this).css('margin-left', '-9999px');
});
}
$('#avatar-tool-overlay').fadeToggle();
}
function openAvatarTools(){
var box = $('#avatar-tool-box');
box.slideDown().css('margin', 'auto');
$('#avatar-tool-overlay').fadeIn();
}
$(document).ready( function()
{
$("#avatar-tool-tab-seo").tabs();
$('#avatar-tool-box').css('display', 'none');
$('#avatar-tool-ajax-loader').ajaxStart(function(){
$('#avatar-tool-ajax-loader').css('display', 'inline-block');
}).ajaxStop(function(){
$('#avatar-tool-ajax-loader').css('display', 'none');
}).ajaxSuccess(function(){
$('#avatar-tool-ajax-loader').css('display', 'none');
});
$('#avatar-tool-panel-open').click(function(){
toggleAvatarTools();
$('#avatar-toolbar-menu #seo').click();
});
$(document).keydown(function(e){
if(e.keyCode == 27) {
toggleAvatarTools();
}
if (e.altKey && e.keyCode == 65) {
openAvatarTools();
$('#avatar-toolbar-menu #articles').click();
}
if (e.altKey && e.keyCode == 83) {
openAvatarTools();
$('#avatar-toolbar-menu #seo').click();
}
if (e.altKey && e.keyCode == 69) {
openAvatarTools();
$('#avatar-toolbar-menu #extensions').click();
}
if (e.altKey && e.keyCode == 77) {
openAvatarTools();
$('#avatar-toolbar-menu #menus').click();
}
})
$('#avatar-tool-button-seo-update').click(function()
{
var request = $.ajax({
url: "index.php?option=avatar-tool&controller=ajax&task=updateSEO",
type: "POST",
data: $("#avatar-tool-form-seo").serialize(),
dataType: "json"
});
});
});
})(jQuery);
</script>
<div class="avatar-view" id="avatar-view-seo">
<div id="avatar-tool-tab-seo">
<ul>
<li><a href="#tab-seo-global"><?php echo JText::_('AVATAR_TOOL_SEO_GLOBAL'); ?></a></li>
<li><a href="#tab-seo-advance"><?php echo JText::_('AVATAR_TOOL_SEO_ADVANCE'); ?></a></li>
</ul>
<div id="tab-seo-global">
<form id="avatar-tool-form-seo" name="avatar-tool-form-seo">
<ul class="list-item">
<li class="item">
<p class="label"><?php echo JText::_('AVATAR_TOOL_SEO_SITENAME'); ?></p>
<p class="description"><?php echo JText::_('AVATAR_TOOL_SEO_SITENAME_DESC'); ?></p>
<input class="avatar-tool-input-90" size="30" type="text" name="seo[site][sitename]" value="<?php echo isset($seo) ? htmlspecialchars($seo->site->sitename) : ''; ?>" />
<p class="label"><?php echo JText::_('AVATAR_TOOL_SEO_HOME_PAGE_TITLE'); ?></p>
<p class="description"><?php echo JText::_('AVATAR_TOOL_SEO_HOME_PAGE_TITLE_DESC'); ?></p>
<input class="avatar-tool-input-90" size="30" type="text" name="seo[site][home_page_title]" value="<?php echo isset($seo) ? htmlspecialchars($seo->site->home_page_title) : ''; ?>" />
<p class="label"><?php echo JText::_('AVATAR_TOOL_SEO_SITENAME_POSITION'); ?></p>
<p class="description"><?php echo JText::_('AVATAR_TOOL_SEO_SITENAME_POSITION_DESC'); ?></p>
<?php
$arr = array(
JHTML::_('select.option', '0', JText::_('AVATAR_TOOL_SEO_INSERT_BEFORE_PAGE_TITLE') ),
JHTML::_('select.option', '1', JText::_('AVATAR_TOOL_SEO_INSERT_AFTER_PAGE_TITLE') )
);
echo JHTML::_('select.genericlist', $arr, 'seo[site][sitename_position]', null, 'value', 'text', (isset($seo) ? htmlspecialchars($seo->site->sitename_position) : 0));
?>
<p class="label"><?php echo JText::_('AVATAR_TOOL_SEO_TITLE_SEPARATE'); ?></p>
<input type="text" name="seo[site][title_separator]" default=" - " value="<?php echo isset($seo) ? htmlspecialchars($seo->site->title_separator) : '-'; ?>" />
</li>
<li class="item">
<p class="label"><?php echo JText::_('AVATAR_TOOL_SEO_SITE_META_DESCRIPTION'); ?></p>
<p class="description"><?php echo JText::_('AVATAR_TOOL_SEO_SITE_META_DESCRIPTION_DESC') ?></p>
<textarea class="avatar-tool-input-90" name="seo[meta][meta_desc]" rows="5" cols="50"><?php echo isset($seo) ? htmlspecialchars($seo->meta->meta_desc) : ''; ?></textarea>
<p class="label"><?php echo JText::_('AVATAR_TOOL_SEO_SITE_META_KEYWORDS'); ?></p>
<p class="description"><?php echo JText::_('AVATAR_TOOL_SEO_SITE_META_KEYWORDS_DESC') ?></p>
<textarea class="avatar-tool-input-90" name="seo[meta][meta_keywords]" rows="5" cols="50"><?php echo isset($seo) ? htmlspecialchars($seo->meta->meta_keywords) : ''; ?></textarea>
</li>
<li class="item">
<p class="label"><?php echo JText::_('AVATAR_TOOL_SEO_REDIRECT_LINK'); ?></p>
<p class="description"><?php echo JText::_('AVATAR_TOOL_SEO_REDIRECT_LINK_DESC') ?></p>
<input class="avatar-tool-input-90" size="30" type="text" name="seo[site][redirect_link]" value="<?php echo isset($seo) ? htmlspecialchars($seo->site->redirect_link) : ''; ?>" />
</li>
</ul>
</div>
<div id="tab-seo-advance">
<ul class="list-item">
<li class="item">
<p class="label"><?php echo JText::_('AVATAR_TOOL_SEO_ADVANCE_AUTO_GENERAL_META'); ?></p>
<p class="description"><?php echo JText::_('AVATAR_TOOL_SEO_ADVANCE_AUTO_GENERAL_META_DESC') ?></p>
<?php
$arr = array(
JHTML::_('select.option', '0', JText::_('JNO') ),
JHTML::_('select.option', '1', JText::_('JYES') )
);
echo JHTML::_('select.genericlist', $arr, 'seo[site][auto_meta]', null, 'value', 'text', (isset($seo) ? htmlspecialchars($seo->site->auto_meta) : 0));
?>
<p class="label"><?php echo JText::_('AVATAR_TOOL_SEO_ADVANCE_CANONICALIZATION'); ?></p>
<p class="description"><?php echo JText::_('AVATAR_TOOL_SEO_ADVANCE_CANONICALIZATION_DESC') ?></p>
<?php
$arr = array(
JHTML::_('select.option', '0', JText::_('JNO') ),
JHTML::_('select.option', '1', JText::_('JYES') )
);
echo JHTML::_('select.genericlist', $arr, 'seo[site][canonical]', null, 'value', 'text', (isset($seo) ? htmlspecialchars($seo->site->canonical) : 0));
?>
<p class="label"><?php echo JText::_('AVATAR_TOOL_SEO_ADVANCE_CANONICAL_DOMAIN'); ?></p>
<p class="description"><?php echo JText::_('AVATAR_TOOL_SEO_ADVANCE_CANONICAL_DOMAIN_DESC') ?></p>
<input type="text" name="seo[site][canonical_domain]" value="<?php echo isset($seo) ? htmlspecialchars($seo->site->canonical_domain) : ''; ?>" />
<p class="label"><?php echo JText::_('AVATAR_TOOL_SEO_ADVANCE_CANONICAL_REDIRECT'); ?></p>
<p class="description"><?php echo JText::_('AVATAR_TOOL_SEO_ADVANCE_CANONICAL_REDIRECT_DESC') ?></p>
<?php
$arr = array(
JHTML::_('select.option', '0', JText::_('JNO') ),
JHTML::_('select.option', '1', JText::_('JYES') )
);
echo JHTML::_('select.genericlist', $arr, 'seo[site][canonical_redirect]', null, 'value', 'text', (isset($seo) ? htmlspecialchars($seo->site->canonical_redirect) : 0));
?>
</li>
<li class="item">
<p class="label"><?php echo JText::_('AVATAR_TOOL_SEO_ADVANCE_HEADER_TAGS_REPLACE'); ?></p>
<p class="description"><?php echo JText::_('AVATAR_TOOL_SEO_ADVANCE_HEADER_TAGS_REPLACE_DESC') ?></p>
<?php
$arr = array(
JHTML::_('select.option', '0', JText::_('JNO') ),
JHTML::_('select.option', '1', JText::_('JYES') )
);
echo JHTML::_('select.genericlist', $arr, 'seo[site][header_tag_replace]', null, 'value', 'text', (isset($seo) ? htmlspecialchars($seo->site->header_tag_replace) : 0));
?>
</li>
<li class="item">
<p class="label"><?php echo JText::_('AVATAR_TOOL_SEO_ADVANCE_OUT_LINK'); ?></p>
<p class="description"><?php echo JText::_('AVATAR_TOOL_SEO_ADVANCE_OUT_LINK_DESC') ?></p>
<?php
$arr = array(
JHTML::_('select.option', '0', JText::_('JNO') ),
JHTML::_('select.option', '1', JText::_('JYES') )
);
echo JHTML::_('select.genericlist', $arr, 'seo[site][out_link_optimize]', null, 'value', 'text', (isset($seo) ? htmlspecialchars($seo->site->out_link_optimize) : 0));
?>
</li>
</ul>
</form>
</div>
</div>
<div>
<a id="avatar-tool-button-seo-update" class="avatar-tool-button" href="#"><?php echo JText::_('AVATAR_TOOL_BUTTON_UPDATE'); ?></a>
</div>
</div>