Page 1 of 1

How to edit default b3 Startpage?

Posted: 24 Jul 2014, 09:15
by sameoldme
A rookie question I know, but where is the B3 startpage? I actually just want to change the title - I now have two B3s, so its easy to get 'lost' - expected to find some path in /usr/share/web-admin/index.php. but no - now getting obsessed! help.

Re: How to edit default b3 Startpage?

Posted: 24 Jul 2014, 11:20
by Cheeseboy
Hi!

The title (if you mean the title of the browser window) actually picks up the host name dynamically, so you could just change that.
Or... If you feel a bit adventurous, you could modify /usr/share/web-admin/admin/legacy/defines.php. Example:

Code: Select all

 23 
 24 if(isB3()) {
 25         define("NAME","CHEESE");
Result:
New name!
New name!
name_foolery.png (108.25 KiB) Viewed 11560 times
Of course your changes will be overwritten by any updates, and might cause all kinds of havoc, and I have no responsibility whatsoever :-)
Oh, and you have to restart apache2 AND bubba-adminphp.

Kind regards,

Cheeseboy

Re: How to edit default b3 Startpage?

Posted: 24 Jul 2014, 13:20
by sameoldme
Many thanks Cheeseboy - I will try this this eve, and will bear in mind the folly of my actions - might actually make a note so that I know what to do when the doo-doo hits the fan at upgrade time.

yrs sameold

Re: How to edit default b3 Startpage?

Posted: 25 Jul 2014, 01:34
by Gordon
Looks a bit different than normal. The hostname is actuallly displayed within the brackets and if you have two B3's it does in fact make a lot of sense to rename at least one of them - if only to be able to use that name for accessing that particular B3 rather than needing to use raw IP addresses.

Obviously changing the title will not help if you run your web browser in full screen mode and thus it is a bit of a shame that the hostname is not displayed anywhere on the page itself (except after logging on and moving to the identity page). To alter that, you would need to change the corresponding view file, which is regular html (/usr/share/web-admin/views) except for some markers where php injects dynamic content. You're also a lot less likely to mess things up really badly when changing the view files.

Also shouldn't need to restart anything after changing a php file, as php does not keep scripts in memory.

As far as updates are concerned, you could try to script your changes so you can replay them if needed. I do that myself to run the admin pages using a different prefix (i.e. http://b3/less-obvious-path/)