Display Popular today,month,all content - drupal-7

i'm using drupal7 and can't figure out how to display Todays/Month/All popular content in side bar.people suggest use Statistics module but only filter Todays most popular content.i think it can be done with Views module. help me. many thanks.

Views + Blocks + Statistics. The key here is to sort and filter based on the content statistics.
You configure sorting using the Field Settings section of the view's admin screen. You configure filtering from the Exposed Filters section of the same admin screen.
As for displaying it in a "side bar" (block in Drupal-speak); you need to create a Block display type from your view's admin screen.

Related

How can the category and product fields in Shopizer be customized, if possible at all?

I am currently using Shopizer as a sort of headless CMS, leveraging its out of the box admin pages and REST API for the content. There is a page for editing products in the admin system but I would like to add and/or remove specific fields. Making changes to the base code seems to be the most obvious solution but it is taking me a significant amount of time to implement it successfully.
Is there some sort of a config file or an initialization process to customize the fields for creating categories and products using Shopizer's admin page? What is the best practice for this scenario if the former approach is not possible?
If you need to add fields the easiest way is to add them in model objects
com.salesmanager.core.model.*
Example of an annotated field
#Column (name ="IP_ADDRESS")
private String ipAddress;
Once you restart your instance the new field will be available.

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.

Overview page of elements from a Typo3 page tree

I'm primarily a UI and graphic designer and, eventhough I have some experience with Typo3, I'm completely stuck at the following problem:
I have a large page tree with single pages for items from a catalogue (one item per page), the layouts for these items are built with Armin Vieweg's beautiful "Dynamic Content Elements" extension (DCE).
Now I want to create an overview page where I reference some of those items automatically - ideally I want to check a box in each element I want to display there (I would add a field catalogueItemPreview to the item DCE which authors can check or uncheck).
Unfortunately, I have no concrete idea of how the database is structured and how I could build a query (where would I even do that? in a custom-made plugin?).
This is how I imagine it could work: On the overview page I use a plugin/an extension in a Content Element that does the following:
search Typo3 DB for content elements with a field called "catalogueItemPreview"
return fields "catalogueItemTitle", "catalogueItemShortDescription", "cataloguePreviewImage"
use a template to render previews of all those elements on the overview page
I'm happy for ANY pointers towards a solution as currently I'm completely in the dark about where even to begin ...
Schematic screenshot from the Typo3 backend
thanks for using my DCE extension :)
Well the fields you have defined and their values in content elements are stored as XML, because the current version of DCE is based on Flexforms.
This makes it very very difficult to do MySQL queries using one of the field properties in WHERE clause. You could check for a xml string in the field pi_flexform but this is not recommended.
Instead I would use another property of content elements (tt_content) to mark the items as "Show on frontpage". For example you could create a new layout or section_frame value for that. Then it is very easy to just output the elements you want, using TypoScript.

How can I get merged data from website and mobile website for Google Analytics?

I have a website - and the website redirects the users automatically to its mobile site when the users access using mobile devices.
The problem is, Google Analytics treats those two pages as a separate page.
For exmaple,
http://story.pxd.co.kr/917 and
http://story.pxd.co.kr/m/post/917
are same page but GA shows statistics as two different pages.
How can I merge the data from the two pages?
(When I want to see mobile data only, GA already supports various ways for it)
Thank you in advance.
Jay
Untested as far as the regex goes and might need a little refinement, but the principle works like this:
Go to admin, views, filters. Create a new filter , custom, advanced.
In "Field A" select "Request Uri" from the dropdown.
In the text field at the right (extract) enter "./m(.)" (without quotes). This extracts everything to the right of /m via and stores it (via the brackets) in variable (if it does not work at the first go you have to look up regexp with Google and refine). The values of that variable now should be in your example "/post/917", it is accessible later via the placeholder $A1 ("A" because it's from field A, "1" because it is the first value extracted. If you use more than one bracket you might also have $A2, $A3 etc).
Leave Field B empty.
In "Output To" select "Request Uri". Enter your hostname http://story.pxd.co.kr/ . Append the placeholder $A1 - this contains the page path without the "m".
All steps combined will change "http://story.pxd.co.kr/m/post/917" to "http://story.pxd.co.kr/post/917" and thus unify the urls so they will be displayed as the same page in the reports (you might want to include some custom dimension to discern if this was a mobile view or a desktop view, or you can use the "device category" as second dimension to see which was which).
Btw. data that has already been recorded will not be changed, filters do not work on historical data. And be sure to keep a view without filters (filters are destructive and if you make a mistake you won't be able to recover the data).
Thank you Eike,
With your hint, I found better way.
I used 'Advanced Filter' with 'Search and Replace'
So let the GA search /m/post/ and replace with /
Thank you!

Drupal 7: Adding content/nodes from custom content type pages to another page

I'm working on a Drupal site an need to implement the following:
I have created an about us page template (page--about.tpl.php) and a custom content type for the about us page and linked the 2 using suggestions. I also have a custom content type for staff profiles that I need to add on the about us page in a tabbed format.
I can't seem to find a way to get the staff content to display in the about us page. I would ideally like it to render it the same manner as blog posts would display in a blog page.
So my question is, what code do I use to render all the nodes of the staff profiles content type in the about template page?
p.s I'm a bit of a Drupal noob, done a lot of reading but come up empty on this one.
If you already created content type About us (that is what i understood from mockup and explanation) then maybe you could use Views with EVA. That will enable you to have view as field in content type.
You can set it up with manage display or print it in template as all other fields. For example:
<?php print render($content['your_view_entity_view_1']); ?>
Other way would be to embed view in template. For example:
<?php print views_embed_view('your_view', 'block'); ?>
You can use the excellent Views module to create a block to list all your staffs.
Then you need to place the block that you had created with the help of view module in about-us page.
The Views module will give you suggestions to about which template to use.
EDIT: After the op provided the following image.
After you create a view to show all the Team member nodes you could simply print the view in your about us specific page template using following code.
$view = views_get_view('view name');
print $view->render('display_id');
Another option to do the same thing is, make blocks for all the content, viz. The Firm, The Team, Awards, Technonogly, Services and use quicktabs to display the content.
Yet another option to show a view as a field for a node is use EVA
Going the quicktabs way you can provide a lot of flexibility of showing teaser in about us page and leading to details about the same. For example each award can be a node in itself.

Resources