Drupal 7, Views, Groups, and Feeds - Creating View for Feed Items in a Group - drupal-7

Before I get into the details, here is the overall goal:
I want to have a group of users which get access to a feed, and any new items that appear in that feed they will get access to as well.
Details:
I am using Organic Groups, Feeds/Feed Items, and Views. I have setup a single Organic Group and added a single user to it. I have taken a Feed and added it to the group as well.
I have tried a few different combinations of the queries for Views and here is where I am at currently: http://cl.ly/2T1a0s1A0j3A0I0d3i1u
There is a relationship setup between the Feed and the Feed Item. There is a filter setup that says if the user has permission to view the Feed they should be able to see the Feed Item.
However, when I login to the user account and visit the URL (which used to just be static and take no arguments, ignore the % I just added) I get a blank page.
It would be great to get some help figuring out this problem and/or some pointers on how to debug it + learn more about Views and how I could use Views/OG to solve this problem.
Thanks,
David

The best way I did OG Groups was to create the group under content type. Once that is done. go back into content type and click on Feed scroll down to OG Groups tab click on it. You should seeNODE in the drop-down box and Groups in a select box below. Make sure node is clicked and Group is highlighted. Click save and now do the same for Feed Item. There is one thing to be mindful of, when the feed imports, it will be bundled with the group however the feed it self will be separate from the nodes created linked only by the group. One way to make it easier to manage is to place the feed and the feed items into the same book when setting up the feed. It akes life much easier that way.

Related

Salesforce Screen flow search and display record information

I'm working on a screen flow. The idea is to have a lookup component the user can search a contact. Then I would like to display the information from the Contact (Account Name, Contact Name, Number Email) and I would like to be able to have the user update that information if needed. I just stomped on how it can be done. I know it should be able to be pulled from the record ID in some type of way and maybe use an Assignment to display the information. Can someone guide me on a next step or if anyone has an instructional video would be helpful.
Thanks
You wouldn't be able to display the looked up contact's fields on that screen as soon as you populate that field. That would be something only possible in code (aura component or lwc).
What you can do, however is -
Get Record element after that screen element. (Get Contact, where Id = lookupcomponent.recordId)
Then EITHER:
use the new Fields (BETA) option on another screen Fields (BETA)
(this method is easier, doesn't have as much control and is limited on fields, depending on data type, you can use)
add inputs one by one and set the default values Add Fields One By One
(this method allows more control)
Then, you will need an update element. If you used the Fields (BETA) you can just update the record variable. If you did the inputs one by one, you will need to update the contact and set fields individually.
Full Flow Example

Iframe content not able to save in module params Joomla

I am using Joomla3 with tinymce editor. I have created one module and adding one params in textarea
I am adding iframe code
in text area
but it's not saving. If i am save normal text string then it's saving
Please help me
I believe you need to add a filter to your xml code.
such as:
filter="RAW" or, probably more appropriately, filter="HTML"
This will keep Joomla from cleaning your code. There are a number of filters available to XML fields when creating modules. You can examine the code here: https://github.com/joomla/joomla-cms/blob/master/libraries/joomla/filter/input.php#L167 to see the exact list.
What user group is the account you are using a member of? Super Users and Administrator group types should have no filtering set by default but it sounds like you might need to edit those settings.
From the main menu:
System > Global Configuration > Text Filters (tab)
You will see all the available user groups for you website. The group your user belongs to should have a Filter Type of No Filtering. Another important note is its better to add the user account to a group with the permissions then to arbitrarily adding it to a group type typically reserved for registrants, guests or low-level editing.

Summer camp event registration with Drupal 7

I'm building a site for a summer camp using Drupal 7, and I'd like for it to allow parents to register their kid(s) for week(s) at camp and then pay for it.
Creating an "event" for purchase in Ubercart, and using the pay per node module is the best way i can find to make this happen, a la the great tutorial series done by Pete Yaworski. Unfortunately, this means that parents have to fill out the fields for each week of camp purchased for each kid making this a multi-step process as many parents have 2 or more kids that they register for 2 or more weeks of camp.
I tried thinking about this in in terms of the Organic Groups and Profile 2 modules, where parents can create "kids" as nodes or sub-users, and I also tried the Field Attributes module to incorporate fields as product options, but I failed to come up with any useful implementation.
I think the best option is to allow Parents enter information about their kids (ie. name, age), possibly by entering each kid as a node. Ultimately, I'd like them to be able to purchase individual camp weeks and check a checkbox to indicate which kids are associated with each week, and have it all go into one cart for one purchase.
I'm just brainstorming at this point because I've just hit upon a lot of dead ends. Thanks for your help!
Well, it's been a while and i thought i might share what i've learned. Just to note, i switched to Drupal Commerce, which i think is much better equipped to handle this type of business.
The site is more focused on one user registering multiple people (kids) for multiple events, so having to fill out a registration form for each person specifically for each event that person is being registered for is a bit annoying, and bad UX. Instead, i allow registered users to complete a form (name, address, contact, etc..). Upon completion of the form, they are given a new user role via Rules which allow them to create content of type "kid". This is really sort of an extra step for the specific summer camp site; we expect the kids to have the same address/phone/etc.. as their parents. The parents can create "kid" nodes filling in field like "allergies" "health concerns" "age" and "name". These nodes are passed through a View with a Contextual Filter based on the User viewing the View; the View shows only content created by the User, and only shows field "name". This is then given as an entity reference to a Line Item Type using a checkbox/radio widget. Events can then be created as Products and given that Line Item Type. When a User is viewing the products he/she will see the "Name"s of the "Kids" they have created as choice next to the "add to cart" button. Conveniently, everything in Drupal Commerce from Products to Orders can be interpreted though views, so as long as the "kid" is attached as a line item, it's easy to organize the info about who registered who for what event when, and retrieve further details about all of that.
So, Parents are able to register with the site, fill out basic information, enter in information for each kid they want to register, then select which kid they want to register for which event. More useful, on the backend, the admin can see which kids are registered for which event, as well as who their parents are, how to contact them, and any important info specific to that kid.
Hope this helps anyone doing a similar project. :-)

Show Opportunity related Contacts in Custom Object Field

I have the next issue.
I have a custom object called 'Application', and I have this requirement:
"Show all Contacts related to an Application. Create a field on Application object, must be read only".
I solve it with apex code. 'Application' has a lookup to Opportunity, Opportunity to Account, and all my contacts have AccountId, so this way, I get all the contacts using apex code in a trigger.
But, I've been ask to change this to a Formula field in Application object.
So, my issue is next. I'm not able to get all contacts with advance formula editor, because they're not part of any object. I have no master-detail relationship.
Does any one know how can I achieve this using configuration? I should not use apex code for this req.
Thank in advance guys.
I don't think you can do it.
In formulas / merge fields syntax there's no way to go "up, up then down" (Application -> Opportunity -> Account -> down to Contacts related list). There's also nothing that would let you loop through Contacts (and display what? Ids? Names? Emails?). Roughly speaking you can only go up through dots.
You might want to explore path of "cross object workflow" rules but I imagine that when I add a new Contact to Account it should somehow "spread itself" to all related Applications? There's no straight way to fire a workflow on delete too - so you'd eventually end up with inaccurate list.
I'd say trigger was a good solution. Maybe it ws unoptimized but if it has to be in a field - tough.
There might be a fairly simple way of achieving that by embedding a visualforce page within Application page layout.
This should be doable with pure Visualforce (so technically there will be no Apex code ;))
Something as simple as
<apex:relatedList list="Contacts" subject="Application__c.Opportunity__r.AccountId" />
would be a good start (if you want your own layout and not a rel. list - you should be still able to pull it off with <apex:repeat> or <apex:pageBlockTable>.
There's one BUT here: it's not a field, just a display trick. Forget about using it in reports, mobile applications etc.
Another way - would it be acceptable to be 1 click away from these contacts? You could make a report "Account with Contacts", filter it by Id of one Account and later use "URL hacking" to change the filter depending on from which Application you'll click it. This link could be either a formula field or a real custom button/link. Technically - it's pure config, no apex & VF.
You can read more about URL hacking at Ray Dehler's excellent post and specifically about dynamic Reports here or here.

Salesforce field level access determined by third variable

For the contacts object, I have a custom checkbox which represents whether the contact owner wants the contact information (email and phone) to be visible. Most of our contacts will be completely visible to everyone. However, for a few contacts, we want them to be visible but their contact information needs to be hidden to everyone except for the owner.
Is there a way to set field-level access dependent on another variable? Could you create a workflow to redirect to another page layout if the contact information is visible? If so, can you restrict objects to certain field layouts depending on whether or not you are the record owner? And would would the contact information for "hidden contacts" still show up in reports?
Redirects, custom Visualforce view page etc hacks are all nice and shiny until you realize people will be able to pull data they want via some reports, list views, Outlook integration, mobile apps etc ;)
There's no straightforward answer because field visibility is really "all or nothing" (by Profiles & Permission Sets). Owner/Role-related stuff will help you only if you'd store data in some new related objects.
Another option - Store public part in Leads (public read only for example) and sensitive part - in Contacts (private)? Some lookup to link the 2, maybe a trigger when new Contact is created and you're good to go.
Last but not least - have a look at https://salesforce.stackexchange.com/questions/777/can-i-grant-different-field-level-security-based-on-record-ownership for some ideas.
If I understood correctly (My english...) You could create a new RecordType and a new customized page layout without this fields assigned to it, then you have to create a WFR that change the Recordtype when the cheked field becomes true.
I'm assuming that you know how you have to give permissions to this new Recordtype...etc
Hope this helps.

Resources