Hi Teitbite, I checked in /blocks and is only present logo.php and still do not know where to put it.
But I do not know if you understand what I want to do:
- I created a form (custom) and inside I put 3 link with the codes
this is the code that I put at the beginning in custom module
- Code: Select all
<li><a id="uno" href="/">HOME</a></li>
<li><a id="due" href="/forum">FORUM</a></li>
<vb:if condition="$show['guest']"><li><a id="tre" href="/forums/register.html?quot;=>Registrazione=</a=>=</li=</vb:if=
later, on your advice,
teitbite wrote:Hi
For links use mod_custom with <a></a> links, that add this to css:
I changed the structure of the code that link
- Code: Select all
<a href="/" style="font-size:20px; color:#909090;">HOME</a>
<a href="/forum/forum.php" style="font-size:20px; color:#909090;">FORUM</a>
<vb:if condition="$show['guest']"><a href="/forum/register.php" style="font-size:20px; color:lime;">REGISTRAZIONE</a></vb:if>
and links you see perfectly, only that I wanted the REGISTRAZIONE link above which remains within that module (which is published in the topbar), is visible ONLY to unregistered / guest.
after you told me to use this code:
- Code: Select all
<?php
$user = JFactory::getUser();
$userID = $user->get('id');
if ($userID != 0) {
?>
<vb><a href="/forums/register.php" style="color:lime;">REGISTRAZIONE</a></vb>
<?php
}
?>
But I did not understand:
1. where to put it in if logo.php (which is present in / blocks), if in nav.php or toolbar.php (which are not present)
2. If you are logo.php, where to put it? (for safety I put my logo.php)
- Code: Select all
<?php
// No direct access.
defined('_JEXEC') or die;
$logo_image = $this->getParam('logo_image', '');
if(($logo_image == '') || ($this->getParam('logo_type', '') == 'css')) {
$logo_image = $this->URLtemplate() . '/images/style1/logo.png';
} else {
$logo_image = $this->URLbase() . $logo_image;
}
$logo_text = $this->getParam('logo_text', '');
$logo_slogan = $this->getParam('logo_slogan', '');
$user = JFactory::getUser();
// getting User ID
$userID = $user->get('id');
//
$btn_login_text = ($userID == 0) ? JText::_('TPL_GK_LANG_LOGIN') : JText::_('TPL_GK_LANG_LOGOUT');
?>
<div id="gkLogoWrap">
<?php if ($this->getParam('logo_type', 'image')!=='none'): ?>
<?php if($this->getParam('logo_type', 'image') == 'css') : ?>
<h1 id="gkLogo">
<a href="./" class="cssLogo"></a>
</h1>
<?php elseif($this->getParam('logo_type', 'image')=='text') : ?>
<h1 id="gkLogo" class="text">
<a href="./">
<?php if($this->getParam('logo_text', '') != '') : ?><span><?php echo $this->getParam('logo_text', ''); ?></span><?php endif; ?>
<?php if($this->getParam('logo_slogan', '') != '') : ?><small class="gkLogoSlogan"><?php echo $this->getParam('logo_slogan', ''); ?></small><?php endif; ?>
</a>
</h1>
<?php elseif($this->getParam('logo_type', 'image')=='image') : ?>
<h1 id="gkLogo">
<a href="./">
<img src="<?php echo $logo_image; ?>" alt="<?php echo $this->getPageName(); ?>" />
</a>
</h1>
<?php endif; ?>
<?php endif; ?>
<?php if($this->modules('newposition')) : ?>
<div id="gkTopPosition">
<jdoc:include type="modules" name="newposition" style="<?php echo $this->module_styles['newposition']; ?>" />
</div>
<?php endif; ?>
<?php if($this->modules('highlighter')) : ?>
<div id="gkHighlighter">
<jdoc:include type="modules" name="highlighter" style="<?php echo $this->module_styles['highlighter']; ?>" />
</div>
<?php endif; ?>
</div>
3. But the code for the link REGISTRAZIONE that is in the custom module, I have to do? to delete it, edit it, do not do anything and I leave it alone?
Sorry for the message and for my dementia