Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
add_filter??
#1
Is there anyone who can explain to me, how to create a filter.
I mean, i would create:
I write (% test %) in my content, and i see my plugin test in the place where i wrote...

Sorry for my english.. if someone can explain to me in italian i'll be very happy.. but i'll appreciate any kind of help.

Smile
Reply
#2
if you want to create a plugin, read here: http://get-simple.info/wiki/plugins:creation

if you want to create a component and add that to your content, read here: http://get-simple.info/wiki/components?s[]=component

that's in the WIKI
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#3
Connie Wrote:if you want to create a plugin, read here: http://get-simple.info/wiki/plugins:creation

if you want to create a component and add that to your content, read here: http://get-simple.info/wiki/components?s[]=component

that's in the WIKI

Thanks for the answer. I'll try to be more clear.
For example, the mp3 plugin.
I write (% mysong.mp3 %) in the page where i want to insert the player.

I would do the same thing with my plugin.
Reply
#4
eru321 Wrote:Thanks for the answer. I'll try to be more clear.
For example, the mp3 plugin.
I write (% mysong.mp3 %) in the page where i want to insert the player.

I would do the same thing with my plugin.

Use add_filter to specify a function in your plugin as content filter.
In this function use a regular expression to find the (% ... %), which belongs to your plugin and replace it with the desired text.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#5
mvlcek Wrote:
eru321 Wrote:Thanks for the answer. I'll try to be more clear.
For example, the mp3 plugin.
I write (% mysong.mp3 %) in the page where i want to insert the player.

I would do the same thing with my plugin.

Use add_filter to specify a function in your plugin as content filter.
In this function use a regular expression to find the (% ... %), which belongs to your plugin and replace it with the desired text.

THANKSSSSSSSSS A LOT!
It Works.
Really really thanks.
Reply




Users browsing this thread: 1 Guest(s)