Pass the node and create a dynamic view according to the nid? Drupal - drupal

I am creating a website in which users enter challenges through a form(created by CCK) so every challenge is a node. Now i want to pass the node id to a view so that the related information to that challenge can be displayed. That is when users click on the challenge name it should display all the information related to that challenge.
Please help
Thanks in advance
Kanwal
Additional info:
Thanks alot i have done that now the view is displaying the participants according to the argument i.e challenge node id but i have given the challenges url as challenge/[nid] instead of node/[nid]. If i keep it as node.[nid] it is picking up the view but not with challenge/[nid] even the pathe of the page is challenge/%. Any suggestions.
Thanks
Kanwal

Can you explain a little more what you mean?
Creating a node view, adding a node id argument, and then creating a page display where you put a % in the path where you want the node to come in is fairly easy - give it a try.

Related

Creating user WantList and WantToSellList in Buddypress / Wordpress

I’m working on a site cataloging recording artists and their releases. It is hosted on Siteground and posted with Wordpress. It is a wordpress database.
We catalog records, all the way down to the specific version of each release (each version is a post). I'm currently using buddypress to create the user accounts and etc.
https://staging3.recordcollectorsoftheworldunite.com/release/like-a-virgin-3/
Here’s an example of a release page. Each version is uploaded as a post. Custom post type->album (is one example). Currently I have buttons (they don’t do anything) in each version’s foreach loop that say “WANT” “HAVE” “SELL”.
I want these buttons to add to the user's WantList, HaveList, and WantToSellList. These will be unique arrays for each user.
I'm thinking the best way would be to create new column in the album's entry in the database called this_user_wants_this, _has_this, _wants_to_sell_this, etc. That column would be a dynamic column that each user's profile would fill in? Each user would have an entirely different list of wants and haves and wants-to-sells.
Here’s what I want to do in English.
If user is logged in and presses the WANT button on this_post(), Change this post’s row “want_this_item” to ‘1’ for this_user only.
if “want_this_item” == 1, change “want_this_item” back to 0.
I don’t understand the language of what I would need to write out. How do I create the field for “want_this_item”, and then what code do I need to modify it?
I've tried creating an x_profile_field in buddypress, is there something to this? I still don't exactly understand how to modify that with the buttons.
Thanks so much!

Generate and display html table with user data from wordpress

Update: With the help of the answerer below I figured out how to do this. Basically I used a WP Query to get users and their user metadata and I sorted and placed the data in a for each loop in a table.
I'm new to PHP and I need some help. Basically I want to create a leaderboard with different user data. I want to display it in an html table.
This is kinda what i want:
Username GamiPress Points Time since last login
And I want the table to be populated with these data amongst others automatically. I want two versions one that is sorted with the 15 users who have the most points and one that sorts on the 15 users that logged in last.
Can someone point me to the right place on how I can best implement this?
I basically want to create the GamiPress Leaderboard add-on that I, unfortunately, can't afford, but with some extra fields.
There are multiple steps to do if you want to achieve this:
1) Add meta field to your users, so you can store the points. For example you can use "Advanced Custom Fields" plugin for this.
2) Write a function for adding points to this field. Define when this function will be fired.
3) Query the users ordered by that meta value and display it (get_users($args) might be useful).
4) For the Last-Login value you can use a plugin (google Wordpress Last Login) and write another Query and order results by that meta field. You can also write this by your own, here is a link I found: https://www.wpbeginner.com/plugins/how-to-show-users-last-login-date-in-wordpress/
I don't know if this is what you were looking for.
Or did you want to see an example code how you use a wp query and display data in html table?

Populate data based on the response given in Google Form

I have created two sections
First Section I have Order ID after entering the order ID and I click Next - In second section I want to populate order id's related data like (Name, Address, list of orders) All these data are available in an excel sheet, Once it is populated I would like the user to confirm their orders are correct and then hit submit.
Is this possible using google form or any add-ons for Google forms?
Thanks!
i read your question
As far i know about google form, google form don't give option to recheck your pre-filled options. So, what we can do is to give a confirm button at the end which is must required to fill.
You can see it through this example.
https://docs.google.com/forms/d/e/1FAIpQLSchhhCjcyQe-ZTdl8pFF-ETLPGFTXPcuqQGDGQ1nMbtcwOnGQ/viewform?usp=sf_link
If you want to create a more user defined form you can make it from simple html and php.
hope this will help you.
thanks!

Is there any module which list the related nodes based on the title , So that the user can set multiple related node

Is there any module which list the related nodes based on the title , So that the user can set multiple related node.
i want to display related songs based on title without using taxonomy.
like http://www.djcity.com/digital/robin-thicke-give-it-2-u-viol8tor-trap-remix---32213.htm
any body help me...
I think its the best module: https://drupal.org/project/featured_content
But if you want more alternatives, visit this url: https://groups.drupal.org/node/12347
I hope the information has been useful.
Regards.

Create a Drupal view that loads all articles that share any one taxonomy term (Contextual Filters)

I have a custom article type that contains a list of taxonomy terms
For example articles can be tagged with a location and possibly multiple topics.
On any given article's display page I would like to be able to pull a single view that gives a list of other articles that share any of of the taxonomy terms.
If an article was tagged with the topics of recipes & chicken as well as the location of new york I would like my single view to present the five most recent articles that share any one of the above tags.
The taxonomy terms have been added to the articles in the form of new fields of either the "Term reference" or "Node Reference" type. (field_topic, field_location)
I know that I have to somehow use a Contextual Filter, but I am having some trouble figuring out how to set and debug my "default argument".
I suspect that I've got to choose:
Taxonomy term ID from URL
Load the default filter from the node page
Do something with PHP code
I'm really struggling to get this displaying anything, and I can't even see a way to debug to find out what the values I'm getting are.
Can anyone help figure this out? Even some guidance on the right direction to look would be welcome at this point.
You can do this in just clicks if you have Drupal 7 and Views 3 (You already have this I'm sure).
Your configuration is correct so far.
Choose " Provide default value " as action to take if arg is not given.
Choose Term ID from URL"
Check "Load default filter from node page, that's good for related taxonomy blocks"
:)
this will load term IDs from the current node's term reference field if arguments are not given.

Resources