Config override for 'Name of your site' in control panel - expressionengine

In the control panel, there's a setting in Admin > General Configuration for 'Name of your site.'
The value entered here appears in the top right hand corner of the control panel.
Is there a config override to set this value, to save having to type it via the control panel?
Thanks,
Stephen

$config['site_label'] = 'My Site Name';
In my experience, while this override indeed exists, it is not honored in the control panel. Basically, whatever is in the config file gets overridden by what's in the control panel. Not the way it is supposed to be but ...
See this bug report for a workaround and detailed explanations.

There is a bug that prevents this from working.
However, there is also an add-on which fixes it, if you really need the functionality: http://devot-ee.com/add-ons/override_site_name

Try $config['site_label'] = 'My Site Name';

Related

How to hide URL Selector content tab?

I am creating a custom webpart using the Url Selector from kentico. I want the user to select content just from the Media Library. I went to form controls -> Url Selector -> Properties -> Dialogs_Content_Hide -> Default Value -> Yes and it still showing it in the Web Part. If I select the Dialogs_Web_Hide, Dialogs_Libraries_Hide and select the yes option in the default values, they hide, all except the Content_Dialogs.
Is this a bug? Or its something wrong?
Here is an example of the tabs
First set the form controls properties back to the way they were. If you don't, it will cause all kinds of problems later on.
Secondly, when you create the property in the webpart in the UI, select the URL selector form control for your text fields control. The scroll down just a bit and under the Editing Control Settings you'll see an "Configure" link. Click it. In there you will be able to tell the form control what tabs you want to enable and disable.
To add to Brenden's answer; if this is something you need to do a lot for your current build, then I'd also suggest making a copy of the Url selector form control and customize the properties as you originally mentioned. This way, you leave the default control in place for the system and have a control tailored to your needs. I've done this just now to check with a new form control that I called Media URL selector. Do make sure that you select the same source file as the original control in the Cloned form control file name property - Kentico by default will try to locate a new file called <original filename>_1.ascx. The reason for this is that admin section of your site also makes use of this control, so you may cause a nasty side effect somewhere else in the system.
As for why the settings had no effect; these are the default values you are setting. If you already have the form control in use, then the default setting would have been applied as they originally were. If you find one of the fields in question, you can change the control type to Text box, click Save, and then reassign it to Media URL selector.

hide my sites option from dockbar liferay

i m using liferay6.2 ga2 i want to hide mysites from dockbar for all users except admin user .i know its possible through hook and referred the below link
http://findnerd.com/list/view/Hiding-My-Sites-Menu-in-Docbar-in-Liferay/1940/
but inside dockbar portlet in view_my_sites.jspf which part of the code must be modified.
can anybody please provide solution how view_my_sites.jspf file must be modified or any informative reference about hiding my sites option from dockbar.
thanks in advance
Helo Heena,
You must implement in your Theme a logic to restrict this.
I remember that this logic must be included into portal-normal.vm accessing ThemeDisplay Object.
It should be something like this:
set ($expando= $themeDisplay.getScopeGroup().getExpandoBridge())
set ($group = $expando.getAttribute("isAdmin"))
if ($isAdmin!= true)
set ("Logic to enable or disable options")
end
I hope that this could be useful for you.
Hi if you look into the init.vm or init.ftl and search for my sites you see couple of variables there. I would expect that setting the show_my_sites to false would make the my site option disappear (needs to be tested).
To detect, if the current user is admin i would user permissionChecker.isOmniadmin(). The permissionChecker variable is available in the context. The other option is to get user roles and check if the user has a specific role.
If you are willing to hide 'Go To' option from the dock bar of Liferay for non-admin users, then please navigate to {TOMCAT_HOME}\webapps\ROOT\html\portlet\dockbar and open the 'view.jsp' and search for the if condition "> and replace the same with the ">. Thanks.

hide pages in websphere portal without using set parameters

I am using WebSphere Portal 8.5 Enable. I have created a custom theme. But this theme requires to hide pages on navigation which has unique name with ".omit." value in it, so that I don't have to manually set each page's parameter.
I created the flyout or menu dropdown using this:
Flyout or Menu Dropdown in Portal 8 themes
Any suggestions and pointers are welcome. Thanks in advance.
Maybe you have already thought about this.
The solution you mentioned (Flyout or Menu Dropdown in Portal 8 themes) hides nodes based on the hidden flag. This method is used to calculate it. Now you could query the uniquename of the Node witin this method and check for your naming pattern and use this to determine if it is hidden. It would allow you to combine the two as well.
the method I think you need to modify.
public boolean isHiddenPage(NavigationNode node){
if (node instanceof com.ibm.portal.MetaDataProvider) {
com.ibm.portal.MetaData iMetaData=((com.ibm.portal.MetaDataProvider) node).getMetaData();
Object url=iMetaData.getValue("hide.from.menu");
return (url != null && url.toString().equals("true"));
}
return false;
}
You can hide any page using the role settings just create a user group which is never used and make that the only thing that can access the page. You should be able to do this is your PAA's PageAssignAccessControl.xml (could be slightly wrong about the name of this file) as well as in the portal Admin console, so you can do it automatically in your deployment code.

Hide Liferay control panel options form users

I am developing a liferay portlet using liferay6.1 and SDK for Java.
When user logs in and they click on control panel they can see all kind of options. Is there a way to hide this options?
I am still new but i think that you can hide it from the portal.ext.properties but I am not sure and I have no idea.
Any help will be appreciated!
Thanks in advance!
You can show/hide control panel entries by implementing the interface com.liferay.portlet.ControlPanelEntry. This interface defines a couple of methods (isVisible/hasAccessPermission) that determine if a particular user sees/has access to one of the control panel entries.
The association between a portlet and its ControlPanelEntry class is defined in the liferay-portlet.xml configuration file. To override its value, you must use the ext-plugin.
Take a look at http://www.liferay.com/dtd/liferay-portlet-app_6_1_0.dtd for more information (search for control-panel-entry).
The configuration can be do by role-permissions of user and power-user. Go to "Control Panel" -> "Roles" -> Looking for User-Role (then Power-User) -> Define Permissions. Disable in area "Permission for Control Panel" the View-Permission for Items that must be hide.
Over.
Hide and disable access to liferay control panel
This blog will help you

Eclipse RCP: How to configure the Perspective Menu?

I need to have total control of the perspective menu.
I already hacked into the platform to disable the CONTEXT menu:
private void disablePerspectiveToolbarMenu() {
PerspectiveBarManager perspectiveBarManager =
((WorkbenchWindow) PlatformUI.getWorkbench().getActiveWorkbenchWindow()).getPerspectiveBar();
if (perspectiveBarManager!=null){
ToolBar toolBar = perspectiveBarManager.getControl();
Listener[] listeners = toolBar.getListeners(SWT.MenuDetect);
if (listeners != null){
for (Listener listener : listeners){
toolBar.removeListener(SWT.MenuDetect, listener);
}
}
}
}
But i need also to control the default contents of the PERSPECTIVE MENU. There is one option that is always present that gives access to a Perspective List Shell. I need to remove that option from the menu.
It's a shame that the perspective menu is totally out of user control. I just need to have the perspectives added to the menu, and nothing more!
Thanks.
There are 3 potential options to get rid of Other:
Set the
org.eclipse.ui.IWorkbenchPreferenceConstants.SHOW_OTHER_IN_PERSPECTIVE_MENU
preference to false in your RCP app. This can be done by including a plugin_customization.ini file with your product definition.
Patch the workbench in your RCP app.
Have a look at
org.eclipse.ui.internal.PerspectiveBarNewContributionItem
and
org.eclipse.ui.actions.ContributionItemFactory.PERSPECTIVES_SHORTLIST
Don't include the default
perspective bar in your RCP app.
Instead, create a perspective bar
using org.eclipse.ui.menus, a
toolbar, and the openPerspective
command.
I did some research and the solution did not work as I expected it. Finally I found my mistake.
To set the property in the plugin_customization.ini I tried:
org.eclipse.ui.IWorkbenchPreferenceConstants.SHOW_OTHER_IN_PERSPECTIVE_MENU=false
but this is not the correct notation!!! Please see the correct solution I added finally to the plugin_customization.xml
org.eclipse.ui/SHOW_OTHER_IN_PERSPECTIVE_MENU=false
So the name of the interface or the class specifying the property ist not part of the notation!

Resources