multiple node reference formatted in drupal7 - drupal

In my website, I have a section for documents. Those documents are available in different languages.
When I show those documents, I want to group them to have an input like that :
Document-001 [ENGLISH] [DUTCH] [CHINESE] [FRENCH]
... and when we click on "english" , it download the english version.
How can I do ?
Right now, I have a CCK named "documents" where I put files and description. I'm trying to use them to show it like the example above but I didn't found the way to.

I used the "Field collections" Module to set "Document" and "Language" fields.
With that implementaion, in every node, I can attach multiple documents and languages.

Related

How to get multilingual sites after Wikidata reconciliation in OpenRefine

I have a column of reconciled entities in OpenRefine which include entities like Q56085233 and I would like to retrieve all links inside "Multilingual sites", if possible with a separator or only one at a time.
That is Q56085233, for instance, has two pages, one from "commons" (https://commons.wikimedia.org/wiki/Category:Wikimedia_Tamazight) and the other one from "meta" (https://meta.wikimedia.org/wiki/Wikimedians_of_Tamazight_User_Group).
Is there a way to retrieve both websites from the "Add column from reconciled values" function? Moreover, is it possible to first call only "meta" pages, and then only "commons" pages?
The Wikidata reconciliation service supports special "properties" to fetch such things, as documented at https://wikidata.reconci.link/ (look for "special properties" there).
The links inside the "Multilingual sites" are called "sitelinks". For meta.wikimedia.org they can be fetched by using the Smetawiki code in the "Add columns from reconciled values" dialog. You could similarly fetch sitelinks for other Wikimedia sites (Sitwiki for the Italian Wikipedia, for instance).

Drupal 7: In Views, how could I order/sort in this manner?

Say for example I am printing name tags for thousands of content nodes in one content type called “Attendee.” Each of these nodes specifies a single "Attendee" for an event, (and their respective name tag). Say these attendees also needed name tags printed out for their “friends” who are attending with them. That is no problem—these “friends” obviously need their own node with the same fields to get their own name tag, so I distinguish that they are a “Friend of an Attendee” with a simple checkbox.
Now here’s the sorting order / grouping problem: When rendering the view, I need these “friends of attendees” to appear “right after” the attendee they are going with. Is there a way for me to maybe create a new autocomplete text field to link these together and then have them output next to each other?
p.s. I am technically using the Views PDF module, but it has the basic Views functions, so if it's possible with Views, it will probably be possible with this module.
In order to group these together, you have to have some way of linking friends to the attendees. You can do this by adding an entity reference field to the content type. See https://drupal.org/project/entityreference
here are the steps:
from admin/structure/types select "manage fields" on your content type
on the "manage fields" tab, click in "Add new field", and type in a label name. say "friend of"
for "type", select "Entity Reference", and for now, choose "Autocomplete" for your widget
click save
in the field edit tab:
select Target Type: Node
under Entity Selection, set Mode: Simple
set Target bundles: ( your attendees type )
click save
go to admin/config/development/performance and clear all caches
You should now see an autocomplete field when you edit an attendee that you can use to set the friend relationship
Things normally get a bit complicated now, as you have to tell views about the relationship between attendees and their friends. If you want to keep this dead easy, you can set the primary attendees as their own "friend" ( who they are going with ) so that you can group them together easily with their companions, without having to worry about contexts, relationships, or any other fancy stuff.

Editing a Remedy User macro file.ARQ

Using BMC Remedy User v7.5 p004 to track/manage incidents. This tool has an option to record macros which are saved as a .ARQ file, I can open this file in Notepad++ but it is quite jumbled.
What I am trying to do is allow someone to search incidents based off of the summary that is put in the Working Log under the WorkInfo tab. I know that you can record macros that allow you to enter search variables that will prompt the end user, but when recording a macro the workinfo section is deactivated. So I would like to edit some pre-existing macros to try end create what I need.
SQL for what I want to pull
SELECT incidentno, summary, notes, summary*, notes*
FROM whatever the main table name is
WHERE WorkInfoType = WorkingLog
Note that the reason there are two summary and notes fields is because two of the fields are under the WorkingLog and the other two are fields listed for the whole incident. The BMC naming convention difference for these different fields is the *
Solved this by recording a macro out of the advanced search form within the incident management console. Within that form you can select the fields you want to search and there is an advanced button that brings up a query box for more complicated searching. After changing WorkInfoType on the form to equal "Working Log" I used the following advanced query to finish off the rest of the search.
( 'Summary' LIKE "%$Search Technical Name$%") AND ( 'Incident Status' = "Resolved" OR 'Incident Status' = "Closed" ) AND ( 'Assigned Group' = "Group1" OR 'Assigned Group' = "Group2" )
Note: When recording a maco you can enter $VariableName$ to make a variable. This will allow a user to enter text in a search box for whatever field you make a variable. So for example in the query I made a variable called titled "Search Technical Name", and this prompts the user to search the summary field when running the macro. Also, the % act as a wildcard search which will hit on not exact matches.

Drupal 7 Views 3: Exposed Filters that search specific FIELDS

I'd really appreciate some help with this.
I'm trying to create two different exposed filters in Views. I currently have 6,000 nodes with 75 fields each inside one content type. I'm using a Page View with an exposed form in a block. I also have the Better Exposed Filters module installed.
The first one, I want to make a text box for searching terms, but have it only search my specified fields. I would have it search 3 fields (to do a search on the full name): First Name, Middle Name, Last Name. They are all in different fields. The only thing I've been able to make it search so far is EVERY TERM in a content type (where it searches every field, not just name). I did that by exposing this filter:
Search: Search Terms
The terms to search for.
The next filter I am trying to do is for the field "Graduation Class." It might be best to do search terms for this too (if I can figure out how to search ONE field, like above), but I was hoping to have a select dropdown that lists every Graduation Class. These classes in this field range from 1905-1972. When you click a year in this box, it filters the current results by that year.
This sounds pretty basic, but I can't seem to get it and would REALLY appreciate some help.
For your reference (if needed), here are the types of filters I can add. (Off topic: I'm actually not so sure what the ":format" ones exactly are). For the "Content:" filters, I'll only show the "Name" ones, because there are 73 others. Many of these filters are from the Feeds module, because that's what I used to import my nodes:
Content: First Name (field_cinfo_fname)
Appears in: node:cadet.
Content: First Name (field_cinfo_fname:format)
Appears in: node:cadet.
Content: Middle Name (field_cinfo_mname)
Appears in: node:cadet.
Content: Middle Name (field_cinfo_mname:format)
Appears in: node:cadet.
Content: Last Name (field_cinfo_lname)
Appears in: node:cadet.
Content: Last Name (field_cinfo_lname:format)
Appears in: node:cadet.
Content access: Access
Filter for content by view access. Not necessary if you are using node as your base table.
Content revision: Log message
The log message entered when the revision was created.
Content revision: Title
The content title.
Content revision: Updated date
The date the node was last updated.
Content revision: Vid
The revision ID of the content revision.
Feeds item: Import date
Filter on a Feeds Item's import date field.
Feeds item: Item GUID
Filter on a Feeds Item's GUID field.
Feeds item: Item URL
Filter on a Feeds Item's URL field.
Feeds item: Owner feed nid
Filter on Feed Items by the Feed they were generated from using the Node Id of the Feed Node.
Feeds log: Feed node id
Filter on a Feeds Source's feed_nid field.
Feeds log: Importer id
Filter on an importer id.
Feeds log: Log time
The time of the event.
Feeds log: Request time
The time of the page request of an event.
Feeds log: Severity
Filter on the severity of a log message.
Feeds source: Feed node id
Filter on a Feeds Source's feed_nid field.
File Usage: Entity type
The type of entity that is related to the file.
File Usage: Module
The module managing this file relationship.
File Usage: Use count
The number of times the file is used by this entity.
Page Title: Title
A Page Title alternative to the Node: Title field.
Search: Links from
Other nodes that are linked from the node.
Search: Links to
Other nodes that link to the node.
Search: Search Terms
The terms to search for.
I might be mid-understanding you but don't you want to use:
Content: First Name (field_cinfo_fname)
Content: Middle Name (field_cinfo_mname)
Content: Last Name (field_cinfo_lname)
as your filters?
I'm guessing your fields are text areas which is why you've got the :format options; 'format' is another column in the longtext field type so will be available (just like 'alt' and 'title' would be available for an image field type).
If I understand the question correctly, you've got three name fields and you want a single text box to search all three fields. The easiest way to do this is to combine those three fields into a single field that is not displayed but can be searched using an exposed filter. One option is to use the Auto Nodetitle module to make the node title a combination of the three names. (I do this a lot with personnel directories so that a given entry displays as Lastname, Firstname). Then you could search on a the node title in your exposed filter.
If using the title is not an option for your project, you could add another field to your content type, eg: full_name, and write a small module to implement hook_node_save that would simply fill in the full_name field with "first middle last" whenever a node is saved. Then remove the full_name field from the display and use it for your exposed filter.
re: graduation year: If you're using a "List (Integer)" field type, that should be no problem. If you're using a plain text field type, that makes things more difficult. If you are using plain text, you may want to redo the field so that you could do cool filters such as "graduated before 1950" type filters or using jQuery sliders to select a range of graduation years.
Hope that helps.

Drupal6 views: output "taxonomy:all terms" field with two terms as two links

Briefly: I'm making a custom view, I want a field listing the two taxonomy terms associated with an NID to output as two distinct links which return arguments for the view (term1 to view/term1, term2 to view/term2. Rather, it outputs as one aggregated link (both term1 and term2 output view/term1%0Aterm2.
Am I doing something wrong or is this not possible?
Exhaustively:
I am constructing a view of products (with the page output at http://example.com/products) in an drupal ubercart site because the built-in ubercart catalog psuedo-view isn't doing it for me. Some of these products belong to more than one taxonomy term (within the same vocabulary) - for instance, product_example1 belongs to terms blue and glowinthedark, product_example2 red and glowinthedark, product-example3 just blue.
I've created an argument which limits the view based on terms like so: products/red, products/glowinthedark etc returns this nice view I made but only with products which are associated with taxonomy terms red, glowinthedark, etc - so works as it should. Views is awesome!
Now, I want each product shown in this view to link to the generated product/[term] page(s). Outputting the field "taxonomy:all terms" as a link with replacement argument products/[tid] works for one term (product_example3's field works for its one term: /products/blue (views is awesome!) , but, AND HERE'S THE PROBLEM, it DOESN'T FOR TWO TERMS (or I assume more than two terms). This is true whether the field is output as a list or using a simple seperator. So, for product_example one, the field lists both terms blue and glowinthedark (correctly separated as list items or with the chosen "," simple separator), but both terms output the relative link products/blue%0Aglowinthedark.
Is that clear? I haven't been able to google anyone with a similar situation, strangely, although I can't imagine I'm the first to run into this. I may just give up since it's not all that important and I can think of several less-satisfactory but still doable workarounds, but I thought you all might have some insight. The only thing that gives me hope is that when the "Link this field to its term page" check box is selected, views successfully outputs two separate line items with links to the two separate terms' pages.
I'm also posting this question on Drupal.org. Thanks for your time!
Hmmm... strange. I read your question carefully. However I am getting the results that you desire!
I have a taxonomy vocabulary that is multiple select (lets call it "Sector")
I have a taxonomy vocabulary that is single select (lets call it "Location")
In my fields section, I add Taxonomy: All Terms
In the settings for Taxonomy: All Terms I select "Output this field as a link". In there, I set the "Link Path" to product/[tid]
I make sure "Link this field to its term page" is NOT checked
I use a simple comma separator
"Limit terms to a specific vocabulary" checkbox does not matter. It would depend on your business requirements.
As required by you I get products/abc, products/xyz etc. one after another on a single line. This works even if a particular node has multiple terms from the same taxonomy vocabulary. I don't get any %0A stuff.
This works out of the box for me. I tried with both views 2.11 and views 3.0-alpha3
Try upgrading to the latest version of views and see if you have better luck?

Resources