By awesome_cricket on
i want to add icons to forums. an example would be to have a forum titled, "dining out," with a picture to the left of it of a dinner plate, etc.
i am using the latest dev build of advanced forums with my forums. hope someone here helps out.
Comments
=-=
you can add an image field to the forum taxonomy terms, then pull the field in with some theme code I'd think.
=-=
profound logic. taxonomy isn't something i think about very often with my web programming experience, but as i get further involved in drupal i am going to have to keep it in the back of my mind when troubleshooting or trying to think of new solutions.
VM, are you self taught in drupal?
=-=
forums are based on taxonomy, which is what made me think of it.
I wouldn't say I'm self taught. I've learned from years of reading and responding to the questions from other users while reading as much as I can. Thus, I've learned from others. I do have an autodidactic approach to many things though.
=-=
as an english major (with lazy internet typing skills,) i support your vocabulary.
i also appreciate your continued help when you chime in.
=-=
Thank you for the kind words. Good luck in your endeavors.
i started back up thinking
i started back up thinking about this, and i am wondering how I can just add a field to the editing of forum containers to add a file upload there?
I am going thru the forum page via pages, but i'm not getting very far in terms of learning or seeing where to add fields to administrative content. :|
hmmm...
OK, so i went and editied the taxonomy for my forums.
there, i added a field which i called container_picture,
when adding a new container, i now have the option to upload a picture.
however, within the overall display of my forums, the picture is not showing up and they are rendering the same as they previously had before.
i know i am getting somewhere with this, but i need some ideas on how i can edit the display of my forums.
i will poke around in "pages," and see if i can find anything, but i don't think i will.
=-=
now you would need to look at the tpl.php files or the theme function that already renders the images and override it in some way.
An example of how this may work may be found in the advanced forum.module
where you may need some custom code is in the area of pulling the problem image for the proper forum since the theme function is working with a single image.
OK, i think im starting to
OK, i think im starting to get this more and more, now.
i have declared the field which sets up the image upload. i am able to upload and view the image when lookign at the container itself as a node,
i have pulled up my forum elements via "inspect elements," (google chrome,)
i then look into my theme CSS file and look at the CSS called, in this case art-postcontent....
this is where you speak of for editing theme code to make the picture display, correct, VM?
p.s. as you posted i posted this, i think i am on the same page as you here.
yes, i looked first into
yes, i looked first into page.tpl, the term forum didnt come up in there, but in my theme file called template it did, from there i inspected the CSS which corresponds to rendering the forum....
can i, in CSS enter php
can i, in CSS enter php arguments? in this case, a site variable; that which links to said image?
if so, i will need to find out how to call the data from my field "container_picture,"
nevermind my scrambled hurry
nevermind my scrambled hurry haste here... i know how ridiculous it looks.
OIK, so scratch adding to the CSS< i think i should solely work with template.php... where [div art-postcontent] is called i should predicate the output with the image first.
investigation continues into grabbing my image which is intended for each container.q
....
i am soooo stuck...
container_picture viewed when forum container examined as a node,
http://120178.tk/phsales/taxonomy/term/111#overlay-context=forum/111
the following site shows the forum container, "public announcements," i would like the picture beside those words....
http://120178.tk/phsales/forum
=-=
The core forum.modules incldes a forum-icon.tpl.php you would need to copy that to your theme and find some way to put some logic in there IIRC or write a template preprocess forum icon similar to how advanced forum module does it.
The exact logic you'd need to specify an icon for each forum, I can't say.
ahh, I keep forgetting about
ahh, I keep forgetting about core files in all of this. thank you for the direction!
i'm thinking i might be able
i'm thinking i might be able to inject something into forum-list.tpl. this seems to be the php which renders the forums overall, from what i can gauge of it. if i can determine the ID relevant to the icons, i should be able to inject PHP code which will display tem in here.
at this hour, thats my current logic at least.
.
Chiming in because I was asked to but can't get super involved in this because I'm not working on AF anymore. My suggestion is to look at the D6 AF code for integrating with Taxonomy Image and adapt that to using an image field on the now fieldable taxonomy in D7.
Michelle