Download & Extend

Improve function for determining what gets the style applied

Project:Advanced Forum
Version:6.x-2.x-dev
Component:Styles
Category:task
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

These are notes to myself on my thoughts...

Functions:
advanced_forum_is_styled($type, $variables)
advanced_forum_is_styled_alter($type, $variables, $decision)

Cases:
node view (topic starting)
node add (topic starting)
node edit (topic starting)
node view (reply)
node add (reply)
node edit (reply)
comment view
comment add
comment reply
comment wrapper

For each type:
theme node?
theme replies? (comment & nodecomment)
Always? Only when in forum table? In views?

Comments

#1

I'd add:

Node view when shown in a view

Node teaser when shown in a view (could be done with the standard AF style, + snip the text so that posts are all a shorter length?)

#2

Related Advanced Forum issue:

More options for what gets themed as a forum post

Like the other users, I also think having more theming options would be really useful. For example, how to theme non-forum content types that are using the forum vocabulary. It seems Michelle is already considering adding those options. Thank you!

#3

Subscribing so I get updates on this.
If you need any help implementing this, let me know

#4

Component:Styles» Documentation

Ok, I've rewritten this whole section. We now have these functions:

advanced_forum_is_styled($content, $type = 'node') <-- Returns true if a given node, comment, or comment wrapper should have the AF style applied.

advanced_forum_is_styled_alter($content, $type = 'node') <-- Hook that allows other modules to make their own decision.

It seems to work fairly well from my initial testing but needs much more testing as well as documentation so I'm leaving the issue active for now.

Michelle

#5

Found one thing... With the new option to style teasers, there needs to be something in there to not print the node header stuff on teasers because that looks silly.

Michelle

#6

subscribe

#7

Component:Documentation» Styles
Status:active» fixed

Added new template to handle teasers. Not going to leave this open for documenting since there's 50 billion other things that need documenting as well.

Michelle

#8

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.