Liferay Hook customization - hook

I wanted to write a hook which will place a new field in new document type along with present ones(textbox, selectbox etc.)."I need That new field which works like dropdown box under Metadatasets as screen shot shows .and also i need to get values from database whenever i select that field in the available fields if we choose "select" it show option1 ,option2 ,option3 .."
Can anyone know which js and jsp files should I edit.? Please help
https://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/lp-6-1-ugen04-document-types-and-metadata-sets-0
i was unable to upload image,Can u plz see the above link.in this page figure 4.6 is the image.

Since Document Types are part of Document library so you can check-out: \portal-web\docroot\html\portlet\document_library\edit_file_entry_type.jsp. and other related pages which might be accessed from this page.
Hope this is what you want, again I would suggest to please pay heed to my comments to your question.

Related

Create two edit button with different settings

I've created a version tracking that will show all the edited document inside view. What if I want to make all document be draft at the same time, and during that, document can't be edit. And after I click save, all draft document will be saved at the same time.
Edit 1
I have one more question when I do version tracking, how can I make all response document cannot be edit? only current document can be edit?
UPDATE QUESTION
Currently, I am using version tracking to show all list with all edit document. So for now, every time I click EDIT, it will show all history of updated.
So I want create a situation where I have 2 edit option which is EDIT and PC Specification. I want to set PC Specification after edit document, it updated all history under version tracking, but for EDIT I don't want it update under version tracking. Because, for EDIT function, it only for edit one or two information BUT for PC Specification, it is to update all information. For example, I have 3 documents inside the "Computer" view.
When I open one document, it will show document details. On top menu, I have two buttons which are Edit and Close Windows. So can I add one more toolbar? Which is PC Spec as below?
So I will click the PC Spec button on the toolbar then the documents will open as a new document with same document information. Same as edit function. After I click save, it overwrite document + show edit history
For another situation where I click EDIT, same as PC Spec but after I click save, it overwrite document only.
As shown below, the history is when document edit using PC Spec only.
Another question, I have "Archived" view. How can I show only history of document inside "Archived" view?
Hope you guys can understand this. Please ask me anything if you not understand. Any help will be appreciated. Thanks! :)
Regarding your second question, to make all response documents non-editable, you will have to
Give your regular users Author access instead of Editor access in the database's Access Control List and assign them a role, which I'll call "AppUsers".
Give yourself and anyone else who will be responsible for managing the app a role which I'll call "AppAdmins".
Add a hidden computed field with type "Authors" to the form and set the initial value formula to
#If(#IsResponseDoc;"[AppAdmins]";"[AppUsers]":"[AppAdmins]")
Note that this will not have any effect on existing documents until you refresh and re-save them.
Then, you're going to have to hope that automatic versioning refreshes the documents. I'm not sure if it does or does not. If it does not, then you're probably going to have to give up on using the native versioning and write your own version using LotusScript. As I recall, that's what was done in the standard Lotus document library template, because the native versioning is pretty limited in what it can do.
As for your first question, I'm sorry but I really don't understand what you're asking. I can't tell in some parts whether you are telling us what you have already done, or what you want to do. Here on StackOverflow, the best way to get useful answers is to show us very clearly what you have tried, tell us what happens, and tell us what you thought should have happened instead. This is a place for helping you fix your code, not a place to get tutorials that amount to explicit instructions on how to write your code in the first place.

Liferay 6.2: Where is the content used on "/home"-page physically saved?

I basically googled for a few hours now but it seems like I can't find the right tags to come to an answer.
I want to know where the content that is shown on the "/home"-page of my Liferay portal is saved. My problem is that the Document and Media-Portlet I want to use is shown as "already in use" but not showing up anywhere on the page. Now I have to delete the portlet from the /home-page at its physical location.
Any ideas where to find it?
TIA
You can check layout table for details that what all portlets are placed on particular page.
In typeSettings column, it stores portlet ids per column.
NOTE:Please mark show edit control, portlet should be visible. There may be chance that its not visible due to that.
Hope this would help.

Customizing the "Upload Document" Form in SharePoint 2010 based on Content type

When you click on the name of a library, go to the documents tab, click on "upload document".
An upload form appears that is created using the dialog framework. The 1st choice on the form is content type.
I need to instead launch a custom infopath form that will allow me to dynamically populate a 2nd dropdown box on the page after the content type (still 1st) dropdown is populated.
I feel like I'm really grasping at straws here. At this point I could use a reference to a relevant section of a book, a link to a relevant post or even just the correct terms to put into a google search. What is the correct name for that form?
I found this which seems to teach you how to insert a customized aspx form: http://microsoftsharepointandbeyond.blogspot.com/2009/10/customizing-ootb-sharepoint-forms.html
But I'd really like one that uses Infopath instead.
Any advice or direction you can provide would be greatly appreciated.
I'm pretty sure doing this with infopath is not possible, the forms are bound to a (codebehind) class in the SharePoint object model, which handles the actual upload (add to list, set field values etc. etc.).
A custom aspx page would be possible though, exactly as the post you mentioned descibes. I agree with the post's author that an HttpModule would be best, because:
editing the OOTB upload.aspx in the 14 hive would make your environment unsupported (i.e. if anything brakes, MS will have you revert your farm to a supported state before they come and help you.
The next time you install an update for sharepoint, your changes could be overwritten.

New site column not displaying in SPF2010

After much trials-and-errors, I've managed to find how to add new columns in Site Pages of our Sharepoint Foundation 2010.
I'll explain using a field called "Category" I created. The problem I have now is that the only way to add or edit my page categories is to first create a new page, enter its title when asked by the pop-up, enter the content of the page, saving, and then going back in to the page properties. That's the only place I'm seeing my new "category" field.
I've set the field as "required", so it's supposed to be filled, but it doesn't seem to matter.
Moreso, I'd like to see the categories of the page I'm looking at at the bottom, for example, but when I open a page I only see its title and content, nothing else.
Can someone help me understand how to manage this? I'm mostly on my own and SPF2010 is not very well documented for a newbie from what I've seen in my searches.
Thanks in advance.
Is your new column called Category part of your default View or whatever View that you are looking at?
Your question reminds me a precision I didn't wrote about:
In the "All Pages" View (if I understand Sharepoint correctly), which is like a list of all the pages of my site, I've managed to add columns for the new fields I've created.
My wish is to be able to enter data for these new fields at page creation, like when we enter the title of a new page, and/or when I go to edit its content.
Only place so far I found to edit my new fields is in the Page Properties, which requires the page to be created first, or in this "All Pages" View where I added my fields. I'd like to categorize my pages as I create them, which could save us lots of time since we're starting our documentation project and nothing has been done yet...

Change template html in sharepoint discussion reply box

I have a wss 3.0 install which needs an "anonymous" discussion board. I can modify the view so no usernames are displayed, however when I click on "reply", the message I'm replying to shows up in the rich text box with the username of the previous poster.
Is there a way to remove that username? or Remove the previous posted text altogether? I've found the schema.xml file with lots of relevant info under the ..12\TEMPLATE\FEATURES\DiscussionsList\Discuss folder, but not sure if this is the easiest way to adjust this setting.
Any comments appreciated.
Best practice says that you should always create a custom list definition instead of trying to modify the OOB assets.
The easiest way to do this is take a copy of the 12\TEMPLATE\FEATURES\DiscussionsList\Discuss folder, modify the feature Ids and names so that its unique. Then your free to change the schema render template (i.e view schema) and modify the edit and display forms.
If you need to modfify the actual entry form you may consider a custom control template : http://msdn.microsoft.com/en-us/library/aa543922.aspx
Custom list definition : http://msdn.microsoft.com/en-us/library/ms466023.aspx
Agrothe,
I have a similar requirement (hide or mask the author inside the reply thread.). What exactly inside of schema.xml do you think will allow you to do accomplish that?
Not sure if the list forms are exposed to xslt. If so, then perhaps this is another approach.
FWIW, the other solutions I have investigated:
(1) A custom event handler. Unfortunately, I can't pinpoint which event fires when someone click reply.
(2) Anonymous blog comments (http://blogs.msdn.com/sharepoint/archive/2007/08/06/anonymous-comment-feature-for-sharepoint-blog-now-available-on-codeplex.aspx).
(3) the other thing I am considering, is to introduce a global anonymous active directory login, which users can use to post anonymously. Not ideal, but for the amount of time I have spent researching a solution, might be my last hope.

Resources