Customizing SMF > SMF Coding Discussion

View filter?

(1/2) > >>

jindroush:
Hi,

I would like to do something like filter-on-view on the posts.

The idea is that user writes something like %REPLACE_ME% and this is inserted to the database (on edit, there would still be %REPLACE_ME%). But on viewing, it'd be replaced with some other info, picture, hyperlink, whatever...

Is it possible to do it without any changes in code? Using some mod or whatever?

Please let me know if this is the wrong forum to ask.

Christian Land:
Try using the censoring function for this...

jindroush:
That's not enough for me.

I need parametrized replace, more inteligent than just a string for string.

[Unknown]:
Why can't you just censor %REPLACE ME% with BLAH?

-[Unknown]

jindroush:
Because I want for example:

%REPLACE1(something) be replaced as <a href="prefix/something/index.htm>db_query(something)</a>

or

%REPLACE2(something) as <img src="prefix/pictures/something.jpg>

etc.

Navigation

[0] Message Index

[#] Next page

Go to full version