2sxc Content App - Locations - How to convert to Canadian and US Addresses with region/state - region

I am using the latest versions on 2sxc (11.05) and the Content App on DNN 9.06. The Content-Type for Locations does not have a field for Region (or State). Is there already something in place to account for that to get Canadian or US addresses to output normally? I realize I can add the field and then maybe use the Dropdown from Query to hook it up to DNN's list of Regions, and then modify the Views accordingly...
But that seems like a lot of work for something that might already be built in (and I just don't see it?). Or is there another easy way to tackle this?

Truth be told - we never needed that so far, so it doesn't exist.
Is this necessary for maps to work, or just another field which a standard us-address needs? I'm curious because neither outlook nor SharePoint seem to require such a field, so I never really thought about it.
BUT: if you do implement it, please do share it back with us, so we can publish it.
Note that if this is important, a possibly nicer solution would be to use a public api somewhere which provides this information, as it's most certainly more complete & up to date for this purpose. If this is the case, ping me and I'll implement a string-dropdown-from-json or something like that :)

Related

NetSuite 2015_2 PHP-SDK Two Factor Authentication

We currently have Two Factor Authentication working in the 2017_2 release of the NetSuite PHP Toolkit, but we have some code that has broken due to changes between 2015_2 and 2017_2. It seems that in 2017_2 it is also far easier to set up Two Factor Authentication.
Looking at the code, however I do see references to TokenPassport and TokenPassportSignature, which tells me that I should be able to get TBA working in 2015_2, which would give us time to figure out the rest of the issues.
My question is: How would I actually go about that? I have set $service->passport to the generated TokenPassport object. I know that my TokenPassport object works in 2017_2, and I assume it would be the same, but I don't know for sure, and I can't seem to find any information up on Elgoog.
ETA: I have seen examples of this working in 2015_2 in Ruby, but not in PHP. The backend is there, but I can't seem to be able to do this in PHP, and the Ruby examples were only snippets.
Okay, so I solved this for myself, but I may not have done it the "right" way. Here's what I did:
I took the makeSoapCall and setTokenGenerator methods from the new instance of NSPHPClient.php, and I added them to the OLD version. I had to modify the setTokenGenerator method to not require an instance of iTokenPassportGenerator, but I could have just as easily copied over that interface as well.
Basically, all that needs to happen is that we need to send the tokenPassport header, which the older version of the SDK can generate but doesn't have a method to actually send that I could find.

Search a specific search of a journal article based on the user type

I have this requirement:
We have a journalarticle and we wish to have sections which have content for internal and external users for the application.
We are able to hide the content from rendering by implementing custom template on web content display and using a simple custom-field for a user which helps us to classify it.
Having said that when we search something as an external user, the search portlet is able to fetch an article where the search text is a part of internal user content, and due to the above mentioned template the content is not visible.
In short, from the user's perspective the resultant article does not match the searched term.
I wish to seek some pointer to check whether there is a mechanism to ensure that when an external user searches something then we only search the dynamic-element of the doc which matches the user type?
We have thousands of such articles and create multiple copy of the same article does not seems viable solution.. so any pointers would be a great help.
Liferay version : 6.2 GA4 CE
Thanks!
AJ
First of all: Not finding a search term in a document can be a sign of good working synonym resolution in the search engine. It's questionable if this behaviour is always wrong or only in this particular case. Remember google bombs?
That being said, I believe that this architecture of half-visible documents is flawed from the beginning. Ideally I'd suggest to change it, for example by splitting the information to two articles, so that you can use the standard permissions to resolve. If you link both, you can determine how/which article or template to use. It's not an ideal solution, but might be a workaround.
Another workaround might be to change Liferay's indexer component and index two different versions of the article, with two different permissions. Of course, you'll have to change the search side as well, so that you'll find each article at most once, even if it's now twice in the search engine.
Again - not ideal, but might be the quickest fix that you can get right now without changing the underlying architecture. However, to change the underlying architecture is my actual recommendation.

Liferay Structure Predefined Value

Which table in Liferay stores the predefined values given for a structure.
Also is there a facility in Liferay to populate these values dynamically using webservices?
The API used to be JournalStructureService, however, as the documentation states, this has been replaced with the Dynamic Data Display API, which, for example, you can find under DDMStructureService in version 6.2.
This gives you a hint where to find the underlying data, however, you don't want to manually write to the database. You do want to use the API to change values. Trust me. Consider the database to be an implementation detail and leave it alone - if nothing else to make your next upgrade experience easier. You should never change any values in the database manually without knowing exactly what you're doing. And, trust me, the keyword here is "exactly", and you'll fail to know all the possible side effects. Don't touch it.
As said #Olaf, depends on Liferay version you will need to use the JournalStructureService or the DDMStructureService. So, if you want to use the Liferay Service by web api you have two options the Axis api where you can obtain WSDL (domain:port/api/axis) or you can use the Json api (domain:port/api/axis). In many cases you are going to need a token to use this services.

Export list of Sitecore items as Excel (or other formats)

I noticed that sitecore has the option of exporting users in an Excel format.
I need to have similar functionality for exporting 'participations', (a users can enlist to take part in an 'event', and if their entry is approved via a sitecore workflow, a 'participation' item is created in the content tree)
Since mostly everything in Sitecore is in essence based on items, and I want to export items to Excel, my question is - what are some of the best ways of doing this?
Questions:
Is there a way to re-use this functionality for regular items?
Would it be a good idea to create a custom admin page (any tips on doing this?) which has some custom code that reads the items from the database using the API?
are there sitecore plugins/shared source projects that can help me achieve this?
Or does anyone have a better idea? - would it be better to just store the participations in SQL? I'm mostly doing it this way because I want to make use of the 'free' functionality offers, for example workflow, but if that leads to me using anti-patterns please shoot me ;)
Link is different now: https://marketplace.sitecore.net/en/Modules/Advanced_System_Reporter.aspx
P.S. Couldn't leave a comment to original answer as I don't have enough reputation. Oh well :)
Found a most excellent shared source module which does exactly this (and much more)!
Basically it allows you to configure (and easily extend, if you need to) any kind of table based report on 'items'.
The report module shows up as an application in the sitecore menu (like the user manager tool) and comes with features such as xml,csv, xls export. It's also really easy to set up, once you get the hang of it.
http://trac.sitecore.net/AdvancedSystemReporter

Can I associate custom metadata with an ALAsset?

I'm building an iPhone app that, among other things, allows the user to take and store photographs associated with locations. I am currently using the ALAssetLibrary to allow the photographs to be stored in Photos and be accessible outside the app (on a computer for instance via the built-in mechanisms). There is not a lot of technical content out there for working with the ALAssetLibrary but from what there is I have managed to cobble together a working version of this. I have had to resort to storing a dictionary of photo URLS in my app and manually detecting if the photo still exists when displaying lists of them because there does not seem to be a way to add custom metadata to an ALAsset.
What I would really like to do is add two custom metadata fields to each asset to provide it with a title and a custom id value that I can use to filter on when enumerating the asset library.
As a secondary task, I'd like the user to be able to update the title metadata.
Can it be done? At this point, I really don't think it can because the API really doesn't seem to provide the necessary methods to get/set custom metadata. I'm hoping against all odds that there is some other aspect to the AssetLibrary framework that I have not yet discovered.
At a minimum, if someone can authoritatively say "NO" then at least others might find this breadcrumb on their own trail of hope and change tack more quickly!
And, having 0 reputation I can't tag it with AssetLibrary :( wow, this day is just going downhill. FML
I've been looking over the documentation and I dont think it is possible to tack on additional fields to the ALAsset object, well you can create your own object or extend theirs but that wont help you when your pulling back assets because you'll need to init yours and populate it then.
Look I know this falls short of a really good answer but I had to try.
The ALAsset class documentation describes a property - customMetadata. This is documented to be an NSDictionary of whatever custom tags you want. Currently, however, it is not implemented in the class (I've raised a bug on Apple's developer site to bring the issue up).

Resources