No, you need to change the class name, but there are more errors. It worked for me after doing the following:
1. copied your file to
plugins/telegramiv/syntax.php
2. created a
plugin.info.txt also
3. changed owner of folder
plugins/telegramiv[/m] and all files in it to [m]www-data (the webserver user)
4. changed the class name into
class syntax_plugin_telegramiv extends DokuWiki_Syntax_Plugin
{
/*...*/
}
5. changed the
connectTo()[/m] and [m]postConnect() methods:
public function connectTo($mode)
{
$this->Lexer->addEntryPattern('<cover.*?>(?=.*<\/cover>)', $mode, 'plugin_telegramiv');
}
public function postConnect()
{
$this->Lexer->addExitPattern('</cover>', 'plugin_telegramiv');
}
6. created a test wiki page with content
<cover>TEST-123</cover> and
it worked