Hi guys,

I am starting a site that have the same idea as Internet Movie Database.

The idea is to have a section about the movie (list of interesting stuff about it) and then at the bottom to have most recent forum posts...

now my problem is how to approach the whole idea.
I don't see a problem in doing any of this stuff pretty easy but my problem is with the forum setup.

how can I setup a forum for each movie & show the most recent posts are the bottom of the page.. I mean I know how to create a forum using drupal but how the link between the forum and movie should be done (a drop down menu can be added to the forum with the company taxonomy but i don't want to do that it should be transparent)- It should be easy and when a user wants to post a topic it should be transparent - click on post topic and we are done (the final post should show up in the proper forum)..

Some questions [what is the best way to do it]
- create a movie as a node or a taxonomy vocab?
- if you treat a movie as a taxonomy then how would you link it to forum and make it transparent to the user (no drop down menu to select a specific forum to post a topic in)?
- if you use node reference to create your movies & its different elements, how would you approach having a dedicated forum for each movie?

some of these questions are very basic but they are the foundation of any website(framework) - the way I see it the same logic can apply for adding videos or pictures to that movie.

I hope someone would share some info on how this can be best approached in details.

Thanks again

Comments

nevets’s picture

My first though would be to add the movie as a node and use Node Auto Term (nat) to add the title as a taxonomy term in the forum vocabulary.

Oghnia’s picture

I did look at it but still how would you approach the whole idea.. NAT doesn't work properly and has a lot of issues (check their forum)

nevets’s picture

I just downloaded the lasted version of NAT, enabled the module.

Made a simple content type called Movie.

Went and configured NAT for content type Movie
For 'Vocabularies' I picked forums
Also unchecked all the checkboxes.

Added a couple of movies, went to the forums and there they where.

Oghnia’s picture

Did u try to display everything on one page using Panels. (the movie info plus the latest 5 posts from the forum

That's where I get into a jam...
getting NAT Views (for lists) and Panels just don't co-operate with me (I know that I am missing it up with creating a relationship)

Oghnia’s picture

by the way "nevets" you are the best & always helpful - I salute you for your help

Oghnia’s picture

another try

nevets’s picture

Here is one way that does not use panels.

Starting point, we have content type for movies (I called it 'movie') and NAT setup to add taxonomy terms to the forum vocabulary when movies are added.

Create a view to list forum topics based on taxonomy name. The important parts are
Create an argument on 'Taxonomy: Term id'
For 'Action to take if argument is not present' pick either 'Hide view / Page not found (404)' or 'Hide empty value'
For validator pick "Taxonomy term"
Set Vocabularies to 'Forums'
Set Argument type to 'Taxonomy Name/Synonym converts to Term ID'

I sorted by post date
Set items to display to 5
For fields I picked title (made the label blank) and selected link to node.

I only made a default display and saved.

Lets assume we called the view "related_forums" and the content type is movie

Under your theme folder copy node.tpl.php to node-movie.tpl.php (in general copy node.tpl.php to node-content_type.tpl.php

Edit node-movie.tpl.php (or the file you made). Find the part that looks like

  <div class="content clear-block">
    <?php print $content ?>
  </div>

and change to

  <div class="content clear-block">
    <?php print $content ?>
    <?php print views_embed_view('related_forums', 'default', $node->title);  ?>
  </div>

Change 'related_forums' to reflect the name of your view.

Oghnia’s picture

u r a magician, it works..

my only question is why you didn't use panels all together..

I was looking forward to find a solution using panels,,, since its easier to use but things are just getting complicated with panels these days.

this frees us from waiting for the panels project to finish and we can actually proceed with our websites.

The possibilities right now are endless since we can do whatever we want without the relying on Panels.

I have more questions but I am afraid that I am taking much of your time and bother you (I am still learning)

- what do I read to understand and learn what you know? how did u get started in all of this. is there a specific manual that you read to get all that knowledge?

Thanks again

nevets’s picture

I like panels, but don't have copy on my Drupal 6 test site. You could do something similar with panels it you can pass the view the node's title.

I have been programming for a while and picked up Drupal with 4.7 for a project that had a two week dead line. Now days I am a self employed computer consultant focused on Drupal related development. To keep up I spend a fair amount of time on the forums here and wander through the contributed modules now and again trying out ones that sound useful (on a test site, always use a test site). In addition the more popular modules have pretty good documentation.

Oghnia’s picture

Great,

Yes, always use a test site.. as for panels I like it but I have been struggling to do what you just did in 2 secs for the last 3 days...

I was able to pull all info using panels but the forum info,, dunno why?
I think I am going to scrap Panel all together for now and just use what you showed me and even add pictures and stuff using the same method...

thanks again

nevets’s picture

Well it was a little more than 2 secs :)

Oghnia’s picture

Help help.

Ok tell me if I am doing anything wrong.

Now..
I created node-forum.tpl.php (to customize how the each forum post look like) and what I wanted to do is have the same elements posted in both the forum and forum topics.

for example - > I wanted to display the poster of the movie and a link back to the actual movie node
so I created a view =for it that has the following
movie profile content type (it has movie profile - movie posted, production date and such) keep in mind that this movie profile is attached to the forum vocabulary (movie name)
so in my created view I am calling 2 fields (movie posted & title)
in my arguments (I used wht you used above)
and node type filter is the "movie profile"

now nothing shows up in the node topic , no movie poster or link back to the node.

is that normal, are the arguments off.. do we really need to use an argument there or not...?? how to do you show specific related content with the same taxonomy term in a node?

nevets’s picture

Here is one approach, for your "movie" view change the argument to "NAT: tid". Set the "Validator" to "Taxonomy Term" and "Argument type" to "Term ID".

node-forum.tpl.php change your call to views_embed_view so it looks like views_embed_view('your_movie_view_name', 'default', $node->forum_tid).

And for help with variations on node.tpl.php it can help to put this at the end of the tpl.php file

<pre>
	<?php print print_r($node, TRUE); ?>
</pre>

I put this in node-forum.tpl.php to find the field forum_tid.

Oghnia’s picture

That didn't work at all..
hmmm,, I re-did it three times just to make sure I am doing it properly..

very weird

nevets’s picture

Did you change 'your_movie_view_name' to reflect the name of the view you are using to show the movie information? You can also test the view with "live preview" while editing the view. Just enter a valid tid for the argument.

Oghnia’s picture

As usual, it was my mistake and it worked perfectly.

Now I have one last question (maybe)

Now lets say I have 2 content connected using node reference.

movie (is the main node) and then movie pictures & movie trivia questions are connected to the movie using node reference,

now how would you show the movie posted in the pictures & movie trivia questions section using node reference..

the reason why I am doing this (please let me know if it makes sense or not) is because once you linked content type to a the forum taxonomy its is automatically treated as a forum post (very weird and awkward looking)

So what I did is created nodereference (which is separate from the taxonomy relationship with the forum) that will create a relationship between the actual movie and pictures, trailers, movie trivia questions and such.

now showing pictures & trailers on the main movie page showed up perfectly using node reference and the most recent forum topics show up using taxonomy and NAT term

but now If I want to show the movie poster + title plus other info in the movie in the photo section of the movie using views nothing works properly,, since the movie pictures section is not an actual node but a views type

And another problem is the movie trivia questions section has the same problem in which I can't show the movie poster in there.

I know that I am taking a lot of your time here and seriously you don't have to answer any of my questions since I ask alot.

thanks again