Adicionar um novo bbcode no fórum

5 participantes

Ver o tópico anterior Ver o tópico seguinte Ir para baixo

Tópico resolvido Adicionar um novo bbcode no fórum

Mensagem por Antonio Gabriel 01.07.16 1:42

Detalhes da questão


Endereço do fórum: http://forumchavesechapolin.foruns.com.pt/
Versão do fórum: PhpBB3

Descrição


Olá, Queria saber se é possível adicionar em um fórum um BBcode para notícias tipo [news][/news]? tipo nessa foto abaixo
Adicionar um novo bbcode no fórum 2hrk8bb


Última edição por Antonio Gabriel em 01.07.16 22:53, editado 1 vez(es)
Antonio Gabriel

Antonio Gabriel
*

Membro desde : 05/08/2015
Mensagens : 48
Pontos : 70

http://forumchavesechapolin.foruns.com.pt/

Ir para o topo Ir para baixo

Principal Contribuidor

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por Shek 01.07.16 13:01

Olá!

Talvez não seja exatamente o que deseja, mas, procure por informações aqui: https://ajuda.forumeiros.com/t99723-plugin-criar-tags-bbcode Muito feliz

Atenciosamente,
Shek King
Shek

Shek
Principal Contribuidor
Principal Contribuidor

Membro desde : 11/04/2009
Mensagens : 18896
Pontos : 22793

https://shiftactive.blogspot.com/ https://www.facebook.com/ShiftActif https://twitter.com/ShiftActif

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por terabin 01.07.16 14:36

Olá, o seguinte tópico que o Shek passou tem o que você precisa.

Fazendo o favor para você, para ficar como você quer, faça o seguinte:

Adicione o seguinte código javascript com investimento nos tópicos
Código:
/***
 * Aplicação: Criar tags BBCode
 * Descrição: Esta aplicação serve para a criação de novas tags bbcode.
 * Versão: 1.9
 * Feito por Daemon e atualizado em: 13/09/2015
 * Veja mais em: http://ajuda.forumeiros.com
 ***/
jQuery(document).ready(function($) {
 
var bbCodes = {
 
// Nota: Adicione uma vírgula ao final de cada nova entrada;
// O "{ATTR}" é correspondente ao 'título' da tag, e o "{CONTENT}" é correspondente ao texto entre as tags

news: {
replacement : '<div class="news"><p>{ATTR}</p>{CONTENT}</div>'
}
 
// Nota: Não adicione vírgula ao final da última entrada
 
};
 
var p = $(".postbody , .blog_message"); //pega as postagens
 
for(var i = 0, e; (e = p[ i++ ]); ) {
    var entry = $(e);
    $.each(bbCodes, function(tag, value) {
      var re = new RegExp("\\["+tag+"(?:=("|'?)([^\\]]+)\\1)?\\]([\\s\\S]*?)\\[/"+tag+"]", "gi"), match = entry.text().match(re);
      if(match) {
          for(var tag in match) {
              var content = match[tag], b = "$3";
              if(value.replace && value.replace(content)) {
                b = value.replace(content);
              }
              replacement = value.replacement.replace(/{ATTR}/g,"$2").replace(/{CONTENT}/g,b);
              var c = content.replace(re, replacement);
              entry.html(entry.html().replace(content, c));
          }
      }
    });
}
});

Feito isso, adicione no final do seu CSS:
Código:
.news{
    background-color: #EAEAEA;
    width: 100%;
    color: rgb(255, 255, 255);
    box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 5px;
    box-sizing: border-box;
    position: relative;
    text-align: center;
    margin: 8px 0px;
    padding: 8px;
    border-style: solid;
    border-width: 0px;
    font: 14px/20px Museo300Regular, Helvetica, Arial, sans-serif;
}

O conteúdo de suas novidades deve estar entre as tags [news="Título"][/news]
terabin

terabin
**

Membro desde : 11/04/2011
Mensagens : 82
Pontos : 116

http://www.tabernarpg.com

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por Antonio Gabriel 01.07.16 16:24

terabin escreveu:Olá, o seguinte tópico que o Shek passou tem o que você precisa.

Fazendo o favor para você, para ficar como você quer, faça o seguinte:

Adicione o seguinte código javascript com investimento nos tópicos
Código:
/***
 * Aplicação: Criar tags BBCode
 * Descrição: Esta aplicação serve para a criação de novas tags bbcode.
 * Versão: 1.9
 * Feito por Daemon e atualizado em: 13/09/2015
 * Veja mais em: http://ajuda.forumeiros.com
 ***/
jQuery(document).ready(function($) {
 
var bbCodes = {
 
// Nota: Adicione uma vírgula ao final de cada nova entrada;
// O "{ATTR}" é correspondente ao 'título' da tag, e o "{CONTENT}" é correspondente ao texto entre as tags

news: {
replacement : '<div class="news"><p>{ATTR}</p>{CONTENT}</div>'
}
 
// Nota: Não adicione vírgula ao final da última entrada
 
};
 
var p = $(".postbody , .blog_message"); //pega as postagens
 
for(var i = 0, e; (e = p[ i++ ]); ) {
    var entry = $(e);
    $.each(bbCodes, function(tag, value) {
      var re = new RegExp("\\["+tag+"(?:=("|'?)([^\\]]+)\\1)?\\]([\\s\\S]*?)\\[/"+tag+"]", "gi"), match = entry.text().match(re);
      if(match) {
          for(var tag in match) {
              var content = match[tag], b = "$3";
              if(value.replace && value.replace(content)) {
                b = value.replace(content);
              }
              replacement = value.replacement.replace(/{ATTR}/g,"$2").replace(/{CONTENT}/g,b);
              var c = content.replace(re, replacement);
              entry.html(entry.html().replace(content, c));
          }
      }
    });
}
});

Feito isso, adicione no final do seu CSS:
Código:
.news{
    background-color: #EAEAEA;
    width: 100%;
    color: rgb(255, 255, 255);
    box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 5px;
    box-sizing: border-box;
    position: relative;
    text-align: center;
    margin: 8px 0px;
    padding: 8px;
    border-style: solid;
    border-width: 0px;
    font: 14px/20px Museo300Regular, Helvetica, Arial, sans-serif;
}

O conteúdo de suas novidades deve estar entre as tags [news="Título"][/news]
Eu Tentei o codigo @terabin e não deu certo pode me explicar melhor ?
Antonio Gabriel

Antonio Gabriel
*

Membro desde : 05/08/2015
Mensagens : 48
Pontos : 70

http://forumchavesechapolin.foruns.com.pt/

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por Harleen 01.07.16 16:41

Olá Antonio Gabriel, para que funcione use esse código
Código:
$(function() {
  if (!$.sceditor) return;
 
  $.sceditor.command.set('cmd', {
 
  dropDown : function(editor, caller, callback) {
 
    // Adicione abaixo as tags que farão parte da sua lista de comandos, separando-as por vírgula
 
    var items = ['news'];
 
    var content = $(
    '<div>' +
    '  <div>' +
    '    <label>Selecione uma tag</label>' +
    '    <select></select>' +
    '  </div>' +
    '  <div>' +
    '    <label>Título (opcional)</label>' +
    '    <input type="text" id="cmdValue" value="" />' +
    '  </div>' +
    '  <div>' +
    '    <input type="button" class="button" value="Inserir">' +
    '  </div>' +
    '</div>'
    );
            $.each(items, function(key, val) {
                  content.find('select').append('<option class="sceditor-cmd-option" value="' + val + '">' + val + '</option>');
            });
            content.find('.button').click(function(e) {
                callback(content.find('select').val());
                editor.closeDropDown(true);
            });
            editor.createDropDown(caller, "cmd", content);
  },
  // WYSIWYG MODE
  exec : function(caller) {
  var editor = this;
      $.sceditor.command.get('cmd').dropDown(editor, caller, function(cmd) {
        var before = '[' + cmd + ']', end = '[/' + cmd + ']', title = $('#cmdValue').val();
        if(title !== '') {
            before = '[' + cmd + '="' + title + '"]';
            editor.wysiwygEditorInsertHtml(before, end);
        }
      });
  },
  // SOURCE MODE
  txtExec : function(caller) {
  var editor = this;
      $.sceditor.command.get('cmd').dropDown(editor, caller, function(cmd) {
        var title = $('#cmdValue').val();
        if(title) {
            editor.insertText('[' + cmd + '="' + title + '"]','[/' + cmd + ']');
        } else {
            editor.insertText('[' + cmd + ']','[/' + cmd + ']');
        }
      });
  }, tooltip: "Lista de comandos"});
 
  toolbar = toolbar.replace(/quote/,'cmd,quote');
 
  $('head').append(
  '<style type="text/css">' +
  '.sceditor-button-cmd div {' +
  '  background:url(https://cdn2.iconfinder.com/data/icons/snipicons/500/th-list-16.png) !important}' +
  '  .sceditor-cmd {' +
  '  width:auto;' +
  '  height:auto;' +
  '  overflow-y:auto;' +
  '}' +
  '.sceditor-cmd select {' +
  '  margin: 0 0 .75em;' +
  '}' +
  '</style>'
  );
});

Você pode ler mais aqui https://ajuda.forumeiros.com/t100087-

Até mais

Editado... já ia me esquecendo, adicione Javascript em todas as páginas Envergonhado
Harleen

Harleen
Super Membro

Membro desde : 09/07/2012
Mensagens : 1779
Pontos : 2373

https://antenadogames.forumeiros.com/

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por Antonio Gabriel 01.07.16 18:29

Eu já tentei tudo e nada deu certo :/ e fiz todas as ações indicadas
Antonio Gabriel

Antonio Gabriel
*

Membro desde : 05/08/2015
Mensagens : 48
Pontos : 70

http://forumchavesechapolin.foruns.com.pt/

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por terabin 01.07.16 19:33

Antonio, pode enviar o template de seus tópicos aqui? Assim posso adaptar o código.
terabin

terabin
**

Membro desde : 11/04/2011
Mensagens : 82
Pontos : 116

http://www.tabernarpg.com

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por Antonio Gabriel 01.07.16 19:39

terabin escreveu:Antonio, pode enviar o template de seus tópicos aqui? Assim posso adaptar o código.
Não sei exatamente o que é mais seria isso?
Spoiler:
Vale lembrar que eu estou com o javascript de Curtir e no css também
Antonio Gabriel

Antonio Gabriel
*

Membro desde : 05/08/2015
Mensagens : 48
Pontos : 70

http://forumchavesechapolin.foruns.com.pt/

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por terabin 01.07.16 21:21

Antonio, pegue o código do viewtopic_body e poste aqui.
terabin

terabin
**

Membro desde : 11/04/2011
Mensagens : 82
Pontos : 116

http://www.tabernarpg.com

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por Antonio Gabriel 01.07.16 21:30

terabin escreveu:Antonio, pegue o código do viewtopic_body e poste aqui.
Aqui

Código:
<script type="text/javascript">
//<![CDATA[
var multiquote_img_off = '{JS_MULTIQUOTE_IMG_OFF}', multiquote_img_on = '{JS_MULTIQUOTE_IMG_ON}', _atr = '{JS_DIR}addthis/', _ati = '{PATH_IMG_FA}addthis/'{ADDTHIS_LANG}, addthis_localize = { share_caption: "{L_SHARE_CAPTION}", email: "{L_EMAIL}", email_caption: "{L_EMAIL_CAPTION}", favorites: "{L_SHARE_BOOKMARKS}", print: "{L_PRINT}", more: "{L_MORE}" };


$(function(){

    if(typeof(_atc) == "undefined") {
        _atc = {  };
    }

    _atc.cwait = 0;
    $('.addthis_button').mouseup(function(){
        if ($('#at15s').css('display') == 'block') {
            addthis_close();
        }
    });
});

var hiddenMsgLabel = { visible:'{JS_HIDE_HIDDEN_MESSAGE}', hidden:'{JS_SHOW_HIDDEN_MESSAGE}' };
showHiddenMessage = function(id)
{
    try
    {
        var regId = parseInt(id, 10);
        if( isNaN(regId) ) { regId = 0; }

        if( regId > 0)
        {
            $('.post--' + id).toggle(0, function()
         {
            if( $(this).is(":visible") )
            {
               $('#hidden-title--' + id).html(hiddenMsgLabel.visible);
            }
            else
            {
               $('#hidden-title--' + id).html(hiddenMsgLabel.hidden);
            }
         });
        }
    }
    catch(e) { }

   return false;
};

//]]>
</script>

<h1 class="page-title">
   <a href="{TOPIC_URL}">{TOPIC_TITLE}</a>
</h1>
<div class="topic-actions">
   <div class="buttons">

      <!-- BEGIN switch_user_authpost -->
      <a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" class="{POST_IMG_CLASS}" alt="{L_POST_NEW_TOPIC}" /></a>&nbsp;&nbsp;&nbsp;
      <!-- END switch_user_authpost -->

      <!-- BEGIN switch_user_authreply -->
      <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" class="i_reply" alt="{L_POST_REPLY_TOPIC}" /></a>
      <!-- END switch_user_authreply -->
   </div>

   <div class="pathname-box">
      <p>
            <a class="nav" href="{U_INDEX}"><span>{L_INDEX}</span></a>
            <!--{NAV_SEP}<a class="nav" href="{U_ALBUM}"><span>{L_ALBUM}</span></a>-->
            {NAV_CAT_DESC}
        </p>
   </div>

   <p class="right">
        <!-- BEGIN switch_twitter_btn -->
        <span>
            <a href="https://twitter.com/share" class="twitter-share-button" data-via="{TWITTER}">Tweet</a>
            <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
        </span>
        <!-- END switch_twitter_btn -->
      <!-- BEGIN switch_fb_likebtn -->
      <script>(function(d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src = "//connect.facebook.net/{LANGUAGE}/all.js#xfbml=1";
        fjs.parentNode.insertBefore(js, fjs);
      }(document, 'script', 'facebook-jssdk'));</script>
      <span class="fb-like" data-href="{FORUM_URL}{TOPIC_URL}" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></span>
      <!-- END switch_fb_likebtn -->
   </p>

   <div class="pagination">
      {PAGE_NUMBER}
      &nbsp;&bull;&nbsp;
      <a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;pub=forumotion">{L_SHARE}</a>
      <!-- BEGIN switch_plus_menu -->
      &nbsp;&bull;&nbsp;
      <script type="text/javascript">//<![CDATA[
         var url_favourite = '{U_FAVOURITE_JS_PLUS_MENU}';
         var url_newposts = '{U_NEWPOSTS_JS_PLUS_MENU}';
         var url_egosearch = '{U_EGOSEARCH_JS_PLUS_MENU}';
         var url_unanswered = '{U_UNANSWERED_JS_PLUS_MENU}';
         var url_watchsearch = '{U_WATCHSEARCH_JS_PLUS_MENU}';
         var url_tellfriend = '{U_TELLFRIEND_JS_PLUS_MENU}';
         insert_plus_menu_new('f{FORUM_ID}&amp;t={TOPIC_ID}','{JS_SESSION_ID}', {JS_AUTH_FAVOURITES});
      //]]>
      </script>
      <!-- END switch_plus_menu -->
   </div>
   <div class="clear"></div>
</div>

<!-- BEGIN topicpagination -->
<p class="pagination">{PAGINATION}</p>
<!-- END topicpagination -->
<p class="left-box"><a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a>&nbsp;<a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a>&nbsp;<a href="#bottom">{L_GOTO_DOWN}</a></p>
<div class="clear"></div>
{POLL_DISPLAY}

<!-- BEGIN postrow -->
   <!-- BEGIN hidden -->
      <div class="post {postrow.hidden.ROW_COUNT}">
         <div class="inner">
            <span class="corners-top"><span></span></span>
            <p style="text-align:center">{postrow.hidden.MESSAGE}</p>
            <div class="clear"></div>
            <span class="corners-bottom"><span></span></span>
         </div>
      </div>
   <!-- END hidden -->
   <!-- BEGIN displayed -->
      <div id="p{postrow.displayed.U_POST_ID}" class="post {postrow.displayed.ROW_COUNT}{postrow.displayed.ONLINE_IMG_NEW} post--{postrow.displayed.U_POST_ID}"{postrow.displayed.THANK_BGCOLOR} style="{postrow.displayed.DISPLAYABLE_STATE}">
         <div class="inner"><span class="corners-top"><span></span></span>
            <div style="position: relative; top: -30px; width: 1px;" id="{postrow.displayed.U_POST_ID}"></div>
         <div class="postbody">

            <ul class="profile-icons">
               <li>{postrow.displayed.THANK_IMG}</li>
               <li>{postrow.displayed.MULTIQUOTE_IMG}</li>
               <li>{postrow.displayed.QUOTE_IMG}</li>
               <li>{postrow.displayed.EDIT_IMG}</li>
               <li>{postrow.displayed.DELETE_IMG}</li>
               <li>{postrow.displayed.IP_IMG}</li>
               <li>{postrow.displayed.REPORT_IMG_NEW}</li>
            </ul>

            <h2 class="topic-title">{postrow.displayed.ICON} <a href="{postrow.displayed.POST_URL}">{postrow.displayed.POST_SUBJECT}</a></h2>
            <p class="author"><img src="{postrow.displayed.MINI_POST_IMG}" alt="{postrow.displayed.L_MINI_POST_ALT}" title="{postrow.displayed.L_MINI_POST_ALT}" />&nbsp;{L_TOPIC_BY}&nbsp;{postrow.displayed.POSTER_NAME} {postrow.displayed.POST_DATE_NEW}</p>
            <div class="clearfix"></div>

            <!-- BEGIN switch_vote_active -->
            <div class="vote gensmall">
               <!-- BEGIN switch_vote -->
               <div class="vote-button"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}">+</a></div>
               <!-- END switch_vote -->

               <!-- BEGIN switch_bar -->
               <div class="vote-bar" title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}">
                  <!-- BEGIN switch_vote_plus -->
                  <div class="vote-bar-plus" style="height:{postrow.displayed.switch_vote_active.switch_bar.switch_vote_plus.HEIGHT_PLUS}px;"></div>
                  <!-- END switch_vote_plus -->

                  <!-- BEGIN switch_vote_minus -->
                  <div class="vote-bar-minus" style="height:{postrow.displayed.switch_vote_active.switch_bar.switch_vote_minus.HEIGHT_MINUS}px;"></div>
                  <!-- END switch_vote_minus -->
               </div>
               <!-- END switch_bar -->

               <!-- BEGIN switch_no_bar -->
               <div title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}" class="vote-no-bar">----</div>
               <!-- END switch_no_bar -->

               <!-- BEGIN switch_vote -->
               <div class="vote-button"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}">-</a></div>
               <!-- END switch_vote -->
            </div>
            <!-- END switch_vote_active -->

            <div style="display:none"></div>
            <div class="content clearfix">
               <div>{postrow.displayed.MESSAGE}</div>
                  <!-- BEGIN switch_attachments -->
                  <dl class="attachbox">
                     <dt>{postrow.displayed.switch_attachments.L_ATTACHMENTS}</dt>
                     <dd class="attachments">
                        <!-- BEGIN switch_post_attachments -->
                        <dl class="file clearfix">
                           <dt>
                              <img src="{postrow.displayed.switch_attachments.switch_post_attachments.U_IMG}" alt=""/>
                           </dt>
                           <dd>
                              <!-- BEGIN switch_dl_att -->
                              <span><a class="postlink" href="{postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.U_ATTACHMENT}">{postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.ATTACHMENT}</a> {postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.ATTACHMENT_DEL}</span>
                              <!-- END switch_dl_att -->

                              <!-- BEGIN switch_no_dl_att -->
                              <span>{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.ATTACHMENT} {postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.ATTACHMENT_DEL}</span>
                              <!-- END switch_no_dl_att -->

                              <!-- BEGIN switch_no_comment -->
                              <span>{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_comment.ATTACHMENT_COMMENT}</span>
                              <!-- END switch_no_comment -->

                              <!-- BEGIN switch_no_dl_att -->
                              <span><strong>{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.TEXT_NO_DL}</strong></span>
                              <!-- END switch_no_dl_att -->

                              <span>({postrow.displayed.switch_attachments.switch_post_attachments.FILE_SIZE}) {postrow.displayed.switch_attachments.switch_post_attachments.NB_DL}</span>
                           </dd>
                        </dl>
                        <!-- END switch_post_attachments -->
                     </dd>
                  </dl>
                  <!-- END switch_attachments -->
            </div>
            {postrow.displayed.EDITED_MESSAGE}
            <!-- BEGIN switch_signature -->
            <div class="signature_div" id="sig{postrow.displayed.U_POST_ID}">{postrow.displayed.SIGNATURE_NEW}</div>
            <!-- END switch_signature -->
         </div>

         <div class="postprofile" id="profile{postrow.displayed.U_POST_ID}">
            <!-- div class="online2"></div-->
            <dl>
               <dt>
                  {postrow.displayed.POSTER_AVATAR}
                  <br /><strong style="font-size:1.2em">{postrow.displayed.POSTER_NAME}</strong>
               </dt>
               <dd>{postrow.displayed.POSTER_RANK_NEW}{postrow.displayed.RANK_IMAGE}</dd>
               <dd><br /></dd>
               <dd>
                  <!-- BEGIN profile_field -->
                  {postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
                  <!-- END profile_field -->
                  {postrow.displayed.POSTER_RPG}
               </dd>
               <dd><br /></dd>
               <dd>
                  {postrow.displayed.PROFILE_IMG} {postrow.displayed.PM_IMG} {postrow.displayed.EMAIL_IMG}<!-- BEGIN contact_field --> {postrow.displayed.contact_field.CONTENT}<!-- END contact_field -->
               </dd>
            </dl>
         </div>

         <div class="clear"></div>

         <p class="right"><a href="#top">{L_BACK_TO_TOP}</a>&nbsp;<a href="#bottom">{L_GOTO_DOWN}</a></p>
         <span class="corners-bottom"><span></span></span></div>
      </div>
      <!-- BEGIN first_post_br -->
      <hr id="first-post-br" />
      <!-- END first_post_br -->
   <!-- END displayed -->
<!-- END postrow -->

<a name="bottomtitle"></a>

<!-- BEGIN topicpagination -->
<p class="pagination">{PAGINATION}</p>
<!-- END topicpagination -->

<p class="left-box"><a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a>&nbsp;<a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a>&nbsp;<a href="#top">{L_BACK_TO_TOP}</a></p>

<div class="clear"></div>

<div class="noprint">
<!-- BEGIN switch_user_logged_in -->
<!-- BEGIN watchtopic -->
<p class="right">{S_WATCH_TOPIC}</p>
<!-- END watchtopic -->
<!-- END switch_user_logged_in -->
</div>

<!-- BEGIN promot_trafic -->
<div class="post row2" id="ptrafic_close" style="display:none;font-size:1.3em;line-height:1.4em">
   <span class="corners-top"><span></span></span>
   <span class="gensmall"><a href="javascript:ShowHideLayer('ptrafic_open','ptrafic_close');"><img src="{TABS_MORE_IMG}" alt="+" align="" border="0" /></a></span>
   <span class="ptrafic">&nbsp;{PROMOT_TRAFIC_TITLE}</span>
   <span class="corners-bottom"><span></span></span>
</div>
<div class="post row2" id="ptrafic_open" style="display:'';font-size:1.3em;line-height:1.4em">
   <span class="corners-top"><span></span></span>
   <span class="gensmall"><a href="javascript:ShowHideLayer('ptrafic_open','ptrafic_close');"><img src="{TABS_LESS_IMG}" alt="-" align="" border="0" /></a></span>
   <span class="ptrafic">&nbsp;{PROMOT_TRAFIC_TITLE}</span>
   <div class="clear"></div>
   <div>
      <!-- BEGIN link -->
      »&nbsp;<a href="{promot_trafic.link.U_HREF}" target="_blank" title="{promot_trafic.link.TITLE}" rel="nofollow">{promot_trafic.link.TITLE}</a><br />
      <!-- END link -->
   </div>
   <span class="corners-bottom"><span></span></span>
</div>
<!-- END promot_trafic -->

<!-- BEGIN switch_forum_rules -->
<div class="post row1" id="forum_rules">
   <span class="corners-top"><span></span></span>
   <div class="h3">&nbsp;{L_FORUM_RULES}</div>
   <div class="clear"></div>
   <table class="postbody">
      <tr>
         <!-- BEGIN switch_forum_rule_image -->
         <td class="logo">
            <img src="{RULE_IMG_URL}" alt="" />
         </td>
         <!-- END switch_forum_rule_image -->
         <td class="rules content">
            {RULE_MSG}
         </td>
      </tr>
   </table>
   <span class="corners-bottom"><span></span></span>
</div>
<!-- END switch_forum_rules -->

<!-- BEGIN switch_user_logged_in -->
<a name="quickreply"></a>
{QUICK_REPLY_FORM}
<!-- END switch_user_logged_in -->

<hr />

<div class="topic-actions">
   <div class="buttons">
      <!-- BEGIN switch_user_authpost -->
      <a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" class="{POST_IMG_CLASS}" alt="{L_POST_NEW_TOPIC}" /></a>&nbsp;&nbsp;&nbsp;
      <!-- END switch_user_authpost -->

      <!-- BEGIN switch_user_authreply -->
      <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" class="i_reply" alt="{L_POST_REPLY_TOPIC}" /></a>
      <!-- END switch_user_authreply -->
   </div>

   <div class="pathname-box">
      <p><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_SEP}<a class="nav" href="{U_ALBUM}">{L_ALBUM}</a>{NAV_CAT_DESC}</p>
   </div>

   <div class="pagination">
      {PAGE_NUMBER}
   </div>
</div>
<div class="clear"></div>

<form action="{S_JUMPBOX_ACTION}" method="get" onsubmit="if(document.jumpbox.f.value == -1){return false;}">
<fieldset class="jumpbox">
   <label>{L_JUMP_TO}:&nbsp;</label>
   {S_JUMPBOX_SELECT}&nbsp;
   <input class="button2" type="submit" value="{L_GO}" />
</fieldset>
</form>

<!-- BEGIN viewtopic_bottom -->
<form method="get" action="{S_FORM_MOD_ACTION}">
<fieldset class="quickmod">
   <input type="hidden" name="t" value="{TOPIC_ID}" />

   <!-- <input type="hidden" name="sid" value="{S_SID}" /> -->
   <input type="hidden" name="{SECURE_ID_NAME}" value="{SECURE_ID_VALUE}" />
   <label>{L_MOD_TOOLS}:&nbsp;</label>
   {S_SELECT_MOD}&nbsp;
   <input class="button2" type="submit" value="{L_GO}" />
</fieldset>
</form>
<div class="clear"></div>
<p class="right">{S_TOPIC_ADMIN}</p>
<!-- END viewtopic_bottom -->

<!-- BEGIN show_permissions -->
   <div class="h3">{L_TABS_PERMISSIONS}</div>
   {S_AUTH_LIST}
<!-- END show_permissions -->

<!-- BEGIN switch_image_resize -->
<script type="text/javascript">
//<![CDATA[
$(resize_images({ 'selector' : '.postbody .content', 'max_width' : {switch_image_resize.IMG_RESIZE_WIDTH}, 'max_height' : {switch_image_resize.IMG_RESIZE_HEIGHT} }));
//]]>
</script>
<!-- END switch_image_resize -->

<script src="{JS_DIR}addthis/addthis_widget.js" type="text/javascript"></script>
Antonio Gabriel

Antonio Gabriel
*

Membro desde : 05/08/2015
Mensagens : 48
Pontos : 70

http://forumchavesechapolin.foruns.com.pt/

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por terabin 01.07.16 21:39

Não parece ter problema com o template, você seguiu as minhas instruções corretamente?

Colocou o código que enviei com investimento nos tópicos, e criou um tópico onde havia conteúdo entre as tags [news="Título"][/news]?

A box não aparece na edição, apenas no tópico criado.
terabin

terabin
**

Membro desde : 11/04/2011
Mensagens : 82
Pontos : 116

http://www.tabernarpg.com

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por Antonio Gabriel 01.07.16 21:54

terabin escreveu:Não parece ter problema com o template, você seguiu as minhas instruções corretamente?

Colocou o código que enviei com investimento nos tópicos, e criou um tópico onde havia conteúdo entre as tags [news="Título"][/news]?

A box não aparece na edição, apenas no tópico criado.
Fiz exatamente com você explicou e nada meu css está assim

Código:
/*******CURTIR NO POST********/
  #rep_post .reput_vote {
  background-color: #daedfb;
  color: #666;
  -khtml-user-select: none;
  -moz-transition: all,0.15s;
  -moz-user-select: none;
  -ms-user-select: none;
  -o-transition: all,0.15s;
  -webkit-touch-callout: none;
  -webkit-transition: all,0.15s;
  -webkit-user-select: none;
  background: #f0f0f0 url(https://cdn1.iconfinder.com/data/icons/social-media-13/24/Like-16.png) no-repeat 6px center;
  background-size: 12px;
  clear: both;
  color: #666;
  cursor: pointer;
  display: table;
  font-size: 11px;
  font-weight: 400;
  line-height: 18px;
  margin: 5px;
  padding: 3px 5px 3px 25px;
  text-align: right;
  transition: all,0.15s;
}
.reput_vote.zero {
  background-color: #6a6a6a;
}
 
 
  .BS_like:hover {
  background-color: #daedfb;
  color: #666;
}
.BS_like {
  -khtml-user-select: none;
  -moz-transition: all,0.15s;
  -moz-user-select: none;
  -ms-user-select: none;
  -o-transition: all,0.15s;
  -webkit-touch-callout: none;
  -webkit-transition: all,0.15s;
  -webkit-user-select: none;
  background: #f0f0f0 url(https://cdn1.iconfinder.com/data/icons/social-media-13/24/Like-16.png) no-repeat 6px center;
  background-size: 12px;
  clear: both;
  color: #666;
  cursor: pointer;
  display: table;
  font-size: 11px;
  font-weight: 400;
  line-height: 18px;
  margin: 5px;
  padding: 3px 5px 3px 25px;
  text-align: right;
  transition: all,0.15s;
  user-select: none;
}
 
.BS_like:before {
  content: "Curtir";
}
 
  #rep_post .bs_inline {
  list-style: none;
}
 
  .BS_like:hover {
  background-color: #daedfb;
  color: #666;
}
 
  #rep_post {white-space: nowrap;margin: 6px 4px;float: right;}
#rep_post .bs_inline {list-style: none;}
#rep_post .bs_inline > li {display: inline-block;margin: 0 3px;}
#rep_post .bs_inline > li:first-child {margin-left: 0;}
#rep_post .bs_inline img {display: none;}
#rep_post span img {cursor: pointer;}
 
 
.reput_vote.positive {background-color: #8db13e;}
.reput_vote.zero {background-color: #6a6a6a;}
 
#rep_post .reput_vote:before {
  content: "Curtidas ";
}
/***********FIM CURTIR************/
    .news{
        background-color: #EAEAEA;
        width: 100%;
        color: rgb(255, 255, 255);
        box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 5px;
        box-sizing: border-box;
        position: relative;
        text-align: center;
        margin: 8px 0px;
        padding: 8px;
        border-style: solid;
        border-width: 0px;
        font: 14px/20px Museo300Regular, Helvetica, Arial, sans-serif;
    }
Antonio Gabriel

Antonio Gabriel
*

Membro desde : 05/08/2015
Mensagens : 48
Pontos : 70

http://forumchavesechapolin.foruns.com.pt/

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por terabin 01.07.16 22:08

Poderia liberar o acesso ao seu fórum para que eu fizesse algum teste?
terabin

terabin
**

Membro desde : 11/04/2011
Mensagens : 82
Pontos : 116

http://www.tabernarpg.com

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por Antonio Gabriel 01.07.16 22:10

terabin escreveu:Poderia liberar o acesso ao seu fórum para que eu fizesse algum teste?
Sim neste exato momento liberei
Antonio Gabriel

Antonio Gabriel
*

Membro desde : 05/08/2015
Mensagens : 48
Pontos : 70

http://forumchavesechapolin.foruns.com.pt/

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por terabin 01.07.16 22:17

Troque o código javascript por esse:
Código:
/***
 * Aplicação: Criar tags BBCode
 * Descrição: Esta aplicação serve para a criação de novas tags bbcode.
 * Versão: 1.9
 * Feito por Daemon e atualizado em: 13/09/2015
 * Veja mais em: http://ajuda.forumeiros.com
 ***/
jQuery(document).ready(function($) {
 
var bbCodes = {
 
// Nota: Adicione uma vírgula ao final de cada nova entrada;
// O "{ATTR}" é correspondente ao 'título' da tag, e o "{CONTENT}" é correspondente ao texto entre as tags
 
news: {
replacement : '<div class="news"><p>{ATTR}</p>{CONTENT}</div>'
}
 
// Nota: Não adicione vírgula ao final da última entrada
 
};
 
var p = $(".postbody , .blog_message"); //pega as postagens
 
for(var i = 0, e; (e = p[ i++ ]); ) {
    var entry = $(e);
    $.each(bbCodes, function(tag, value) {
      var re = new RegExp("\\["+tag+"(?:=(\"|'?)([^\\]]+)\\1)?\\]([\\s\\S]*?)\\[/"+tag+"]", "gi"), match = entry.text().match(re);
      if(match) {
          for(var tag in match) {
              var content = match[tag], b = "$3";
              if(value.replace && value.replace(content)) {
                b = value.replace(content);
              }
              replacement = value.replacement.replace(/{ATTR}/g,"$2").replace(/{CONTENT}/g,b);
              var c = content.replace(re, replacement);
              entry.html(entry.html().replace(content, c));
          }
      }
    });
}
});
terabin

terabin
**

Membro desde : 11/04/2011
Mensagens : 82
Pontos : 116

http://www.tabernarpg.com

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por Antonio Gabriel 01.07.16 22:21

terabin escreveu:Troque o código javascript por esse:
Código:
/***
 * Aplicação: Criar tags BBCode
 * Descrição: Esta aplicação serve para a criação de novas tags bbcode.
 * Versão: 1.9
 * Feito por Daemon e atualizado em: 13/09/2015
 * Veja mais em: http://ajuda.forumeiros.com
 ***/
jQuery(document).ready(function($) {
 
var bbCodes = {
 
// Nota: Adicione uma vírgula ao final de cada nova entrada;
// O "{ATTR}" é correspondente ao 'título' da tag, e o "{CONTENT}" é correspondente ao texto entre as tags
 
news: {
replacement : '<div class="news"><p>{ATTR}</p>{CONTENT}</div>'
}
 
// Nota: Não adicione vírgula ao final da última entrada
 
};
 
var p = $(".postbody , .blog_message"); //pega as postagens
 
for(var i = 0, e; (e = p[ i++ ]); ) {
    var entry = $(e);
    $.each(bbCodes, function(tag, value) {
      var re = new RegExp("\\["+tag+"(?:=("|'?)([^\\]]+)\\1)?\\]([\\s\\S]*?)\\[/"+tag+"]", "gi"), match = entry.text().match(re);
      if(match) {
          for(var tag in match) {
              var content = match[tag], b = "$3";
              if(value.replace && value.replace(content)) {
                b = value.replace(content);
              }
              replacement = value.replacement.replace(/{ATTR}/g,"$2").replace(/{CONTENT}/g,b);
              var c = content.replace(re, replacement);
              entry.html(entry.html().replace(content, c));
          }
      }
    });
}
});
Trocado já ouve uma mudança agora já aparece como se existisse mais sem cores de fundo
Antonio Gabriel

Antonio Gabriel
*

Membro desde : 05/08/2015
Mensagens : 48
Pontos : 70

http://forumchavesechapolin.foruns.com.pt/

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por terabin 01.07.16 22:22

Troque o código que mandei para a folha de estilo CSS:
Código:
.news{
  background-color: #EAEAEA;
  width: 100%;
  color: rgb(255, 255, 255);
  box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 5px;
  box-sizing: border-box;
  position: relative;
  text-align: center;
  margin: 8px 0px;
  padding: 8px;
  border-style: solid;
  border-width: 0px;
  font: 14px/20px Museo300Regular, Helvetica, Arial, sans-serif;
}
terabin

terabin
**

Membro desde : 11/04/2011
Mensagens : 82
Pontos : 116

http://www.tabernarpg.com

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por Antonio Gabriel 01.07.16 22:26

terabin escreveu:Troque o código que mandei para a folha de estilo CSS:
Código:
.news{
  background-color: #EAEAEA;
  width: 100%;
  color: rgb(255, 255, 255);
  box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 5px;
  box-sizing: border-box;
  position: relative;
  text-align: center;
  margin: 8px 0px;
  padding: 8px;
  border-style: solid;
  border-width: 0px;
  font: 14px/20px Museo300Regular, Helvetica, Arial, sans-serif;
}
Trocado já estamos quase lá, falta a definição das cores
Adicionar um novo bbcode no fórum Dwupw4
Antonio Gabriel

Antonio Gabriel
*

Membro desde : 05/08/2015
Mensagens : 48
Pontos : 70

http://forumchavesechapolin.foruns.com.pt/

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por terabin 01.07.16 22:32

Por fim, substitua novamente o CSS que mandei:
Código:
.news {
    background-color: #FEFFEF;
    border-style: solid;
    border: 1px solid #F5DEB4;
    box-shadow: rgba(0,0,0,0.4) 0 1px 5px;
    box-sizing: border-box;
    color: #fff;
    font-family: Museo300Regular,Helvetica,Arial,sans-serif;
    font-size: 14px;
    font-style: normal;
    font-variant: normal;
    font-weight: normal;
    line-height: 20px;
    margin: 8px 0;
    padding: 8px;
    position: relative;
    text-align: center;
    width: 100%;
}
.news p{ 
 background-color: #F5DEB4;
 margin-bottom: 1em;
 position: relative;
 top: -8px;
 padding: 7px;
 width: 101%;
 left: -8px;
 border-bottom: 1px solid #eaeaea;
}
terabin

terabin
**

Membro desde : 11/04/2011
Mensagens : 82
Pontos : 116

http://www.tabernarpg.com

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por Antonio Gabriel 01.07.16 22:36

terabin escreveu:Por fim, substitua novamente o CSS que mandei:
Código:
.news {
    background-color: #FEFFEF;
    border-style: solid;
    border: 1px solid #F5DEB4;
    box-shadow: rgba(0,0,0,0.4) 0 1px 5px;
    box-sizing: border-box;
    color: #fff;
    font-family: Museo300Regular,Helvetica,Arial,sans-serif;
    font-size: 14px;
    font-style: normal;
    font-variant: normal;
    font-weight: normal;
    line-height: 20px;
    margin: 8px 0;
    padding: 8px;
    position: relative;
    text-align: center;
    width: 100%;
}
.news p{ 
 background-color: #F5DEB4;
 margin-bottom: 1em;
 position: relative;
 top: -8px;
 padding: 7px;
 width: 101%;
 left: -8px;
 border-bottom: 1px solid #eaeaea;
}
Ta quase certo mais o conteúdo da noticia esta branco quase invisivel
Antonio Gabriel

Antonio Gabriel
*

Membro desde : 05/08/2015
Mensagens : 48
Pontos : 70

http://forumchavesechapolin.foruns.com.pt/

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por terabin 01.07.16 22:37

Atualize novamente:
Código:
.news {
    background-color: #FEFFEF;
    border-style: solid;
    border: 1px solid #F5DEB4;
    box-shadow: rgba(0,0,0,0.4) 0 1px 5px;
    box-sizing: border-box;
    font-family: Museo300Regular,Helvetica,Arial,sans-serif;
    font-size: 14px;
    font-style: normal;
    font-variant: normal;
    font-weight: normal;
    line-height: 20px;
    margin: 8px 0;
    padding: 8px;
    position: relative;
    text-align: center;
    width: 100%;
}
.news p{ 
 background-color: #F5DEB4;
 margin-bottom: 1em;
 position: relative;
 top: -8px;
 padding: 7px;
 width: 101%;
 left: -8px;
 border-bottom: 1px solid #eaeaea;
}
terabin

terabin
**

Membro desde : 11/04/2011
Mensagens : 82
Pontos : 116

http://www.tabernarpg.com

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por Antonio Gabriel 01.07.16 22:45

terabin escreveu:Atualize novamente:
Código:
.news {
    background-color: #FEFFEF;
    border-style: solid;
    border: 1px solid #F5DEB4;
    box-shadow: rgba(0,0,0,0.4) 0 1px 5px;
    box-sizing: border-box;
    font-family: Museo300Regular,Helvetica,Arial,sans-serif;
    font-size: 14px;
    font-style: normal;
    font-variant: normal;
    font-weight: normal;
    line-height: 20px;
    margin: 8px 0;
    padding: 8px;
    position: relative;
    text-align: center;
    width: 100%;
}
.news p{ 
 background-color: #F5DEB4;
 margin-bottom: 1em;
 position: relative;
 top: -8px;
 padding: 7px;
 width: 101%;
 left: -8px;
 border-bottom: 1px solid #eaeaea;
}
Troquei agora tá assim
Adicionar um novo bbcode no fórum 28lguas
Antonio Gabriel

Antonio Gabriel
*

Membro desde : 05/08/2015
Mensagens : 48
Pontos : 70

http://forumchavesechapolin.foruns.com.pt/

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por terabin 01.07.16 22:46

Tem certeza de que fez corretamente?

Tente esse:
Código:
.news {
    background-color: #FEFFEF;
    border-style: solid;
    border: 1px solid #F5DEB4;
    box-shadow: rgba(0,0,0,0.4) 0 1px 5px;
    box-sizing: border-box;
    font-family: Museo300Regular,Helvetica,Arial,sans-serif;
    font-size: 14px;
    font-style: normal;
    font-variant: normal;
    font-weight: normal;
    line-height: 20px;
    margin: 8px 0;
    padding: 8px;
    position: relative;
    text-align: center;
    width: 100%;
}
.news p{ 
 background-color: #F5DEB4;
 margin-bottom: 1em;
 position: relative;
 top: -8px;
 padding: 7px;
 width: 101%;
 left: -8px;
 border-bottom: 1px solid #eaeaea;
}

evite espaço na primeira linha.
terabin

terabin
**

Membro desde : 11/04/2011
Mensagens : 82
Pontos : 116

http://www.tabernarpg.com

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por Antonio Gabriel 01.07.16 22:49

terabin escreveu:Tem certeza de que fez corretamente?

Tente esse:
Código:
.news {
    background-color: #FEFFEF;
    border-style: solid;
    border: 1px solid #F5DEB4;
    box-shadow: rgba(0,0,0,0.4) 0 1px 5px;
    box-sizing: border-box;
    font-family: Museo300Regular,Helvetica,Arial,sans-serif;
    font-size: 14px;
    font-style: normal;
    font-variant: normal;
    font-weight: normal;
    line-height: 20px;
    margin: 8px 0;
    padding: 8px;
    position: relative;
    text-align: center;
    width: 100%;
}
.news p{ 
 background-color: #F5DEB4;
 margin-bottom: 1em;
 position: relative;
 top: -8px;
 padding: 7px;
 width: 101%;
 left: -8px;
 border-bottom: 1px solid #eaeaea;
}

evite espaço na primeira linha.
Funcionou o o primeiro ponto .news havia sumido funcionou muito Obrigado @terabin
Antonio Gabriel

Antonio Gabriel
*

Membro desde : 05/08/2015
Mensagens : 48
Pontos : 70

http://forumchavesechapolin.foruns.com.pt/

Ir para o topo Ir para baixo

Tópico resolvido Re: Adicionar um novo bbcode no fórum

Mensagem por while 02.07.16 0:07

Questão marcada como Resolvida ou o Autor solicitou que ela fosse arquivada.
Tópico marcado como Resolvido e movido para Questões resolvidas.
while

while
Hiper Membro

Membro desde : 24/04/2016
Mensagens : 3263
Pontos : 4761

http://www.ajuda.forumeiros.com https://www.facebook.com/profile.php?id=100012157981279

Ir para o topo Ir para baixo

Ver o tópico anterior Ver o tópico seguinte Ir para o topo

- Tópicos semelhantes

Permissões neste sub-fórum
Não podes responder a tópicos