Closed (fixed)
Project:
Advanced Forum
Version:
6.x-2.x-dev
Component:
Styles
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Sep 2009 at 09:47 UTC
Updated:
26 Dec 2009 at 15:00 UTC
Hi
I'm trying to set up 2 different forums that need to look different. So far I am completely stumped!! Is there a way of setting up advanced forum to use a specific style for each forum container? My only other option looks like using phpbbforum. Any ideas???
Jon
Comments
Comment #1
michelleThere's no way you could do this in 1.x outside of hacking the module. If you want to go to that route, find:
and put in some custom code to change what it sends back based on what forum you're in.
I'm switching this over to a feature request. It's something I can consider doing for 2.x. Even if I don't get a UI in for it, I could at least make the function easier to hook into.
Michelle
Comment #2
jon pollard commentedThanks!
I've had a hack around with this and I'm a bit lost. I'm looking for something like:
But I am absolutely stumped on how to get the name of the forum container that we are in. Would this work and do you have any tips on how to grab that variable?
Thanks for getting back to me so quickly!
Jon
Comment #3
jon pollard commentedHi Michelle, I've had another look at this and figured out my first mistake! I've now got this:
But I am stuck as to how I can get the "forum container name" or nodeID of the forum/container. I'm kind of new to Drupal and php, most of what I've done until recently has been classic asp development and I'm not really sure where to turn for help. I'm in the middle of a commercial project, so there are funds to help fix this... Any advice on where I might be able to find help would be much appreciated.
I hope you don't mind me asking for help, but I'm a bit desperate! Is this an easy thing to sort out, or much more difficult than I'm anticipating???
Jon
Comment #4
michelleSorry, I missed that you commented again. I thought it was still active because it's on my to do list.
If you're in the forum topic list, you can get it from the URL. It will be arg(1) since the internal path is "forum/N" where "N" is the forum term ID.
If you're on an individual post, you would have to look at the terms on the node and figure it out from there. I believe it's in $node->taxonomy but I don't know off the top of my head. Take a look in there and see if you can figure it out. If not, I can look more later. Just doing a quick run thru my tracker before breakfast right now.
Michelle
Comment #5
jon pollard commentedMichelle
Thanks for the help, I've done a fair bit of hacking around and I think I have a working solution:
If I were a better programmer it would be shorter and neater, but at least it works! I needed to learn about php arrays before I could get the taxonomy stuff working and I found a very useful script which drags out taxonomy details here:
http://www.g-loaded.eu/2009/05/07/drupal-tip-list-a-nodes-taxonomy-terms...
So, many thanks for your help!
:o)
Jon
Comment #6
michelleSounds like you got something working for you and I'm not likely to have time to write anything for this into the module, so calling it good enough.
Michelle