[Novo] Replace

Relação de BBCodes para incrementar seu phpBB3.
Avatar do usuário
Chico Gois
Administrador
Administrador
Mensagens: 3923
Registrado em: 03 Jul 2004, 03:53
Nome Real: Chico Gois
Localização: São Paulo - Capital
Contato:
MSG 1500+AvatarLenda

[Novo] Replace

  • Favoritar esta postagem
  • Mensagem por Chico Gois »

    Uso do BBCode:

    Código: Selecionar todos

    [replace]{TEXT}[/replace]
    Substituição do HTML:

    Código: Selecionar todos

    <div style="border-left: 4px solid #28a745; background: #e6ffec; padding: 10px; margin: 10px 0; font-family: 'Courier New', monospace;">
        <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px;">
            <strong style="color: #155724;">✅ SUBSTITUIR POR:</strong>
            <a href="#" onclick="selectCode(this); return false;" style="color: #155724; font-size: 0.8em; text-decoration: none; border: 1px solid #28a745; padding: 1px 5px; border-radius: 3px; background: #fff;">Selecionar tudo</a>
        </div>
        <pre style="margin: 0;"><code style="color: #444; white-space: pre-wrap; display: block; user-select: all;">{TEXT}</code></pre>
    </div>
    
    <script>
    if (typeof selectCode !== 'function') {
        function selectCode(a) {
            var e = a.parentNode.parentNode.getElementsByTagName('code')[0];
            if (window.getSelection) {
                var s = window.getSelection();
                var r = document.createRange();
                r.selectNodeContents(e);
                s.removeAllRanges();
                s.addRange(r);
            } else if (document.selection) {
                var r = document.body.createTextRange();
                r.moveToElementText(e);
                r.select();
            }
        }
    }
    </script>
    Linha de ajuda:

    Código: Selecionar todos

    [replace]Seu texto aqui [/replace]
    Ex.:
    ✅ SUBSTITUIR POR:Selecionar tudo
    if (empty($old_state))
    				{
    					$this->container->get('user')->add_lang_ext('sitesplat/bbmembership', 'info_acp_bbmembership');
    					$this->container->get('template')->assign_var('L_EXTENSION_ENABLE_SUCCESS', $this->container->get('user')->lang['EXTENSION_ENABLE_SUCCESS'] .
    						(isset($this->container->get('user')->lang['BBMEMBERSHIP_NOTICE']) ?
    							sprintf($this->container->get('user')->lang['BBMEMBERSHIP_NOTICE'],
    											$this->container->get('user')->lang['ACP_CAT_GENERAL'],
    											$this->container->get('user')->lang['ACP_QUICK_ACCESS'],
    											$this->container->get('user')->lang['ACP_BBMEMBERSHIP_TITLE'])  : ''));
    				}
    Responder