Welcome, Guest. Please login or register.
Did you miss your activation email?
February 13, 2012, 04:09:40 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
149700 Posts in 21103 Topics by 7538 Members
Latest Member: ionline
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: hide advanced admin options for clients etc  (Read 762 times)
snark
Guest
« on: October 08, 2009, 04:04:50 PM »

I guess we all want to hide some fields of advanced settings so that the end user / client will not mess up things

here is an option to hide settings buttons from groups other than the administrators group

Code:
<input type="<?php if ($_SESSION['GROUP_ID'] == 1) { echo "button";} else {echo "hidden";}?>"

Logged
macsmet

Offline Offline

Posts: 230


« Reply #1 on: October 08, 2009, 07:34:48 PM »

@snark: This is interesting! This should be a standard WB solution smiley. Maybe in the next version of WB?

But where (in which file) do I use this? Do you have to define the name of the button?

greetings,

MacSmet
Logged
snark
Guest
« Reply #2 on: October 08, 2009, 08:31:49 PM »

hey there,

well it is another way of using the thing I made for my problem at:

http://www.websitebaker2.org/forum/index.php/topic,15536.0.html


you can use it at very much different ways on buttons, whole forms, tables, div's etc

use this thing I posted on the code of a button where it initially says:

<input type="submit" name="id-button" id="id-button" value="Submit" />

you let the code change to hidden with the small php code to make it look like

<input type="hidden" name="id-button" id="id-button" value="Submit" />


with this code you could literaly change about everything for different groups


stylesheet per group:

 <link rel="stylesheet" type="text/css" href="<input type="<?php echo TEMPLATE_DIR; ?>/<?php if ($_SESSION['GROUP_ID'] == 1) { echo "green";} else {echo "red";}?>-style".css"  />

for resp a green-style.css or a red-style.css to load



with some work you can hide a complete website within your website!!!


I will primaraly use this in the admin to hide extra stuff like for instance in the settings file (standard template, inline bin, date, server settings etc so that the client will only see the keywords and meta description shizzle



Logged
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4755



« Reply #3 on: October 08, 2009, 08:54:13 PM »

I will primaraly use this in the admin to hide extra stuff like for instance in the settings file (standard template, inline bin, date, server settings etc so that the client will only see the keywords and meta description shizzle
Hello Snark.

This won't work in the Settings.
For that Purpose you may use Advanced Settings.

To move another Settings to the "Advanced" Group, open the Backend Thmeme in
[root]/templates/[your]_theme/templates/settings.htt
and use {DISPLAY_ADVANCED} to those rows. this will return: style="display: none;" in the HTML output.

Regards,
Stefek
Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
snark
Guest
« Reply #4 on: October 08, 2009, 09:47:07 PM »

great info mr stefek

Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!