Where does access list comes from in Joomla - joomla

Can anyone suggest where from access list comes in Joomla? This list is available when creating 'Category' or 'Article' as:
I check and this is rendering from edit.php via
echo JLayoutHelper::render('joomla.edit.global', $this);
Though actually the whole section(right side panel) is being rendered from this function. If we see the Ids associated with each dropdown, they are different from userGroup ids of Joomla, and also 'Special' is not a userGroup altogether. From which method they are getting prepared?

There is a difference between user groups and access level.
For understanding this I suggest you this tutorial: https://docs.joomla.org/J3.x:Access_Control_List_Tutorial

Related

How to keep 'search filters checks' active after changing between different categories

I'm trying to maintain the "search_filters / facets_search_wrapper" status of the checks after changing between categories, for exemple, when the user selects "size: L" and changes the category to t-shirts, keep the "size:L" check active.
I've been thinking of saving some part of the URL that identifies the selected search filters, but I don't manage to find any solution for this.
Any ideas?
Thanks for your time!
Don't use any URL parameters, think about using Local Storage where you can filter out results on DOMReady, or you can use cookies and alter results with PHP.
Facet module is completely different in PrestaShop 1.7, there i'd suggest to use cookie method, if you are working on 1.6 tho, i'd go for a JS solution.

What code should I add (and where) on my website to track events/identify users on my website using segment.com?

I want to configure segment.com properly on my site and use it to manage all other apps/tools. I already installed the segment javascript on my site and used it as the source. Now, I am pushing these to MixPanel, Facebook, Google Analytics, etc.
What code should I add if I want to track an event and/or identify a user?
For simplicity's sake, i have a landing page (site.com/landing-page) with a form. After a successful submission, it redirects to a thank you page (site.com/thank-you-page).
The default settings already track the page views, and are pushing that same event to the different tools (FB: PageView, MixPanel: Loaded a Page, etc).
But in this case, i want to track the event and capture the person's information. And i don't know what to code to add and where.
My research so far
According to this article:
The best way to track new users is in client-side javascript on the welcome page after they signup, below we’ll explain why.
So, based on that, I add the code to my thank you page. But where? Header like adding GA scripts? body tag? I can add it anywhere, but i don't know where.
Next is what code should I add?
The example from the same article above:
When a new visitor goes to their site that visitor is anonymous. As soon as the visitor connects their Facebook account, Rdio knows who they are and creates a user record.
As part of that new user record the person is assigned a userId. Let’s say the new userId is 12345. Rdio will then need to fire the following calls on the welcome page:
analytics.identify('12345',{ name:'Jake Peterson', email:'friends#segment.com'});
analytics.track('Account Created',{ authentication:'Facebook'})
This gives me two problems: track and identify.
Track Problem
I'll start with the track. Based on how I understood this, assuming the event name i want to be added is "Downloaded PDF" then I want to store the title of it as well. It should look like this, right?
<script>
analytics.track('Downloaded PDF', {
title: 'Awesome Title'
});
</script>
Am I correct to enclose them inside <script> tags?
The tracking of an event seems a bit easier to understand that the identify part. But would love to know if i got that part right.
Identify Problem
Here, i have two questions:
where does userId come from? Is it automatically generated? For example, inside my MixPanel account, i see them. Is that what i use?
How do i reference to the userId? or any of the other traits I want to track in my code?
Taking from the same example above:
analytics.identify('12345',{ name:'Jake Peterson', email:'friends#segment.com'});
If i add this exact code on my thank you page, every signup will be assigned those values: '12345', 'Jake Peterson', and 'friends#segment.com', right?
What code should I add to (1) assign them the right userId (2) and get the name and email traits from the form of the previous page.
Let's say i'm only collecting first name and email.
analytics.identify("userId"{ firstName:"firstName", email:"email"});
If I add this code to my thank you page, will it automatically assign the userId, firstName, email values of the form that was submitted? That's the part I don't understand. What code to add to dynamically push the correct data.
And i know i'm not even adding the Alias part for MixPanel yet, but i just want to understand this part and the rest (hopefully) will be easier to understand.

Filter the form choices visible in the browseable API

I am using a filter to apply object level permissions to a collection. Resources in a second collection have a many-to-many relationship with the first. On the browsable API, when creating resources in the second collection, the user is presented with a list of resources from the first to link it to. However, this list is not filtered, so the user can see values that they should not be able to see.
I've poked around the documentation and source a bit and I cannot see a way to add filtering to the queryset that generates the choices without overloading or modifying a bunch of code to pass the request data down (probably removing some of the collection specific data on the way) and then apply the filters.
Is there a better way to achieve this?
Currently there's nothing to support this out of the box. Pull requests are always welcome. If it's something you want to work on you may want to either open a ticket on GitHub or hit up the mailing list to discuss it first.

MVC in yii: how to build pages with several actions belonging to different models

I would like to know how you should write website pages that use for example 3 models and several actions on them.
Because there is usually only a controller involved with a page call and only a special action.
For example:
there should be a page which displays a group of people, and on that page I can edit the peoples names and assign new people to the group and i can add people as new managers of a group.
Does this page need its own controller or how do I program such pages?
Using your scenario, here is how I would set things up:
The controller you'd use for all related actions would be 'Group' (in Yii, 'ControllerGroup')
For your main page that displays the group of people, you could make an action in your Group controller called 'manage' (in Yii, the method name would be actionManage). Assuming you aren't going an Ajax route, for each person on the manage page you may have a link to edit that person. The links would point to the 'update' action. For adding, you'd want an action 'add'.
Your models involved would likely be User, Group, and UserGroup and you'd use them as necessary in any controller you have.
Actions can belong only to controllers. In each action you can work with any models of your application. In your case you must create a UserController and a list of actions (e.g. actionViewList, actionEdit, actionAssignToGroup).
Check this for more information: Yii Controller

Is it possible to show the order details sent to customer via email in a separate page (Magento)?

Is it possible to show the order details of last processed order, such as
Item Sku Qty Subtotal
in a separate page?
I tried adding the order details section from frontend/base/default/template/email/order/items/order/default.phtml in a separate cms page, by adding {{layout handle="sales_email_order_items" order=$order}} to it.
But, when I run this cms page after order being placed, it shows the following error:
Fatal error: Call to a member function getAllItems() on a non-object in D:\wamp\www\magento\app\design\frontend\base\default\template\email\order\items.phtml
Is this actually possible?
This is possible.. its already present in the magento system, when user places an order successfully they are shown with order number and a link to order details page.
the link to order page is like http://www.example.com/sales/order/view/order_id/25/
we can make system to be redirected directly to this page to accomplish this task.
the only this we needed is the order id this can be get using
Mage::getSingleton("checkout/session")->getLastOrderId();
Yes, most things are possible. You'd have to write your own module, with your own controller which would serve up your own template. There you can load up an order and display whatever you want.
Obviously, that isn't the answer you are hoping for, but your question isn't specific, and writing out how to accomplish what you want could easily take an entire blog article.

Resources