Creating a user4 module position in template

Everything to do with Joomla! 3.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
Blue Dragonfly
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Nov 27, 2013 8:45 am

Creating a user4 module position in template

Post by Blue Dragonfly » Sun Oct 23, 2016 11:44 pm

Ugg, I tried to preview this post and it gave me a 403 error, and now I have to write this again!

I have a Joomlage template (Joomlage0074-Cast), and on their demo, they show all the module positions the template has. There is no user4, or any other module position at the very top of the page.

However, on my site (that uses the template), when I add ?tp=1, it shows a user4 in the top left.
https://gyazo.com/ef8b586acf64fcfed587e76697fc4bd5 (the img tags wouldn't show the picture)

The html code surrounding it is:

Code: Select all

(div id="search")
        	(div class="mod-preview")
		(div class="mod-preview-info")Position: user4 [ Style: none outline](/div)
		(div class="mod-preview-wrapper")
			(div class="search")
	(form action="/" method="post" class="form-inline")
		(label for="mod-search-searchword" class="element-invisible")Search ...(/label) (input name="searchword" id="mod-search-searchword" maxlength="200" class="inputbox search-query" type="search" placeholder="Search ...")		(input type="hidden" name="task" value="search")
		(input type="hidden" name="option" value="com_search")
		(input type="hidden" name="Itemid" value="206")
	(/form)
(/div)
		(/div)
	(/div)
(/div)
The html code on a regular page (without the ?tp=1) is:

Code: Select all

(div id="search")
        (div class="search")
	(form action="/forums.html" method="post" class="form-inline")
		(label for="mod-search-searchword" class="element-invisible")Search ...(/label) (input name="searchword" id="mod-search-searchword" maxlength="200" class="inputbox search-query" type="search" placeholder="Search ...")		(input type="hidden" name="task" value="search")
		(input type="hidden" name="option" value="com_search")
		(input type="hidden" name="Itemid" value="147")
	(/form)
(/div)
(/div)
Rather than use the search module, they hard-coded the search in. I know because the search module is unpublished at the moment.

I'm not sure how to link user4 up to that area, or if it's possible. I googled and got as far as adding this to the template's body custom code:

Code: Select all

(jdoc:include type="modules" name="user4" style="xhtml" /)
Do I just try to use css to move it to the top corner? What class would I use? Or do I alter the html to define user4? I had wanted to do this without editing the files for the template itself, is that possible?

User avatar
Mojsplet
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 124
Joined: Sat Mar 28, 2009 3:54 pm
Location: Slovenia
Contact:

Re: Creating a user4 module position in template

Post by Mojsplet » Tue Oct 25, 2016 1:51 pm

Is this code from source code or index.php?
Can you paste index.php code from template?

Blue Dragonfly
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Nov 27, 2013 8:45 am

Re: Creating a user4 module position in template

Post by Blue Dragonfly » Wed Oct 26, 2016 3:11 am

From the source code. From index.php it's:

Code: Select all

<a href="#" class="scrollup">Scroll</a>

<div id="container_header" class="container"><div class="wrapper960">
<?php require( "php/layouts/header.php"); ?>
</div></div>

<div id="container_logo_menu_mobile" class="container"><div class="wrapper960">
<?php require( "php/layouts/logo_menu_responsive.php"); ?>
</div></div>

<div id="container_social_mobile" class="container"><div class="wrapper960">
<?php require( "php/layouts/social_responsive.php"); ?>
</div></div>

<?php if ($this->countModules( 'showcase' )) : ?>
<div id="container_slideshow_bg">
<div id="container_slideshow" class="container"><div class="wrapper960">
<?php require( "php/layouts/slideshow.php"); ?>
</div></div></div>
<?php endif; ?>

<?php if ($this->countModules('top-1a') || $this->countModules('top-1b') || $this->countModules('top-1c') || $this->countModules('top-1d') || $this->countModules('top-1e') || $this->countModules('top-1f') || $this->countModules('top-2a') || $this->countModules('top-2b') || $this->countModules('top-2c') || $this->countModules('top-2d') || $this->countModules('top-2e') || $this->countModules('top-2f')) : ?>
<div id="container_top_modules_bg">
<div id="container_top_modules" class="container"><div class="wrapper960">
<?php require( "php/layouts/top_modules.php"); ?>
</div></div></div>
<?php endif; ?>

User avatar
Mojsplet
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 124
Joined: Sat Mar 28, 2009 3:54 pm
Location: Slovenia
Contact:

Re: Creating a user4 module position in template

Post by Mojsplet » Wed Oct 26, 2016 8:19 am

All the magic is probably in php/layouts/header.php. Can you paste this?

Blue Dragonfly
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Nov 27, 2013 8:45 am

Re: Creating a user4 module position in template

Post by Blue Dragonfly » Wed Nov 02, 2016 9:02 am

Code: Select all

<div id ="header" class="block_holder">

<div id="hornav" class="cl-effect-21">
    <?php echo $hornav; ?>
</div>
<div id="hornav-shadow">
</div>

<div class="clear"></div>  
	<div id="header_items">
        <div id="social">
            <ul>
            <?php if($this->params->get('nav_rssfeed_sw') == '1') : ?>
                <li class="social-rss"><a href="<?php echo $this->params->get('nav_rssfeed'); ?>" title="RSS Feed"></a></li>
            <?php endif; ?>

            <?php if($this->params->get('nav_twitter_sw') == '1') : ?>
                <li class="social-twitter"><a href="<?php echo $this->params->get('nav_twitter'); ?>" title="Twitter"></a></li>
            <?php endif; ?>

            <?php if($this->params->get('nav_google_sw') == '1') : ?>
                <li class="social-googleplus"><a href="<?php echo $this->params->get('nav_google'); ?>" title="Google Plus"></a></li>
            <?php endif; ?>

            <?php if($this->params->get('nav_facebook_sw') == '1') : ?>
                <li class="social-facebook"><a href="<?php echo $this->params->get('nav_facebook'); ?>" title="Facebook"></a></li>
            <?php endif; ?>

            <?php if($this->params->get('nav_[youtube]_sw') == '1') : ?>
                <li class="social-[youtube]"><a href="<?php echo $this->params->get('nav_[youtube]'); ?>" title="[youtube]"></a></li>
            <?php endif; ?>

            <?php if($this->params->get('nav_pinterest_sw') == '1') : ?>
                <li class="social-pinterest"><a href="<?php echo $this->params->get('nav_pinterest'); ?>" title="Pinterest"></a></li>
            <?php endif; ?>

            <?php if($this->params->get('nav_dribbble_sw') == '1') : ?>
                <li class="social-dribbble"><a href="<?php echo $this->params->get('nav_dribbble'); ?>" title="Dribbble"></a></li>
            <?php endif; ?>

            <?php if($this->params->get('nav_flickr_sw') == '1') : ?>
                <li class="social-flickr"><a href="<?php echo $this->params->get('nav_flickr'); ?>" title="Flickr"></a></li>
            <?php endif; ?>

            <?php if($this->params->get('nav_skype_sw') == '1') : ?>
                <li class="social-skype"><a href="<?php echo $this->params->get('nav_skype'); ?>" title="Skype"></a></li>
            <?php endif; ?>

            <?php if($this->params->get('nav_linkedin_sw') == '1') : ?>
                <li class="social-linkedin"><a href="<?php echo $this->params->get('nav_linkedin'); ?>" title="LinkedIn"></a></li>
            <?php endif; ?>

            <?php if($this->params->get('nav_vimeo_sw') == '1') : ?>
                <li class="social-vimeo"><a href="<?php echo $this->params->get('nav_vimeo'); ?>" title="vimeo"></a></li>
            <?php endif; ?>

            <?php if($this->params->get('nav_yahoo_sw') == '1') : ?>
                <li class="social-yahoo"><a href="<?php echo $this->params->get('nav_yahoo'); ?>" title="yahoo"></a></li>
            <?php endif; ?>

            <?php if($this->params->get('nav_[spam]_sw') == '1') : ?>
                <li class="social-[spam]"><a href="<?php echo $this->params->get('nav_[spam]'); ?>" title="[spam]"></a></li>
            <?php endif; ?>

            <?php if($this->params->get('nav_deviantart_sw') == '1') : ?>
                <li class="social-deviantart"><a href="<?php echo $this->params->get('nav_deviantart'); ?>" title="deviantart"></a></li>
            <?php endif; ?>

            <?php if($this->params->get('nav_delicious_sw') == '1') : ?>
                <li class="social-delicious"><a href="<?php echo $this->params->get('nav_delicious'); ?>" title="delicious"></a></li>
            <?php endif; ?>
            </ul>
            </div>	
    
<?php if ($this->countModules( 'custom' )) : ?>
<div id="custom" class="block_holder"><div class="module_margin">
    <jdoc:include type="modules" name="custom" />
</div></div>
<?php endif; ?>

<?php if($search_onoff == "1") : ?>
    <div id="search">
        <?php echo $search; ?>
    </div>
<?php endif; ?>
 
<div id="logo">
    <div class="logo_container">		
        <?php if($this->params->get('logoImage') == '1') : ?>
        <h1 class="logo"> <a href="index.php" title="<?php echo $siteName; ?>"><span>
          <?php echo $siteName; ?> 
          </span></a> </h1>
            <?php else : ?>

        <h1 class="logo-text"> <a href="index.php" title="<?php echo $this->params->get('siteName'); ?>"><span>
          <?php echo $this->params->get('logoText'); ?>
          </span></a> </h1>
            <p class="site-slogan"><?php echo $this->params->get('sloganText'); ?></p>
        <?php endif; ?>
    </div>
</div>
<div class="clear"></div>
</div>

</div>

User avatar
Mojsplet
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 124
Joined: Sat Mar 28, 2009 3:54 pm
Location: Slovenia
Contact:

Re: Creating a user4 module position in template

Post by Mojsplet » Wed Nov 02, 2016 9:26 am

I dont see any user4 there.
As i understand, you want to place user4 position to existing search?
Just replace <?php echo $search; ?> (or comment out)
with <jdoc:include type="modules" name="user4" style="xhtml" />

Blue Dragonfly
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Nov 27, 2013 8:45 am

Re: Creating a user4 module position in template

Post by Blue Dragonfly » Thu Nov 03, 2016 4:36 am

Thank you, that works great! If I wanted to put a module on the top right side, is there another module that usually goes there or do I have to make up my own?

User avatar
Mojsplet
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 124
Joined: Sat Mar 28, 2009 3:54 pm
Location: Slovenia
Contact:

Re: Creating a user4 module position in template

Post by Mojsplet » Thu Nov 03, 2016 2:44 pm

Right is social icons. If you dont need them, you can replace ul code with your new module code. Same as for search.
You have "custom" module position there also. Maybe try that first.
Btw...you have payed for template, so you have their support i gues.


Locked

Return to “Templates for Joomla! 3.x”