Forums  ›  General  ›  General discussions

Search and Login Boxes on Guest Home Page

To emphasize a need for the search box to be isolated on the Visitor page, the visitors search box on my member's only site still allows a person to see stuff. For example, by entering admin as a search term, a person can see links to any member who has used that term in their posts. If the visitor clicks on my name, the sites says restricted entry, but!

Every module (or block?) that hasn't been tagged Members only will appear in the sub menu and all, or part of that that module is freely accessible.

As Cheetah has hundreds of places to mark things Member's Only, mistakes will happen.

The sure-fire way of stopping this is to eliminate the search box from the visitor home page.

Nothing special really. This is Uni, but I'm happy with the way other templates deal with the Uni layout:

Image 1: As a visitor to the site would see it. No Search, No Login or Join. I have a login and join link elsewhere.

Image 2: Logged in.  (I'm happy with the way it currently appears)

Note: I don't have a menu on the visitor page, thus the line about the hamburger isn't needed there. As it's an injection, it currently appears on the visitor page, but it's not obtrusive.



I can sort out the centering issue. It's just a matter of replacing the search box with a empty div to take the space so the logo don't shift.

Perhaps a screen mockup image of what you want in the header would help me better understand you need. It may be best just to design a new header section in the sub_header.php template file which would eliminate any need for changes to the source code.

Thanks Deano.

I agree that the injection isn't perfect.

Isolating the search box using if(!isMember()) return; pushes the logo a bit to the left. (Maybe 100 pixels).

Isolating genSiteServiceMenu() in the same file immediately forces the logo to the left.


I'm happy enough with the boxes being there, but the login link must send the user to a page containing warnings, not directly to the popup and the search box must not work.

I can disable the search box okay, but the login is causing me problems. I've changed the Login Box in the service menu to LoginOnly, removed the script for the popup and added a URL to my login page. 

When I click login, nothing happens. No redirect, no error messages. The wording is dead. (No link)

If I can get that to work, it would be my best solution unless the centering problem can be sorted later.


5. Injected my new header image into the header section. I used Modzzz' Injection Manager.

This may be putting things in the wrong spot for the logo.

Try this instead. Put the header back the way it was.

Then the mod you did where you add if(!isMember()) return; for the genSiteSearch() function. Do that and the same thing in the genSiteServiceMenu() function and see if that does what you need.

This allows it to work on a mobile phone, but it's far too small for the main site. My header logo is 400 wide and when I add it using the Basic Settings, it shows as 400 on the PC site and much smaller on a phone. I want to may the logo and other pics responsive like the rest of the Evolution template.

Sorting through this problem has lead me to what I consider a bug, so I'll start another thread about it.

Should be as simple as setting the following css on your logo img tag.

width: 294px;  //Set this to the width of your image.
height: auto;


I've almost got this working perfectly. (Almost!) 

1. Removed the search block from the guest home page using Deano's Boonex offering (above).
2. Removed the Guest login by dragging the login block to the unused blocks section in the service menu.
3. Removed the existing header.
4. Removed the page title from Basic Settings
5. Injected my new header image into the header section. I used Modzzz' Injection Manager.

Everything looks terrific . . . . but!

The new header image isn't responsive. I can make it around 300px, but it's a bit small. I need to add some code to make it responsive, and I'm done!

The code at W3 Schools seems a bit verbose and I'm hoping to tap into the code that makes the Cheetah templates responsive.

Any ideas?

I'll look into making those optional.

As for hiding them shifting your logo position. It's because that top section is a 3 column table and centering the logo within the center of the middle column of that table relies on the width of the columns to the left and right of it to have content of a specific width. So hiding them requires it be replaced with a empty fixed width div of the needed width to keep your logo centered. That's something that will take me a bit of time to figure out.

The Search Box: I've used it once on a public site, but most sites will be for members only and the search box won't be needed on the guest login home page. This should be an option, not hard-coded.

Login/Join Box:  It's a bit obscure on phones and most of the sites I've seen have the login form or a link to it elsewhere. Once again, I think this should be optional.

I actually need to remove both boxes to make my adult orientated site comply with Australian laws. The Join process will be preceded by a few terms and conditions and the login box (may) be required to include a few warnings. Thus, I'm adding links to specially prepared pages covering these possible issues.


The Login/Join box can be hidden by selecting the block in the Admin service menu and hiding it from guests.

This also moves the header logo slightly.

I can remove the Search box using code supplied by Deano in an old Boonex thread on the subject:

This removes the search box on the "Guest" or login home page, but the Logo or header slides to the left and fills the gap.


Firstly, I'm not sure if this is the best way to resolve this problem.

Secondly, I've not been able to center the logo or header.

Comments please.