Posts: 22
Threads: 7
Joined: Oct 2010
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.
Posts: 2,928
Threads: 195
Joined: Feb 2011
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
Posts: 22
Threads: 7
Joined: Oct 2010
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.
Posts: 2,094
Threads: 54
Joined: Jan 2011
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.
Posts: 22
Threads: 7
Joined: Oct 2010
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.