customize the session message of liferay - liferay

I work with liferay 5.2 ,
Liferay display in case of inactivity this message
warning,due to inactivity,your session has espired.please save any data you may have entered before refreshing
I want to customize this message , I want to display this message:
Due to lack of use of the system will be closed
instead of default message,
and also I want to display this message in the middle of the page instead of top of the page.
so I think that I should modify the css of the div of this message in liferay

You need create hook of Language.properties file and change the default value for below key
warning-your-session-has-expired=Warning! Due to inactivity, your session has expired. Please save any data you may have entered before refreshing the page.
so you can put like this
warning-your-session-has-expired=Due to lack of use of the system will be closed.
Thanks

If you read the below link i think you will find your an answer:
Liferay User Feedback - Success and Error Messages in Portlets

This Can help you changing session out message in theme

Related

Get profileDisplayedUserKey on Homepage of IBM Connections

I am developing some widgets for IBM Conections. One of the requirements is a widget on the homepage which will get the user based content.
On a Profile page there you can get ProfileUserkey by calling
this.iContext.getiWidgetAttributes().getItemValue(“profileDisplayedUserKey”);
I want to know if this also applicable for the homepage? Can I get the Profileuserkey by the same method or is there another/better way?
Paul, I already figured it out. iContext has something like getUserProfile() and from this ItemSet you can get directly the email of the current user.

how to show popup when session is timeout and the user is inactive in jsf?

I want the application show a popup to inform inactive user when he back to use the application that the session is timeout and to click on ok to redirect him to login again.
the first problem i cant detect that the session is timeout .
the second problem evenif i detect that the session is timeout how can i show the popup ?
i tryed o detect the session timeout with a listener but didnt work
<f:event listener="#{logincontroller.checksessiontimeout}" type="preValidate"/>
i am using primefaces and glassfish.
The problem with the approach you have chosen is the session has timed out, but you already figured it out. )
The solution could be to use ExceptionHandler.
If you really want to show a popup you can redirect to the same page passing some predefined parameter based on which your popup would be rendered. As an alternative you may consider redirection to login page right away and show notification about session expiration there. The second way looks more natural to me, but this is my personal point of view.
You may find information on how to do this in BalusC blog post
also you may find some discussion on stackoverflow here with references to other similar questions. Those would still point you to the blog post I mentioned earlier

xpages: retrieving database icon

I want to rewrite the lotus notes workspace using xpages.
So far i am successful but one feature is giving me quit a headache.
How can i access the database icon of a lotus notes application.
I tried to access: http://notespath.mydomain.com/$icon. That problem with that is that
it is not using the login from the current session to access the database and
retrieve the icon. Instead it tries to get it using the anonymous id. If the
anonymous id has no access to the database i get a popup to login.
My question is: Is possible to do this with the user that is logged in to the xpage
or is there is a way to export the database icon into a notes document.
Try following instructions here:
How to extract Lotus Notes database icon?
This should give you a method to get to the DXLExporter, and it looks like the icon is in the IconBitmap object. You're still going to get .ico files out though, which aren't ideal, but could be a good starting point for what you're trying to do here.
As Aaron Brake commented, XPages engine cannot access old Domino URL format for icon. Also see this: Image URL when previewed in Notes and in Web Browser
In our applications we use dedicated 32x32 PNG image resource (img_DBIcon) which is used in XPages. Developers need to maintain this image resource.
What´s about if you change your URL to a database icon??
Don´t use http://notespath.mydomain.com/$icon
Try http://notespath.mydomain.com/DB.nsf/$icon

Liferay Scopes: Web Content Display & Page Display

I am starting to use Scopes on a Site using Liferay CE 6.1 GA1. I have one Site, and two scopes within this site: S1 and S2.
I am facing two issues:
When trying to display the Web Content that I added in S1 through the Control Panel, the Web Content Display portlet doesn't display anything. I can select the correct Web Content when selecting scope in portlet configuration as S1, but when I save it, it is simply not displayed on the page. No error message is thrown whatsoever in the console.
When trying to save a Display Page for scoped Web Content (either in S1 or S2), this simply does not work. Once more, no error message is thrown, but the Page Display setting is simply not saved.
Is that normal, a bug, or am I doing something wrong?
Thank you all for your help!
I just tried this in the same Liferay version as yours and it seems to work for mee. Are you sure that you approved the web content? Also, do you have enough permissions to see the content?
This seems to be a bug: http://issues.liferay.com/browse/LPS-28556

How to change ubercart's login text

When a user is redirected to the login screen after clicking the checkout button (because they are an anonymous user), I want to change the login message that reads,"You must login before you can proceed to checkout" to something more meaningful. I have Googled this and searched this site and not found how to do this. Any help would be appreciated.
This message is set in the uc_cart_checkout method in ubercart/uc_cart/uc_cart.pages.inc
See this post on how to override messages as set by drupal_set_message - Alter messages in Drupal 7

Resources