How to display the number of nodes or tags in Drupal? - drupal

I am new to Drupal. I am working on a site that requires me to display the number of nodes (content) in a group/tag. Similar to the way the number of modules and themes currently available for Drupal are shown on the homepage of Drupal.org.
Can anyone help me on this, or point me to the right module(s)?

I seem to understand that this question is a variation of what the purpose is of one of the Out-of-the-box examples that you get by simply installing (and enabling) the charts module, and without any additional configuration.
By doing so, and assuming you have the views module installed/enabled also, a new view is added to your site. Here are some more details about it, quoted from the linked page above (to which I added some formatting here):
You can see the charts created via this new view in your own site by
navigating to charts/examples or by using a menu link with a title
like Charts examples. After doing so, a page is shown with 2 sub-menu
tabs:
the first tab is titled Built-in examples (this example is used to
showcase Using the Charts API).
the second tab is titled Views
example, and is what is created from the new view created during the
installation of the charts module. As an alternative to using this
tab, just navigate to charts/examples/views in your site. You should
then see a column chart and a pie chart, which are followed by a
tabular display also. Both charts and the table display contain data
about the total number of nodes for each of the available content
types.
Since you're new to Drupal, this might be a good starting point to get you going with some of the basic stuff of the Views module. You can use these views to further tune/clone these samples to make them fit your exact needs.
Disclosure: I'm the maintainer of this module,
I hope this does not violate the site's policy on self-promotion.

Related

How to create an add on chart to overlap 2 data series using the Charts module?

The charts module (for drupal 7) facilitates using the Google Charts API. It is great at taking simple data in a view and displaying a nice chart. I have a problem when trying to display more than one series of data. In my case, I would like to plot two lines on the same graph.
This charts module allows for an add on chart that selects a parent chart and then overlaps the data. Sounds perfect, but it's not (at least not yet for me). Here are the steps I completed:
I created my view and setup the tabular display of data with fields and filters I need (as recommended in this Bonus Tip).
I then added a chart page, and set a filter to one item that creates the first line graph.
I then added an add-on chart and change the filter to show the second line graph.
The problem I encountered is when I select the parent display. I receive an error like "This chart add-on must have a parent chart selected under the chart settings." This is what I have done. The only way to get rid of the error is to choose the master as the parent display, which I do not think is right. I have posted on drupal forums and IRC chat with no luck.
My question: has anyone gotten the charts module to work with more than one data series? If so: how?
I had similar issues with pie and column charts with this module. I had little luck with the GUI. However if you look at the charts.api.php Charts supplies several hooks to edit the charts. For instance in my case I copied the Column chart $chart_type in hook_charts_type_info(), to help with GUI development. I also modified the xaxis, fields and labels for $chart via hook_chart_alter(). Looking at the structure and data in the $chart helped me to see what I needed to do through code. As I do not know your exact needs I will not venture further, hope it helps.
I'm a new maintainer of the charts module, and just discovered this question. Thought I'd try to get you going a bit ... Please refer to the Steps to create charts using the views UI, which is part of the (new) community documentation I created recently for the charts module (work in progress, contributions are appreciated ...). I'd be interested in knowing if it helps to get this "issue" solved.
Here are some other (related) documentation pages for the charts module, which may help to get you going with the charts module:
Getting Started.
Create Charts using views.
Charts Howtos.
If you like the content of these (new) documentation pages, please help spreading the word about them. If you don't like them, please let us know (i.e. 'me' ...).
PS about the "... i have posted on drupal forums ... with no luck": please add a link to those posts, so that I can go check them out also.
This is the issue in module. To fix this problem I found a patch here at official drupal.org https://www.drupal.org/node/2233089#comment-9004547 . I have used this patch and fix the issue.

Google Analytics with a b2b site - tracking sub sections

I've implemented GA on our b2b site. It's strictly internal but we'd like to track behaviors of users to see if some of the sections on the site are relevant. So, it's working, but say you have
www.blahblah.com and you want to also track
www.blahblah.com/edit
www.blahblah.com/askquestion
Do you set up a filter for this? I did try it and not sure if it's working quite yet. Any info/advice would be greatly appreciated. I am brand new to GA.
Thanks
Not quite sure what you are asking.
If you want to know about metrics for the individual pages you'd go to to the Aquisition->Page Content reports. Overview will give you, well, an overview (you can use the filter box to look at the metrics for any specific Url), Content Drilldown will display a view structured by url hierarchy.
If you're after user behaviour you can create segments. If you want to know if somebody vistited the homepage and, after that, the /edit page you'd got to advanced segments (the arrow above the "Explorer" Tab in most views, click "create new segment", choose "sequence" from the advanced tab, choose page as dimension and "/" to filter for as step one, "/edit" as filter value for page two, enter a name for the segment and click save. Now you'll get all reports only for visitors who have visited those two pages, starting with the homepage.
There are a number of predefined segments, you should try them to see what they can do. You need a pretty good understanding of metrics and dimensions in GA to get the full value from segments, but the simple stuff (e.g. analyze differences between marketing channels) is already pretty useful.
So, for page performance seek out reports with page metrics and use filters. To analyze user behavior use segments which apply to most of the GA reports.
Hope that helps, if not you might to explain more specifically what you want to see in your reports.
You can create separate custom report for individual sections and drilldown by almost all the GA provided dimensions. please reffer the sampel provided.
Please access this URL in your browser as this is a predefined custom report which does the same thing you want. This will get saved under custom reports. You need to edit the custom report and give your own path/section insted of "/services/" under filters section

Customizing Search in Orchard

Is there any option to completely control a Search module with a Summary view? I am struggling to get there. I have the following settings so far:
In admin I created an Index called PublicSearch with a number of fields.
I am getting a search result which is a mixture of two content parts - Question and Expert
I have a Part view to be used in search result for Experts called ExpertSummary.cshtml. The view only contains the following elements now:
#model dynamic
<p>Expert Summary</p>
When the search result is coming I only expect the "Expert Summary" to be visible in Expert region of the Search but I am getting an additional "body" section (truncated to X characters). It seems to me because "body" is selected as a field when I created the Index it is coming up.
Each Expert record has an image of expert which is coming up in the search result and When I take out <Place Fields_MediaPicker="Content:1" /> from Placement.info it disappears, which is fine.
But I want this summary to be completely controllable in ExpertSummary.cshtml - like a two column layout where the left col will hold the expert image and the right one will hold a brief description along with some other info - but everything would be in the View - should not come from Orchard search module as defaults.
In short I want Orchard's Index and Search modules to be functional and working like it is now but the layout and information I want to control completely using custom HTML in Parts/ExpertSummary.cshtml view.
Is this at all possible? If yes, how?
Please suggest. I am completely lost my way in Orchard framework!
I'm not completely sure I understand your question... Orchards search returns a Summary view by default. So you need to control the layout of your summary. Use shape tracing to create a new alternate to change the layout of the summary view. So ExpertSummary won't control the entire layout, it will just control the Expert part. Then use placement to decide what to display. http://docs.orchardproject.net/Documentation/Understanding-placement-info
Also, tagging questions with "orchardcms" will be more useful than "orchardcms-1.7".

Drupal "Jump To" Block Filtered by Terms with Children

So, I'm working on a site right now in Drupal that has a block designed to allow a visitor to jump to different "projects" (just a term). Most of the projects have content associated with them. However, some projects become empty from time to time as content is moved around and projects are restructured.
I currently have a view in place that shows an exposed form listing all of these projects as a dropdown and displaying it in a block. Is there a way for me to customize this view to only show projects that have content associated with them?
This would preferably be done entirely with the view. However, I would love to see any solutions you all can come up with. Also, please excuse my terminology if any is incorrect. I'm very new to Drupal and still getting used to the labels and structure of the whole CMS.
Any help would be greatly appreciated. Thx S/O!
Try this:
Edit the view. Under the Advanced section => Relationships, click add.
Add the relationship "Taxonomy term: content with term", and make sure to check "Require this relationship".
If this makes your view full of duplicates, try this answer to a question at drupal.stackexchange.com.
Hope that helps!

Can you customise a post on Facebook Timeline?

As far as I understand, an App can post into a User's Timeline.
My question is, how much can you customase/style this post?
I believe you can, at least, add a custom image and links. Can you also add HTML elements and CSS?
for example, nikeplus and RunKeeper seem to add some basic styling:
http://static.ak.fbcdn.net/rsrc.php/v1/yu/r/60YqMBkteVy.jpg
Short answer
No you can't.
Longer answer with more details
What you're looking for is called an Open Graph Action, it's not the usual Facebook status update. What you see in the screenshot linked by you, is an aggregation of all Open Graph Actions of a specific type.
You can not customize the layout of this aggregation. You can just select one of the 6 basic layouts and configure how the actions should be aggregated, sorted and/or filtered.
You can setup your own actions by going to the Facebook Developer Center, select one of your FB Apps, set a namespace in the basic settings (if not already done) and then got to "Open Graph". Once you've set up your own actions you can create your aggregations.
Here are a few links to get you started:
How-To: Defining an Aggregation
Open Graph Technical Guide
Open Graph Concepts

Resources