You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 13, 2022. It is now read-only.
not every bbcode can be bundle with bbcode , a plugin system which will work like this
parsing a plugin folder
execute a common function
if it's php5 only, it could be writen like this
interface bbcodePlugin{
public function transform($var);
public function getStartTag();
public function getEndTag();
// public function untransform($var, $arg);
}
classe UpperPlugin implements bbcodePlugin{
public function transform(&$var) {
ucfirst($var);
}
public function getStartTag(){
return "[uppercase]";
}
public function getEndTag(){
return "[/uppercase]";
}
}
in that case, bbcode like [video type=youtube] could be implemented, you can think to something like [url pagerank=true] for a seo blog ... etc ..
note that a cache system to create only the needed instance of bbcode could be good, or may be using static tricks to avoid instanciation ...
Change History
comment:1 Changed 3 years ago by mumuri
public function transform($var,$param);
where paramtype?="youtube" for instance
comment:2 Changed 3 years ago by mumuri
where param['type']="youtube" for instance
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
not every bbcode can be bundle with bbcode , a plugin system which will work like this
if it's php5 only, it could be writen like this
interface bbcodePlugin{
public function transform($var);
public function getStartTag();
public function getEndTag();
// public function untransform($var, $arg);
}
classe UpperPlugin implements bbcodePlugin{
public function transform(&$var) {
ucfirst($var);
}
public function getStartTag(){
return "[uppercase]";
}
public function getEndTag(){
return "[/uppercase]";
}
}
in that case, bbcode like [video type=youtube] could be implemented, you can think to something like [url pagerank=true] for a seo blog ... etc ..
note that a cache system to create only the needed instance of bbcode could be good, or may be using static tricks to avoid instanciation ...
Change History
comment:1 Changed 3 years ago by mumuri
public function transform($var,$param);
where paramtype?="youtube" for instance
comment:2 Changed 3 years ago by mumuri
where param['type']="youtube" for instance
The text was updated successfully, but these errors were encountered: