Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Addon to put some text, and apply a tag
davidnhutch
New
Hi,
I'm new here but have been reading about Addons. Is it possible to create an Addon that
- Puts some custom text at the top of the "New Post" page - but only on certain category or categories
- Automatically wraps the first post in a discussion thread (but only the first post!) in an HTML tag (specifically, wrapping the whole thing in <pre> tag).
The reason is, for my application I want each first post in each discussion to be entirely pre-formatted code, and then each subsequent comment to be just a plain comment.
Any pointers are greatly appreciated!
Thanks for help! Awesome forum software.
David
Tagged:
0
Comments
Hi David,
You can probably do this with Messages in the Dashboard. You can target the New Discussion page. That said, the New Discussion page is a generic form used by all categories, and it lets you switch the category you are targettng, so I'm not sure how to address that part of the requirement.
I think you can probably target the existing CSS classes that wrap the first post to apply equivalent styling as a
pre
tag. Remember - no HTML tag "looks like" anything at all. It's all styling anyway.