<?php
/**
 * @package    VP Advanced User
 * @author     Abhishek Das <info@virtueplanet.com>
 * @copyright  Copyright (C) 2012-2019 VirtuePlanet Services LLP. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 * @link       https://www.virtueplanet.com
 */

defined('_JEXEC') or die;

$document = JFactory::getDocument();
$document->addStyleSheet(JUri::root(true) . '/media/com_vpadvanceduser/css/help.css');
?>
<div class="vpau-help-container">
	<h3><?php echo JText::_('COM_VPADVANCEDUSER_HELP_TITLE') ?></h3>
	<div class="vpau-help">
		<h4>Available Variables</h4>
		<p>You can use the following purpose specific variables both in the subject and body.</p>
		<br />
		<h5 class="vpau-help-purpose"><?php echo JText::_('COM_VPADVANCEDUSER_EMAIL_USER_REGISTRATION') ?></h5>
		<div class="vpau-help-well">
			<ul>
				<li>
					<code>{{ offline_logo }}</code> prints html offline image element if available. Offline image can be configured in Joomla! Global Config.
				</li>
				<li>
					<code>{{ offline_logo_link }}</code> prints html offline image element with site link. If offline image is not available site name is used.
				</li>
				<li>
					<code>{{ sitename }}</code> prints site name.
				</li>
				<li>
					<code>{{ siteurl }}</code> prints url of the site.
				</li>
				<li>
					<code>{{ siteurl_html }}</code> prints html link of the site.
				</li>
				<li>
					<code>{{ fromname }}</code> prints name of the email account as configured in Joomla! Global Config.
				</li>
				<li>
					<code>{{ mailfrom }}</code> prints email address as configured in Joomla! Global Config.
				</li>
				<li>
					<code>{{ name }}</code> prints name of the user.
				</li>
				<li>
					<code>{{ username }}</code> prints username of the user.
				</li>
				<li>
					<code>{{ email }}</code> prints email id of the user.
				</li>
				<li>
					<code>{{ password_clear }}</code> prints password of the user if enabled.
				</li>
			</ul>
		</div>
		<h5 class="vpau-help-purpose"><?php echo JText::_('COM_VPADVANCEDUSER_EMAIL_USER_ACTIVATION') ?></h5>
		<div class="vpau-help-well">
			<ul>
				<li>
					<code>{{ offline_logo }}</code> prints html offline image element if available. Offline image can be configured in Joomla! Global Config.
				</li>
				<li>
					<code>{{ offline_logo_link }}</code> prints html offline image element with site link. If offline image is not available site name is used.
				</li>
				<li>
					<code>{{ sitename }}</code> prints site name.
				</li>
				<li>
					<code>{{ siteurl }}</code> prints url of the site.
				</li>
				<li>
					<code>{{ siteurl_html }}</code> prints html link of the site.
				</li>
				<li>
					<code>{{ fromname }}</code> prints name of the email account as configured in Joomla! Global Config.
				</li>
				<li>
					<code>{{ mailfrom }}</code> prints email address as configured in Joomla! Global Config.
				</li>
				<li>
					<code>{{ name }}</code> prints name of the user.
				</li>
				<li>
					<code>{{ username }}</code> prints username of the user.
				</li>
				<li>
					<code>{{ email }}</code> prints email id of the user.
				</li>
				<li>
					<code>{{ password_clear }}</code> prints password of the user if enabled.
				</li>
				<li>
					<code>{{ link_text }}</code> prints account activation url.
				</li>
				<li>
					<code>{{ link_html }}</code> prints html link for account activation.
				</li>
			</ul>
		</div>
		<h5 class="vpau-help-purpose"><?php echo JText::_('COM_VPADVANCEDUSER_EMAIL_ADMINISTRATOR_ACTIVATION') ?></h5>
		<div class="vpau-help-well">
			<ul>
				<li>
					<code>{{ offline_logo }}</code> prints html offline image element if available. Offline image can be configured in Joomla! Global Config.
				</li>
				<li>
					<code>{{ offline_logo_link }}</code> prints html offline image element with site link. If offline image is not available site name is used.
				</li>
				<li>
					<code>{{ sitename }}</code> prints site name.
				</li>
				<li>
					<code>{{ siteurl }}</code> prints url of the site.
				</li>
				<li>
					<code>{{ siteurl_html }}</code> prints html link of the site.
				</li>
				<li>
					<code>{{ fromname }}</code> prints name of the email account as configured in Joomla! Global Config.
				</li>
				<li>
					<code>{{ mailfrom }}</code> prints email address as configured in Joomla! Global Config.
				</li>
				<li>
					<code>{{ name }}</code> prints name of the user.
				</li>
				<li>
					<code>{{ username }}</code> prints username of the user.
				</li>
				<li>
					<code>{{ email }}</code> prints email id of the user.
				</li>
				<li>
					<code>{{ password_clear }}</code> prints password of the user if enabled.
				</li>
				<li>
					<code>{{ link_text }}</code> prints account activation url.
				</li>
				<li>
					<code>{{ link_html }}</code> prints html link for account activation.
				</li>
			</ul>
		</div>
		<h5 class="vpau-help-purpose"><?php echo JText::_('COM_VPADVANCEDUSER_EMAIL_PASSWORD_RESET') ?></h5>
		<div class="vpau-help-well">
			<ul>
				<li>
					<code>{{ offline_logo }}</code> prints html offline image element if available. Offline image can be configured in Joomla! Global Config.
				</li>
				<li>
					<code>{{ offline_logo_link }}</code> prints html offline image element with site link. If offline image is not available site name is used.
				</li>
				<li>
					<code>{{ sitename }}</code> prints site name.
				</li>
				<li>
					<code>{{ siteurl }}</code> prints url of the site.
				</li>
				<li>
					<code>{{ siteurl_html }}</code> prints html link of the site.
				</li>
				<li>
					<code>{{ fromname }}</code> prints name of the email account as configured in Joomla! Global Config.
				</li>
				<li>
					<code>{{ mailfrom }}</code> prints email address as configured in Joomla! Global Config.
				</li>
				<li>
					<code>{{ name }}</code> prints name of the user.
				</li>
				<li>
					<code>{{ username }}</code> prints username of the user.
				</li>
				<li>
					<code>{{ email }}</code> prints email id of the user.
				</li>
				<li>
					<code>{{ link_text }}</code> prints password reset url.
				</li>
				<li>
					<code>{{ link_html }}</code> prints html link for password reset.
				</li>
				<li>
					<code>{{ token }}</code> prints password reset token.
				</li>
			</ul>
		</div>
		<h5 class="vpau-help-purpose"><?php echo JText::_('COM_VPADVANCEDUSER_EMAIL_ADMINISTRATOR_NOTIFICATION') ?></h5>
		<div class="vpau-help-well">
			<ul>
				<li>
					<code>{{ offline_logo }}</code> prints html offline image element if available. Offline image can be configured in Joomla! Global Config.
				</li>
				<li>
					<code>{{ offline_logo_link }}</code> prints html offline image element with site link. If offline image is not available site name is used.
				</li>
				<li>
					<code>{{ sitename }}</code> prints site name.
				</li>
				<li>
					<code>{{ siteurl }}</code> prints url of the site.
				</li>
				<li>
					<code>{{ siteurl_html }}</code> prints html link of the site.
				</li>
				<li>
					<code>{{ fromname }}</code> prints name of the email account as configured in Joomla! Global Config.
				</li>
				<li>
					<code>{{ mailfrom }}</code> prints email address as configured in Joomla! Global Config.
				</li>
				<li>
					<code>{{ name }}</code> prints name of the user.
				</li>
				<li>
					<code>{{ username }}</code> prints username of the user.
				</li>
				<li>
					<code>{{ email }}</code> prints email id of the user.
				</li>
				<li>
					<code>{{ password_clear }}</code> prints password of the user if enabled.
				</li>
				<li>
					<code>{{ link_text }}</code> prints account activation url.
				</li>
				<li>
					<code>{{ link_html }}</code> prints html link for account activation.
				</li>
			</ul>
		</div>
		<br />
		<h4>Using Joomla! Language</h4>
		<p>You can also call Joomla! language in the email templates. VP Advanced User uses <a href="https://github.com/bobthecow/mustache.php" target="_blank"><b>Mustache.php</b></a> library to parse the email templates. Therefore you need to adjust your PHP codes as per Mustache.</p>
		<h5 class="vpau-help-purpose">Example for JText::_</h5>
		<div class="vpau-help-well">
			Mustache codes <code>{{# JText._ }}JGLOBAL_USERNAME{{/ JText._ }}</code> in place of PHP codes <code>&#x3C;?php echo JText::_('JGLOBAL_USERNAME') ?&#x3E;</code>.
		</div>
		<h5 class="vpau-help-purpose">Example for JText::sprintf</h5>
		<div class="vpau-help-well">
			Mustache codes <code>{{# JText.sprintf }}COM_USERS_EMAIL_PASSWORD_RESET_SUBJECT, {{ sitename }}{{/ JText.sprintf }}</code> in place of PHP codes <code>&#x3C;?php echo JText::sprintf('COM_USERS_EMAIL_PASSWORD_RESET_SUBJECT', $sitename) ?&#x3E;</code>.
		</div>
	</div>
</div>