Vorlage:AB: Unterschied zwischen den Versionen
Aus Afterbuy-Wiki
Admin (Diskussion | Beiträge) |
Admin (Diskussion | Beiträge) |
||
Zeile 1: | Zeile 1: | ||
<phptag> | <phptag> | ||
$quotes=array('„','“',"'",'"','”'); | $quotes=array('„','“',"'",'"','”'); | ||
+ | |||
+ | $needles=array("(?)","(+)","(-)"); | ||
+ | $replace=array('<html> <span style="color:#547392;"><i class="fas fa-question-circle"></i></span> </html>', | ||
+ | '<html> <span style="color:#333;"><i class="fas fa-plus"></i></span> </html>', | ||
+ | '<html> <span style="color:#333;"><i class="fas fa-minus"></i></span> </html>' | ||
+ | ); | ||
+ | |||
if(is_array($argv) && !empty($argv)){ | if(is_array($argv) && !empty($argv)){ | ||
array_shift($argv); | array_shift($argv); | ||
Zeile 11: | Zeile 18: | ||
$content=str_replace($quotes,'',trim($argv[1])); | $content=str_replace($quotes,'',trim($argv[1])); | ||
} | } | ||
− | $content=str_replace( | + | $content=str_replace($needles,$replace,$content); |
echo '<html><span class="'.$class.'"></html>'.$content.'<html></span></html>'; | echo '<html><span class="'.$class.'"></html>'.$content.'<html></span></html>'; | ||
} | } | ||
</phptag> | </phptag> |
Aktuelle Version vom 12. November 2021, 09:20 Uhr
Afterbuy-Element