Web Hosting Talk







View Full Version : Modify /usr/admserv templates


mailgames2
11-16-2002, 02:39 PM
Hi

Here what i want to do :
Give my customer the GUI minus a few buttons in /siteadmin, eg Mailing List, Stats etc

I have modified siteManageMainMenu.tmpl and removed the link from over the blue Cobalt 'C' and removed the button at the bottom for Server Admin.

I noticed in this file the use of a [BUTTONS] tag, but I am unsure of where to find the reference or content of the tag.
I assume I am doing this the correct way ?

Can any one help me ?

Cheers
Peter

mailgames2
11-22-2002, 01:06 PM
Hello

Can anyone even point me to some docs or FAQ's about this ?

Have I any other options ?

I don't really want to be breaking my box just yet, even though I have made backups of the tree.

Many thanks

BruceT
11-22-2002, 09:24 PM
There has never been any documentation on modifying the page templates, etc, as it was never intended for end customers to be doing that.

That being said, here's what I found on my stock RaQ4:

[root bruce]# cd /usr/admserv/
[root admserv]# grep --recursive "BUTTONS" *

cgi-bin/.cobalt/mailListList/mailListList.cgi: s/\[BUTTONS\]/$buttons/o;
cgi-bin/.cobalt/siteFPXsubweb/siteFPXsubweb.cgi: s/\[BUTTONS\]/$buttons/o;

templates/mailListList.tmpl:[BUTTONS]
templates/personalMainMenu.tmpl:[BUTTONS]
templates/personalSubMenu.tmpl: [BUTTONS]<BR>
templates/siteFPXsubwebList.tmpl:[BUTTONS]
templates/siteList.tmpl:[BUTTONS]
templates/siteManageMainMenu.tmpl:[BUTTONS]
templates/siteManageSubMenu.tmpl: [BUTTONS]<BR>
templates/siteUserList.tmpl:[BUTTONS]
templates/sysManageMainMenu.tmpl:[BUTTONS]
templates/sysManageSubMenu.tmpl: [BUTTONS]<BR>

So in a couple of the backend Perl scripts, the [BUTTONS] tag is substituted for the contents of the scalar $buttons in the HTML stream being generated.

And $buttons is defined/used here:

[root admserv]# grep --recursive "\$buttons" *

cgi-bin/.cobalt/mailListList/mailListList.cgi:my $buttons='';
cgi-bin/.cobalt/mailListList/mailListList.cgi: $buttons=<<END;
cgi-bin/.cobalt/mailListList/mailListList.cgi: s/\[BUTTONS\]/$buttons/o;
cgi-bin/.cobalt/siteFPXsubweb/siteFPXsubweb.cgi:my $buttons='';
cgi-bin/.cobalt/siteFPXsubweb/siteFPXsubweb.cgi: $buttons=<<END;
cgi-bin/.cobalt/siteFPXsubweb/siteFPXsubweb.cgi: s/\[BUTTONS\]/$buttons/o;

Hope this helps a bit...

mailgames2
11-26-2002, 08:54 AM
Hi

Thats very helpful !

Thanks for you time on that.

I have not managed to complete what I want yet, but this is a good start.

Look like a lot of digging and trawling.

If I find any more I'll post here if people are interested.

Cheers

BruceT
11-29-2002, 01:27 PM
Yeah, there really isn't a good way to tinker with the various bits (HTML or back-end CGIs) on the older RaQs. On the newer systems (Qube 3 and RaQ 550), the Sausalito abstraction system was used to decouple the UI and the underlying system, making customizations and additions a lot easier to do without worrying about breaking the box.

Documentation for that still isn't "great", but it's better than the nothing that exists for the older products.