I have enabled the Scheduler in my Drupal website and then I created a content type named as VAT. I have enabled the scheduler option in this content so when I add content of type "VAT", there are two text fields; publish date and unpublish date.
Now I want to create a view in which I want to display content from "VAT" and these content should be displayed according to their publish and unpublish date.
How can I do this?
Create a view as you normally would. When it comes to filter out only posts that are scheduled, add the filter called "Scheduled: publish on" and in its settings, change the Operator to "Is not empty (NOT NULL)". That will only show posts that have a scheduled publish time. If under "Basic settings" you choose "Fields" as the row type, you can show the scheduled publish/unpublish dates.
It may be good to create a separate view for scheduled unpublished dates, if you use that field.
Add other filters as appropriate, such as content type, but don't include a filter for Published = Yes. Otherwise unpublished but scheduled to publish posts won't show up. Also be sure to add some access control under "Basic settings", so that instead of "Unrestricted", only privileged users can see the list of posts to be scheduled for publication/unpublication.
Related
Simple question for all of you here dealing with Drupal 6.x...
With Drupal's Add More module, is there a way to configure my webform so that there is no limit on how many of a specific fields I can add more of?
Please see my image for example:
For example, I'd like to enable the user to add as many titles as they would like. Is that doable?
Unfortunately, it's not currently possible to add unlimited "add another" functionality with webforms. And if this functionality does become a reality someday, I doubt it will be backported to the Drupal 6 version of the module. From the webform modules author (quicksketch):
there is no progress on this subject. The ability to support multiple
values requires a tremendous amount of re-architecting, including
changes to the way CSVs are generated, analysis, the database
structure, and the UI (both for administrators and users). I wouldn't
expect this feature to be added any time soon.
See this thread for more information:
http://drupal.org/node/354381
I would suggest using a node and the CCK module plus rules and views to collect this information.
Assumptions:
Anonymous users can fill out the current form
You need some way of retrieving the data that is submitted
Regular users of the site should not be able to view submissions
Very loose directions:
Create a content type and add all of the fields that your current webform contains to it. CCK has the ability to store unlimited values out of the box. On the field settings page, inside the Global Settings fieldset, select "Unlimited" for the "Number of Values" field.
Give anonymous users permission to Create [your-new-content-type] Content on the Role Permissions page.
Using the Rules module, create a new triggered rule that fires on "Content is about to be viewed" with an condition "Content has type [your-new-content-type]" and an action of redirect to homepage (or a custom error page that you created). (Note: this is a bit of a performance hit. There are better ways to restrict access to this content type, but for the sake of this tutorial, this was the easiest to explain)
Using the Views module, create a new view with Style set to Table. Add each of the fields in [your-new-content-type] in the fields section. Under "Access" choose "role" and select the role that is assigned to your user. Add a "page" display, give it a Path and save. This is the page you will use to view submissions.
Optional:
Use the Rules module to send yourself (or the submitter) an email when a node of [your-new-content-type] is created.
I've just started using D7 and was trying to set up a system where people can add a couple types of content and associate one with the other via nodereference.
I only want users to be able to see and work with their own content.
To achieve this in D6 I used a view for nodereference.
In D6 I used argument : user: uid and if there is no arg, it uses the user id of the logged in user. This would return all of the content that was authored by the user.
I haven't been able to figure out how to do this in Views 3?
got it:
you first need to add a User relationship, then you will see new filters and contextual filters - one of which is "current user" or something like that
This five minute video shows how to do it, as well: http://nodeone.se/sv/node/684
With contextual filters you can also display the list as a tab on each user page (as shown in the screencast).
If you're interested in a list that always shows the current user's posts, you can use a standard filter instead – there is a "current user" filter available.
Edited: The original link is broken. I'm not sure which video it was, but it could be one of the following (which all deal with this topic).
https://vimeo.com/22276809 Video guide
https://vimeo.com/33588889 Exercise description
https://vimeo.com/33588956 Exercise solution
For drupal 7
Steps for doing as the above question are
Create a new content view and limit it to the content type you want.
Uncheck "Create a page" and check "Create a block." Select the format you want; I recommend an HTML list of linked titles. Click "Continue & edit."
Add a contextual filter for "Content: Author uid."
Under "When the filter value is not available," select "Provide a default value," and select "User ID from URL" from the dropdown. Because blocks don't understand contextual filters very well, the view won't work properly without this default value, and all posts of the given content type will show on all user pages (not just the user's own posts).
Under "When the filter value is available or a default is provided," check "Specify validation criteria" and select "Basic validation" as the validator. Select "Hide view" from the dropdown.
Save your view.
Assuming that you created a block display, the block will now be available on the Blocks page. Go there and open it.
Set your block to display on all user pages (/user/*) in the correct region. Save the block.
Your block should now appear on all user pages, showing the content written by each user.
Source
How do I add a field, say 'Contributors' in Archetype types, to be listed in Field name drop down menu? For example, in a fresh new Plone site, I can manage criteria at events/aggregator/criterion_edit_form. I want 'Contributors' and custom fields to be added as criteria.
BTW, I ever look into Products/ATContentTypes/tool/topic.py, it seems that I have to addIndex and make it 'enabled=True'. But how? Or do I go into wrong direction?
/marr/
You can go into Site Setup and go to the collections configuration(or just append /portal_atct/atct_manageTopicIndex onto the site url) and manage which which are allowed to be used in collections.
You'll have to click the "All fields" button to see everything available. The caveat is that the only fields available are those that are indexes in the portal_catalog. So for your case, you'll need to add a contributors index in the portal_catalog in order to have it available in the form here.
Wondered if anyone can tell me whether the following is possible within views.
I have installed To do module - http://drupal.org/project/to_do
I then created my own view which lists all the tasks created in a particular Organic Group, which works lovely.
One of the fields ive added as the to do button field which gives the user the ability to mark a task as finshed from the view listing.
the problem I have is that all users part of that group can see that buton & has the ability to mark the task as finished.
Is there a way I can use views to only show that button if the current logged in user is the author of that node( to do task).
Views have different templates. In one of them all the fields are being printed. You could in that template make a check if the user is the author and then only print the todo field.
You cam click the theme information link inside the view to get a list of templates that's used and what you could call a custom template for views to use it.
This will only show content the user created. It's a pretty simple argument
I've created a custom content type: product
This product has an image (cck file field) and a few other cck fields that make up it's content definition.
By default, when an anonymous user looks at a published product, they do not have permission to view the image or any other cck field.
Personally, I don't really want to have to always go in and alter the permissions for each individual field that belongs to the node.
Is it possible to set the permissions at the node level and have it cascade down to the individual fields? I've tried a few different modules that set node level access.. but I believe that is all they do. They don't actually drill down into the fields.
Thanks
You should disable the "content permissions" module. You probably have it enabled right now. By default all fields will be visible if the node is accessible to the end user (after you disable the module).