jwocky
11-19-2007, 12:56 AM
Hey everyone..
What i'd like to do is to write a hack that will format certain posts into a different style (similar to the way vb.org reformats the first post for the threads related to a mod).
My idea was to use my own internal code to determine that a post should be formatted differently
So for example, a post that starts out with the words: "[REFORMAT]" would trigger my plugin to activate and take the words that follow "[REFORMAT]" and do something, for example change the font size or color. I will probably make it reformat the entire post, using placement of the text in different areas, but for now lets keep the examples simple just to figure out how to get it done. So for example, I want to take the words after "[REFORMAT]" and make them red by inserting <font color=red>after "[REFORMAT]"
Now I don't know where to begin in terms of which hook to use to plugin my code to read the current post that is being processed and if it meets the criteria of containing "[REFORMAT]"
I can code the php part of it fairly easily, but which hook would be the one to use, and what variable is the actual post contained inside?
Thanks everyone!!
What i'd like to do is to write a hack that will format certain posts into a different style (similar to the way vb.org reformats the first post for the threads related to a mod).
My idea was to use my own internal code to determine that a post should be formatted differently
So for example, a post that starts out with the words: "[REFORMAT]" would trigger my plugin to activate and take the words that follow "[REFORMAT]" and do something, for example change the font size or color. I will probably make it reformat the entire post, using placement of the text in different areas, but for now lets keep the examples simple just to figure out how to get it done. So for example, I want to take the words after "[REFORMAT]" and make them red by inserting <font color=red>after "[REFORMAT]"
Now I don't know where to begin in terms of which hook to use to plugin my code to read the current post that is being processed and if it meets the criteria of containing "[REFORMAT]"
I can code the php part of it fairly easily, but which hook would be the one to use, and what variable is the actual post contained inside?
Thanks everyone!!