Inserir trancado, anúncio global, tópico fixo (estilo Alpha)

Suporte à dúvidas gerais relacionadas ao phpBB.
Holmes
Membro Avançado
Membro Avançado
Mensagens: 1142
Registrado em: 23 Fev 2012, 15:21
Localização: Brasil
Contato:
Você favoritou esta postagem

Inserir trancado, anúncio global, tópico fixo (estilo Alpha)

  • Remover marcador da postagem
  • Mensagem por Holmes »

    Qual a URL do seu fórum: http://www.chaman-linux.com/manjaro
    Tipo de Hospedagem: Compartilhada (HostGator Brasil)
    Qual a versão do phpBB: phpBB 3.0.11
    É um novo ou uma conversão: Instalação Limpa
    Usuário de teste: chaman senha: chaman
    Estilos instalados: Alpha
    Modificações instaladas: "Quem Esteve Aqui?"; "Resolvido";
    Qual seu nivel de experiência: Iniciante
    Quando começou o problema: Constatei
    Descreva seu problema: oi pessoal, estou tentando inserir "trancado, anúncio global, tópico fixo" e para isto estou seguindo esse tópico meu

    viewtopic.php?f=147&t=45999

    todavia não encontro por completo o código indicado pelo robra

    Código: Selecionar todos

    <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG}<!-- ENDIF --> <a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
    o que acho é isto

    Código: Selecionar todos

    <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
    peguei esse código do estilo prosilver, pois o meu estilo, o alpha, está usando o do prosilver! então, abaixo posto o conteúdo do arquivo viewforum_body.html

    Código: Selecionar todos

    <!-- INCLUDE overall_header.html -->
    <!-- IF U_MCP --><p>[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ENDIF -->
    <h2><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2>
    
    <!-- IF FORUM_DESC or MODERATORS or U_MCP -->
    <div>
    	<!-- NOTE: remove the style="display: none" when you want to have the forum description on the forum body -->
    	<!-- IF FORUM_DESC --><div style="display: none !important;">{FORUM_DESC}<br /></div><!-- ENDIF -->
    	<!-- IF MODERATORS --><p><strong><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->:</strong> {MODERATORS}</p><!-- ENDIF -->
    </div>
    <!-- ENDIF -->
    
    <!-- IF S_FORUM_RULES -->
    	<div class="rules">
    		<div class="inner"><span class="corners-top"><span></span></span>
    
    		<!-- IF U_FORUM_RULES -->
    			<a href="{U_FORUM_RULES}">{L_FORUM_RULES}</a>
    		<!-- ELSE -->
    			<strong>{L_FORUM_RULES}</strong><br />
    			{FORUM_RULES}
    		<!-- ENDIF -->
    
    		<span class="corners-bottom"><span></span></span></div>
    	</div>
    <!-- ENDIF -->
    
    <!-- IF S_HAS_SUBFORUM -->
    <!-- IF not S_IS_BOT and U_MARK_FORUMS -->
    <ul class="linklist">
    	<li class="rightside"><a href="{U_MARK_FORUMS}">{L_MARK_SUBFORUMS_READ}</a></li>
    </ul>
    <!-- ENDIF -->
    	<!-- INCLUDE forumlist_body.html -->
    <!-- ENDIF -->
    
    <!-- IF S_DISPLAY_POST_INFO or PAGINATION or TOTAL_POSTS or TOTAL_TOPICS -->
    	<div class="topic-actions" <!-- IF S_HAS_SUBFORUM -->style="margin-top: 2em;"<!-- ENDIF -->>
    
    	<!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO -->
    		<div class="buttons">
    			<div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->post-icon<!-- ENDIF -->" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->"><a href="{U_POST_NEW_TOPIC}"><span></span><!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF --></a></div>
    		</div>
    	<!-- ENDIF -->
    
    	<!-- IF S_DISPLAY_SEARCHBOX -->
    		<div class="search-box">
    			<form method="get" id="forum-search" action="{S_SEARCHBOX_ACTION}">
    			<fieldset>
    				<input class="inputbox search tiny" type="text" name="keywords" id="search_keywords" size="20" value="{L_SEARCH_FORUM}" onclick="if (this.value == '{LA_SEARCH_FORUM}') this.value = '';" onblur="if (this.value == '') this.value = '{LA_SEARCH_FORUM}';" />
    				<input class="button2" type="submit" value="{L_SEARCH}" />
    				{S_SEARCH_LOCAL_HIDDEN_FIELDS}
    			</fieldset>
    			</form>
    		</div>
    	<!-- ENDIF -->
    
    	<!-- IF PAGINATION or TOTAL_POSTS or TOTAL_TOPICS -->
    		<div class="pagination">
    			<!-- IF not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}" accesskey="m">{L_MARK_TOPICS_READ}</a> &bull; <!-- ENDIF --><!-- IF TOTAL_TOPICS -->{TOTAL_TOPICS}<!-- ENDIF -->
    			<!-- IF PAGE_NUMBER -->
    				<!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF -->
    			<!-- ENDIF -->
    		</div>
    	<!-- ENDIF -->
    
    	</div>
    <!-- ENDIF -->
    
    <!-- IF S_NO_READ_ACCESS -->
    
    	<div class="panel">
    		<div class="inner"><span class="corners-top"><span></span></span>
    		<strong>{L_NO_READ_ACCESS}</strong>
    		<span class="corners-bottom"><span></span></span></div>
    	</div>
    
    	<!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
    
    		<form action="{S_LOGIN_ACTION}" method="post">
    
    		<div class="panel">
    			<div class="inner"><span class="corners-top"><span></span></span>
    
    			<div class="content">
    				<h3><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a><!-- IF S_REGISTER_ENABLED -->&nbsp; &bull; &nbsp;<a href="{U_REGISTER}">{L_REGISTER}</a><!-- ENDIF --></h3>
    
    				<fieldset class="fields1">
    				<dl>
    					<dt><label for="username">{L_USERNAME}:</label></dt>
    					<dd><input type="text" tabindex="1" name="username" id="username" size="25" value="{USERNAME}" class="inputbox autowidth" /></dd>
    				</dl>
    				<dl>
    					<dt><label for="password">{L_PASSWORD}:</label></dt>
    					<dd><input type="password" tabindex="2" id="password" name="password" size="25" class="inputbox autowidth" /></dd>
    					<!-- IF S_AUTOLOGIN_ENABLED --><dd><label for="autologin"><input type="checkbox" name="autologin" id="autologin" tabindex="3" /> {L_LOG_ME_IN}</label></dd><!-- ENDIF -->
    					<dd><label for="viewonline"><input type="checkbox" name="viewonline" id="viewonline" tabindex="4" /> {L_HIDE_ME}</label></dd>
    				</dl>
    				<dl>
    					<dt>&nbsp;</dt>
    					<dd><input type="submit" name="login" tabindex="5" value="{L_LOGIN}" class="button1" /></dd>
    				</dl>
    				{S_LOGIN_REDIRECT}
    				</fieldset>
    			</div>
    
    			<span class="corners-bottom"><span></span></span></div>
    		</div>
    
    		</form>
    
    	<!-- ENDIF -->
    
    <!-- ENDIF -->
    
    <!-- BEGIN topicrow -->
    
    	<!-- IF not topicrow.S_TOPIC_TYPE_SWITCH and not topicrow.S_FIRST_ROW -->
    		</ul>
    		<span class="corners-bottom"><span></span></span></div>
    	</div>
    	<!-- ENDIF -->
    
    	<!-- IF topicrow.S_FIRST_ROW or not topicrow.S_TOPIC_TYPE_SWITCH -->
    		<div class="forumbg<!-- IF topicrow.S_TOPIC_TYPE_SWITCH and (topicrow.S_POST_ANNOUNCE or topicrow.S_POST_GLOBAL) --> announcement<!-- ENDIF -->">
    		<div class="inner"><span class="corners-top"><span></span></span>
    		<ul class="topiclist">
    			<li class="header">
    				<dl class="icon">
    					<dt><!-- IF S_DISPLAY_ACTIVE -->{L_ACTIVE_TOPICS}<!-- ELSEIF topicrow.S_TOPIC_TYPE_SWITCH and (topicrow.S_POST_ANNOUNCE or topicrow.S_POST_GLOBAL) -->{L_ANNOUNCEMENTS}<!-- ELSE -->{L_TOPICS}<!-- ENDIF --></dt>
    					<dd class="posts">{L_REPLIES}</dd>
    					<dd class="views">{L_VIEWS}</dd>
    					<dd class="lastpost"><span>{L_LAST_POST}</span></dd>
    				</dl>
    			</li>
    		</ul>
    		<ul class="topiclist topics">
    	<!-- ENDIF -->
    
    		<li class="row<!-- IF topicrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF topicrow.S_POST_GLOBAL --> global-announce<!-- ENDIF --><!-- IF topicrow.S_POST_ANNOUNCE --> announce<!-- ENDIF --><!-- IF topicrow.S_POST_STICKY --> sticky<!-- ENDIF --><!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ENDIF -->">
    			<dl class="icon" style="background-image: url({topicrow.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
    				<dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a><!-- IF topicrow.SOLVED_TOPIC -->&nbsp;&nbsp;<a href="{topicrow.U_SOLVED_TOPIC}" class="topictitle"{topicrow.SOLVED_STYLE}>{topicrow.SOLVED_TOPIC}</a><!-- ENDIF -->
    					<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
    					<!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
    					<!-- IF topicrow.PAGINATION --><strong class="pagination"><span>{topicrow.PAGINATION}</span></strong><!-- ENDIF -->
    					<!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
    				</dt>
    				<dd class="posts">{topicrow.REPLIES} <dfn>{L_REPLIES}</dfn></dd>
    				<dd class="views">{topicrow.VIEWS} <dfn>{L_VIEWS}</dfn></dd>
    				<dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
    					<!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{topicrow.LAST_POST_TIME}</span>
    				</dd>
    			</dl>
    		</li>
    
    	<!-- IF topicrow.S_LAST_ROW -->
    			</ul>
    		<span class="corners-bottom"><span></span></span></div>
    	</div>
    	<!-- ENDIF -->
    
    <!-- BEGINELSE -->
    	<!-- IF S_IS_POSTABLE -->
    	<div class="panel">
    		<div class="inner"><span class="corners-top"><span></span></span>
    		<strong>{L_NO_TOPICS}</strong>
    		<span class="corners-bottom"><span></span></span></div>
    	</div>
    	<!-- ENDIF -->
    <!-- END topicrow -->
    
    <!-- IF S_SELECT_SORT_DAYS and not S_DISPLAY_ACTIVE -->
    	<form method="post" action="{S_FORUM_ACTION}">
    		<fieldset class="display-options">
    			<!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
    			<!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
    	<!-- IF not S_IS_BOT -->
    			<label>{L_DISPLAY_TOPICS}: {S_SELECT_SORT_DAYS}</label>
    			<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
    			<label>{S_SELECT_SORT_DIR} <input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
    	<!-- ENDIF -->
    		</fieldset>
    	</form>
    	<hr />
    <!-- ENDIF -->
    
    <!-- IF .topicrow and not S_DISPLAY_ACTIVE -->
    	<div class="topic-actions">
    		<!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO -->
    		<div class="buttons">
    			<div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->post-icon<!-- ENDIF -->" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->"><a href="{U_POST_NEW_TOPIC}"><span></span><!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF --></a></div>
    		</div>
    		<!-- ENDIF -->
    
    		<!-- IF PAGINATION or TOTAL_POSTS or TOTAL_TOPICS -->
    		<div class="pagination">
    			<!-- IF TOTAL_TOPICS and not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}">{L_MARK_TOPICS_READ}</a> &bull;  <!-- ENDIF -->
    			<!-- IF TOTAL_POSTS and not NEWEST_USER --> {TOTAL_POSTS}<!-- ELSEIF TOTAL_TOPICS and not NEWEST_USER --> {TOTAL_TOPICS}<!-- ENDIF -->
    			<!-- IF TOTAL_USERS -->{TOTAL_USERS}<!-- ENDIF -->
    			<!-- IF PAGINATION --> &bull;  <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a>
    			 &bull;  <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF -->
    		</div>
    		<!-- ENDIF -->
    	</div>
    <!-- ENDIF -->
    
    <!-- INCLUDE jumpbox.html -->
    
    <!-- IF S_DISPLAY_ONLINE_LIST -->
    	<h3><!-- IF U_VIEWONLINE --><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a><!-- ELSE -->{L_WHO_IS_ONLINE}<!-- ENDIF --></h3>
    	<p>{LOGGED_IN_USER_LIST}</p>
    <!-- ENDIF -->
    
    <!-- IF S_DISPLAY_POST_INFO -->
    	<h3>{L_FORUM_PERMISSIONS}</h3>
    	<p><!-- BEGIN rules -->{rules.RULE}<br /><!-- END rules --></p>
    <!-- ENDIF -->
    
    <!-- INCLUDE overall_footer.html -->
    alguém poderia me orientar nessa tarefa?

    vlw fwi, Holmes
    Avatar do usuário
    _Vinny_
    Administrador
    Administrador
    Mensagens: 6031
    Registrado em: 03 Set 2009, 21:59
    Contato:
    Você favoritou esta postagem

    Re: Inserir trancado, anúncio global, tópico fixo (estilo Al

  • Remover marcador da postagem
  • Mensagem por _Vinny_ »

    É exatamente a linha:

    Código: Selecionar todos

    <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
    Tradução Português Brasileiro: https://www.phpbb.com/customise/db/translation/brazilian_portuguese/

    Precisa de serviços phpBB? Me mande um mensagem privada ou visite https://vinny.quest
    Holmes
    Membro Avançado
    Membro Avançado
    Mensagens: 1142
    Registrado em: 23 Fev 2012, 15:21
    Localização: Brasil
    Contato:
    Você favoritou esta postagem

    Re: Inserir trancado, anúncio global, tópico fixo (estilo Al

  • Remover marcador da postagem
  • Mensagem por Holmes »

    ok _Vinny_, mas ocorreu um problema. com a mudança ele duplicou todos os títulos dos tópicos, veja
    duplicou.png
    usei esse parâmetro

    Código: Selecionar todos

    <!-- IF topicrow.S_POST_GLOBAL --><strong><b>An&uacute;ncio Global: </b></strong><!-- ENDIF --><!-- IF topicrow.S_POST_ANNOUNCE --><strong><b>An&uacute;ncio: </b></strong><!-- ENDIF --><!-- IF topicrow.S_POST_STICKY --><strong><b>T&oacute;pico Fixo: </b></strong><!-- ENDIF --><!-- IF topicrow.S_TOPIC_LOCKED --><strong><b>Trancado: </b></strong><!-- ENDIF --><!-- IF topicrow.S_TOPIC_MOVED --><strong><b>Movido: </b></strong><!-- ENDIF --><!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG}<!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
    estranho isto?

    vlw fwi, Holmes
    Você não está autorizado a ver ou baixar esse anexo.
    Avatar do usuário
    robra
    Membro Sênior
    Membro Sênior
    Mensagens: 6065
    Registrado em: 02 Dez 2010, 23:29
    Você favoritou esta postagem

    Re: Inserir trancado, anúncio global, tópico fixo (estilo Al

  • Remover marcador da postagem
  • Mensagem por robra »

    Tá de brincadeira...
    Como você quer que funcione as linhas que foram postadas para inserir os referidos textos em outro estilo, sem adaptá-las para o seu estilo :?:
    Vamos pensar: Imagem
    Na 2ª mensagem do tópico que você cita, pede-se para encontrar uma linha e substituí-la por "outras". Repare que a linha a ser substituída permanece no final destas "outras" que a substituirão, ou seja, a linha encontrada permanece e apenas foram inseridas condições IF com os textos "Anúncio Global", "Anúncio", "Tópico Fixo", "Trancado", e "Movido", para que eles apareçam antes do título na lista dos tópicos.
    Seguindo esta linha de raciocínio, o que você tem de fazer é identificar a linha que corresponde ao título dos tópicos na lista, no viewforum_body.html de seu estilo, permanecer com ela e inserir as mesmas condições IF.

    Abraço. Imagem
    [DICA] Antes de abrir um Novo Tópico, procure saber se a sua dúvida já foi respondida. Pesquise no Google por palavras(em inglês também) relacionadas à ela, somado à palavra "phpbb".
    Holmes
    Membro Avançado
    Membro Avançado
    Mensagens: 1142
    Registrado em: 23 Fev 2012, 15:21
    Localização: Brasil
    Contato:
    Você favoritou esta postagem

    Re: Inserir trancado, anúncio global, tópico fixo (estilo Al

  • Remover marcador da postagem
  • Mensagem por Holmes »

    queeeeeeeeeeeeeeeeeeeeee

    achei a linha

    Código: Selecionar todos

    <!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a><!-- IF topicrow.SOLVED_TOPIC -->&nbsp;&nbsp;<a href="{topicrow.U_SOLVED_TOPIC}" class="topictitle"{topicrow.SOLVED_STYLE}>{topicrow.SOLVED_TOPIC}</a><!-- ENDIF -->
    e adicionei isto

    Código: Selecionar todos

    <!-- IF topicrow.S_POST_GLOBAL --><strong><b>Global: </b></strong><!-- ENDIF --><!-- IF topicrow.S_POST_ANNOUNCE --><strong><b>Anuncio: </b></strong><!-- ENDIF --><!-- IF topicrow.S_POST_STICKY --><strong><b>Fijo: </b></strong><!-- ENDIF --><!-- IF topicrow.S_TOPIC_LOCKED --><strong><b>Cerrado: </b></strong><!-- ENDIF --><!-- IF topicrow.S_TOPIC_MOVED --><strong><b>Movido: </b></strong><!-- ENDIF -->
    depois de

    Código: Selecionar todos

    <!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->
    e ante de

    Código: Selecionar todos

    <a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a><!-- IF topicrow.SOLVED_TOPIC -->&nbsp;&nbsp;<a href="{topicrow.U_SOLVED_TOPIC}" class="topictitle"{topicrow.SOLVED_STYLE}>{topicrow.SOLVED_TOPIC}</a><!-- ENDIF -->
    funcionou...

    vlw fwi, Holmes
    Trancado