Fórumok

Scope of asset publisher

Alessandro Cosenza, módosítva 13 év-val korábban

Scope of asset publisher

Junior Member Bejegyzések: 84 Csatlakozás dátuma: 2009.11.19. Legújabb bejegyzések
Hello,
In Liferay 6 you can configure asset publisher to show content from different scopes.
Is there a way to have other communities in the "Available" list (on the right) so that I can select some?
Actually I can see only the Global community.

Thanks.
Ricardo Vieira, módosítva 13 év-val korábban

RE: Scope of asset publisher

Junior Member Bejegyzések: 54 Csatlakozás dátuma: 2010.08.16. Legújabb bejegyzések
did you find a way to do this ? I could use this too, since the global scope doesnt support DL emoticon


I'm looking through the .jspf files of the asset publisher portlet, trying to figure out where it gets the scope id's, to see if i can change it to get all companyId's, but so far i cant find the right place, any hints would be greatly appreciated emoticon
Alessandro Cosenza, módosítva 13 év-val korábban

RE: Scope of asset publisher

Junior Member Bejegyzések: 84 Csatlakozás dátuma: 2009.11.19. Legújabb bejegyzések
replace in configuration.jsp of asset publisher portlet the following code (is about 296 row):


for (Layout curLayout : LayoutLocalServiceUtil.getLayouts(layout.getGroupId(),layout.isPrivateLayout())) {
  if (curLayout.hasScopeGroup()) {
	groups.add(curLayout.getScopeGroup());
  }
}


with


for (Group group : GroupLocalServiceUtil.getCompanyGroups(company.getCompanyId(), -1, -1)) {
   if (group.isCommunity() && group.getType() == 1)
           groups.add(group);
									
}


hope it works for you
Ricardo Vieira, módosítva 13 év-val korábban

RE: Scope of asset publisher

Junior Member Bejegyzések: 54 Csatlakozás dátuma: 2010.08.16. Legújabb bejegyzések
Great, this works

thank so much Alessandro emoticon
thumbnail
Sven Werlen, módosítva 13 év-val korábban

RE: Scope of asset publisher

Regular Member Bejegyzések: 117 Csatlakozás dátuma: 2009.02.25. Legújabb bejegyzések
For those who don't want to change the original source code of Liferay, we made a plugin (hook) that makes the asset publisher list organizations and communities in the scope.

https://projects.savoirfairelinux.com/wiki/ctr-liferay/Hook_for_Asset_Publisher_605
Alessandro Cosenza, módosítva 13 év-val korábban

RE: Scope of asset publisher

Junior Member Bejegyzések: 84 Csatlakozás dátuma: 2009.11.19. Legújabb bejegyzések
thanks sven, of course my changes are intented to be made in a hook plugin emoticon
thumbnail
Sven Werlen, módosítva 13 év-val korábban

RE: Scope of asset publisher

Regular Member Bejegyzések: 117 Csatlakozás dátuma: 2009.02.25. Legújabb bejegyzések
Actually, I hope that Liferay will soon include that fix into the asset publisher. Currently, the "Scope" option in the asset publisher is useless. It's probably a bug. Have you created a ticket for it?
Kevin L, módosítva 13 év-val korábban

RE: Scope of asset publisher

New Member Bejegyzések: 2 Csatlakozás dátuma: 2010.08.15. Legújabb bejegyzések
Sven Werlen:
For those who don't want to change the original source code of Liferay, we made a plugin (hook) that makes the asset publisher list organizations and communities in the scope.

https://projects.savoirfairelinux.com/wiki/ctr-liferay/Hook_for_Asset_Publisher_605


Thank you for this valuable hook. I have the same need to add community in the scope, so this solves the issue.

However, in Asset Publisher configuration, if I add filter, somehow it cannot get the document from the community. For example,

1. In community ABC, I upload a document in community document library and tag it "xyz"
2. Under the global page, I add an Asset Publisher portlet. In configuration, I choose the scope "ABC", then save.
3. The document title I upload in community shows up in the portlet.
4. I change configuration by adding a new filter "Contains Any of the following Tags "xyz", then save.
5. The document somehow disappears from the portlet.

If I have documents with the same tag in the global document library and choose global scope with the same filter in asset publisher configuration, it display the document in global document library fine.

So somehow, the filter does not seem to work right if I choose the community scope.
thumbnail
Sven Werlen, módosítva 13 év-val korábban

RE: Scope of asset publisher

Regular Member Bejegyzések: 117 Csatlakozás dátuma: 2009.02.25. Legújabb bejegyzések
That's because the tags/categories you can select for filtering are coming from the current community (and not the one you selected in the scope). Tags/categories are attached to a group (organization/community).

We implemented a fix for that as well. In your case, you would have to:
1. Select the scope
2. Save the configuration
3. Select the filter
4. Save the configuration

Let me know if this interests you. We'll then package the fix and publish it.
thumbnail
Sven Werlen, módosítva 13 év-val korábban

RE: Scope of asset publisher

Regular Member Bejegyzések: 117 Csatlakozás dátuma: 2009.02.25. Legújabb bejegyzések
The asset publisher hook is now available on Liferay Community Plugins page:
http://www.liferay.com/downloads/liferay-portal/community-plugins/-/software_catalog/products/6268657

We created a new version that improves the configuration for "categories" (but not for tags yet).
thumbnail
Simon Gołębiewski, módosítva 13 év-val korábban

RE: Scope of asset publisher

Regular Member Bejegyzések: 246 Csatlakozás dátuma: 2009.06.08. Legújabb bejegyzések
Sven,

I think you should fill a ticket in liferays JIRA for that and submit your hook beacuse it's so damn good. There are many places in Liferay that are unusable and you have fixed one of it emoticon

Cheers,
Szymon
thumbnail
Sven Werlen, módosítva 13 év-val korábban

RE: Scope of asset publisher

Regular Member Bejegyzések: 117 Csatlakozás dátuma: 2009.02.25. Legújabb bejegyzések
Thank you!

I followed your advice and created a ticket.

We just released another portlet that might interest you:
Web Content Archive
thumbnail
Simon Gołębiewski, módosítva 13 év-val korábban

RE: Scope of asset publisher

Regular Member Bejegyzések: 246 Csatlakozás dátuma: 2009.06.08. Legújabb bejegyzések
I saw that one yesterday and it's superb. We gonna use it in our next project and we gonna add another view in which it will look like a calendar with days that contain web content beign underlined. I think you should also submit that one to the liferay repository emoticon
thumbnail
Sven Werlen, módosítva 13 év-val korábban

RE: Scope of asset publisher

Regular Member Bejegyzések: 117 Csatlakozás dátuma: 2009.02.25. Legújabb bejegyzések
Thanks!
The portlet is available in the liferay repository. You might have to refresh your repository (there is a link at the bottom of the page for it) to see it in the portlet list.

The idea of the calendar view is great! We would be more than happy if you could share it as a contribution.
thumbnail
Simon Gołębiewski, módosítva 13 év-val korábban

RE: Scope of asset publisher

Regular Member Bejegyzések: 246 Csatlakozás dátuma: 2009.06.08. Legújabb bejegyzések
Sven,

I've played with your hook and it's missing one thing. You don't show users community (My Community). AS RoK mentioned in comments here it would be nice if we can show on main page of our sites what users posted in their scopes.

So if you could add to your hook option to also show users communities it would be great.

Also something for the future:
  • currently Admin A of Organization A can configure asset to show WCs from Organization B to which this admin doesn't have permissions (he doesn't belong to that org). So this hook should check that.
  • If Admin A configures asset to show WCs from Organization B (we assume he has privileges to to that) there are still articles that should be restricted only to Organization B. Currently in Web Content Edit page you can set "Viewable by" but there should be also an option "Power Users (this Community only)". Also all portlets should now how to handle and show web contents with such permission. Maybe they will do that out-of-the-box - I don't know.



If you want I can be your tester for this hook emoticon
thumbnail
Sven Werlen, módosítva 13 év-val korábban

RE: Scope of asset publisher

Regular Member Bejegyzések: 117 Csatlakozás dátuma: 2009.02.25. Legújabb bejegyzések
Simon Gołębiewski:
I've played with your hook and it's missing one thing. You don't show users community (My Community). AS RoK mentioned in comments here it would be nice if we can show on main page of our sites what users posted in their scopes.


We'll take a look at that. Unfortunately, we are quite busy for the next 2 weeks and I'm not sure we'll be able to fix it very soon.

See Request
thumbnail
Simon Gołębiewski, módosítva 13 év-val korábban

RE: Scope of asset publisher

Regular Member Bejegyzések: 246 Csatlakozás dátuma: 2009.06.08. Legújabb bejegyzések
Sven Werlen:
The portlet is available in the liferay repository.


I'm talking about Liferay Inc. Liferay Core repository emoticon
Kennedy Alagappan, módosítva 12 év-val korábban

RE: Scope of asset publisher

New Member Bejegyzés: 1 Csatlakozás dátuma: 2011.09.28. Legújabb bejegyzések
Sven Werlen:
That's because the tags/categories you can select for filtering are coming from the current community (and not the one you selected in the scope). Tags/categories are attached to a group (organization/community).

We implemented a fix for that as well. In your case, you would have to:
1. Select the scope
2. Save the configuration
3. Select the filter
4. Save the configuration

Let me know if this interests you. We'll then package the fix and publish it.



I am interested in this. I need to pull all the webcontent created with the specified categories in the selected Organization, should show up in this asset publisher. Could you please let me know.

Thank you for your help
thumbnail
Sven Werlen, módosítva 12 év-val korábban

RE: Scope of asset publisher

Regular Member Bejegyzések: 117 Csatlakozás dátuma: 2009.02.25. Legújabb bejegyzések
Did you try the hook?
It should work for your use case.
thumbnail
Hugh Martin, módosítva 12 év-val korábban

RE: Scope of asset publisher

Junior Member Bejegyzések: 75 Csatlakozás dátuma: 2010.06.15. Legújabb bejegyzések
Sven, we're considering your hook as well. Before we do, I just wanted to check in to see if there had been any unpublished advancements? Thanks.
thumbnail
Sven Werlen, módosítva 12 év-val korábban

RE: Scope of asset publisher

Regular Member Bejegyzések: 117 Csatlakozás dátuma: 2009.02.25. Legújabb bejegyzések
No. We didn't use it for 6.1 yet but the hook is actually extremely simple.
Also, make sure that you'll not use "staging" environment but this hooks doesn't work with it (only contents from the current organization are published to remote).
thumbnail
Hamish Campbell, módosítva 11 év-val korábban

RE: Scope of asset publisher

Junior Member Bejegyzések: 87 Csatlakozás dátuma: 2008.08.20. Legújabb bejegyzések
Used to use this hook, we just updated to 6.1 latest CE and we have lost the functionality we need, is the a new version of this (:

Think this is the same as this http://www.liferay.com/community/forums/-/message_boards/message/12536810
thumbnail
Hamish Campbell, módosítva 11 év-val korábban

RE: Scope of asset publisher

Junior Member Bejegyzések: 87 Csatlakozás dátuma: 2008.08.20. Legújabb bejegyzések
any chance you could make the hook for 6.1?
Alexander Ishmuradov, módosítva 10 év-val korábban

RE: Scope of asset publisher

Junior Member Bejegyzések: 48 Csatlakozás dátuma: 2013.03.18. Legújabb bejegyzések
Thanks a lot!
I managed to do the same on 6.1.1 GA2 CE. But there is one issue with roles: if I show Web Content from Community Site there is no button "Add New >" in Asset Publisher, even if I define "Add Content" permission to the Site (Community) role. Only if I add this permission for regular role this will lead to the appearance of the button.
I suppose it is necessary to correct the file "add_asset.jspf", but I do not know exactly how.

Please someone help with this..

Alexander
thumbnail
Gabriel Leon Leyva, módosítva 10 év-val korábban

RE: Scope of asset publisher

Regular Member Bejegyzések: 243 Csatlakozás dátuma: 2009.06.20. Legújabb bejegyzések
Having the same problem