The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Replacing text in a message with an HMTL snippet
I want to make certain words in messages on my forum be surrounded by HTML. For example, if a member types "magic" in to their message, that will be surrounded by (parsing) h2 tags automatically. Is this possible?
|
#2
|
||||
|
||||
write a plugin to do a str_replace in the message. Do a search on that in these forums - the plugin has been posted before.
|
#3
|
|||
|
|||
In postbit_display_complete:
Code:
$post['message'] = str_replace('magic', '<h2 class="emphasis">magic</h2>', $post['message']); $post['message'] = str_replace('Magic', '<h2 class="emphasis">Magic</h2>', $post['message']); Any idea how to make an h2 tag not start a new line? |
#4
|
||||
|
||||
h2 tags are block display tags by definition. They will start a new line unless you change their definition in your css.
|
#5
|
|||
|
|||
I was mostly joking. Is that possible? If so, how?
|
#6
|
||||
|
||||
You modify the display property in your css for your h2 tags - http://www.w3schools.com/css/pr_class_display.asp
|
#7
|
|||
|
|||
That did it. Thanks a bunch. And removing the automatic bolding added to h2 tags?
|
#8
|
|||
|
|||
Same thing, modify the CSS.
|
#9
|
|||
|
|||
Got it.
|
#10
|
|||
|
|||
Hello!
Please tell me where and how to find postbit_display_complete? Can't find it in templates... I understand it's some hook but it's not clear for me how to work with it. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|