LInks para parcerias

Started by Amendoim, April 26, 2009, 08:04:30 PM

Previous topic - Next topic

Amendoim

Ora boas pessoal..

Bem, andava por o forum do candidosa de suporte, e vi um codigo de parcerias que me interessou imenso, mas o codigo infelizmente e so para os visitantes verem..

não á maneira, de mudificar o codigo de maneira a dar para os membros todos verem? tanto visitantes como membros admins etc..

eu estou presisando urgente o codigo mesmo  ::)

ai vai o codigo abaixo:




BoardIndex.template.php

Pesquisar
// Show the login bar. (it's only true if they are logged out anyway.)

if ($context['show_login_bar'])

{

echo '

<tr>

<td class="titlebg" colspan="2">', $txt[34], ' <a href="', $scripturl, '?action=reminder" class="smalltext">(' . $txt[315] . ')</a></td>

</tr>

<tr>

<td class="windowbg" width="20" align="center">

<a href="', $scripturl, '?action=login"><img src="', $settings['images_url'], '/icons/login.gif" alt="', $txt[34], '" /></a>

</td>

<td class="windowbg2" valign="middle">

<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">

<table border="0" cellpadding="2" cellspacing="0" align="center" width="100%"><tr>

<td valign="middle" align="left">

<label for="user"><b>', $txt[35], ':</b><br />

<input type="text" name="user" id="user" size="15" /></label>

</td>

<td valign="middle" align="left">

<label for="passwrd"><b>', $txt[36], ':</b><br />

<input type="password" name="passwrd" id="passwrd" size="15" /></label>

</td>

<td valign="middle" align="left">

<label for="cookielength"><b>', $txt[497], ':</b><br />

<input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>

</td>

<td valign="middle" align="left">

<label for="cookieneverexp"><b>', $txt[508], ':</b><br />

<input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="check" /></label>

</td>

<td valign="middle" align="left">

<input type="submit" value="', $txt[34], '" />

</td>

</tr></table>

</form>

</td>

</tr>';

}


Adicionar por baixo

// Modu *_*SoutH*_* translate by smfpt.net candidosa2
echo '

<br><br><table border="0" width="100%" class="tborder" cellspacing="' , ($context['browser']['is_ie'] || $context['browser']['is_opera6']) ? '1' : '0' , '" cellpadding="4" style="margin-bottom: 2ex;">
<tr>
<td class="titlebg">Paginas Amigas</td>
</tr><tr>
<td valign="middle" align="center" height="30">';
echo'<fieldset>
<legend>Sites de Amigos</legend>
<a href="index.php?action=pm;sa=send;u=1">Link da Pagina</a> | <a href="index.php?action=pm;sa=send;u=1">Link da Pagina</a> | <a href="index.php?action=pm;sa=send;u=1">Link da Pagina</a> | <a href="index.php?action=pm;sa=send;u=1">Link da Pagina</a> | <a href="index.php?action=pm;sa=send;u=1">Link da Pagina</a></fieldset>

</table>';
}

echo '
</table></div>';



Obrigado! ;)
Versão 2.0 RC2 Portuguese_Pt

Simple Portal 2.3 Portuguese_Pt

Em crescimento na programação :)

http://www.gamextuga.com

margarett

Deves ter colado o código "uma chaveta" do sítio onde devias ter posto...

Dá-me ideia que ficou dentro do "if show login bar" que, obviamente, só aparece aos visitantes ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Amendoim

Quote from: margarett on April 29, 2009, 10:55:55 AM
Deves ter colado o código "uma chaveta" do sítio onde devias ter posto...

Dá-me ideia que ficou dentro do "if show login bar" que, obviamente, só aparece aos visitantes ;)


Nao estou a perceber bem, ficou dentro de if show login bar, mas eu vejo que nao, nao sei :S

Podia-me explicar melhor?
Versão 2.0 RC2 Portuguese_Pt

Simple Portal 2.3 Portuguese_Pt

Em crescimento na programação :)

http://www.gamextuga.com

margarett

Pela descrição do código acima, não devia ter ficado, de facto.

Se não é essa chaveta, é outra :P Mas para só aparecer a visitantes é porque, de facto, está pendurado numa condição que assume este facto.

Anexa aí o BoadIndex.template.php ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Amendoim

Aqui vai em anexo..

Esta no fim o codigo!

Obrigado margarett ;)
Versão 2.0 RC2 Portuguese_Pt

Simple Portal 2.3 Portuguese_Pt

Em crescimento na programação :)

http://www.gamextuga.com

margarett

#5
Tal como eu previa, tens o código das parcerias afectado pela condição que disse acima. Daí só aparecer aos visitantes ;)

E também acho que o código tá mal "montado". Falta um fecho de célula e linha na tabela. deixa lá ver se consigo montar isso...

edit:
Não tenho a certeza que esteja correcto, há uns "/divs" no fim que já não consigo perceber de onde vêm, mas deve ser assim (substitui até ao fim):

// Show the login bar. (it's only true if they are logged out anyway.)
if ($context['show_login_bar'])
{
/*echo '
<tr>
<td class="titlebg" colspan="2">', $txt[34], ' <a href="', $scripturl, '?action=reminder" class="smalltext">(' . $txt[315] . ')</a></td>
</tr>
<tr>
<td class="windowbg" width="20" align="center">
<a href="', $scripturl, '?action=login"><img src="', $settings['images_url'], '/icons/login.gif" alt="', $txt[34], '" /></a>
</td>
<td class="windowbg2" valign="middle">
<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<table border="0" cellpadding="2" cellspacing="0" align="center" width="100%"><tr>
<td valign="middle" align="left">
<label for="user"><b>', $txt[35], ':</b><br />
<input type="text" name="user" id="user" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="passwrd"><b>', $txt[36], ':</b><br />
<input type="password" name="passwrd" id="passwrd" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="cookielength"><b>', $txt[497], ':</b><br />
<input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>
</td>
<td valign="middle" align="left">
<label for="cookieneverexp"><b>', $txt[508], ':</b><br />
<input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="check" /></label>
</td>
<td valign="middle" align="left">
<input type="submit" value="', $txt[34], '" />
</td>
</tr></table>
</form>
</td>
</tr>';*/
               
}
// Modu *_*SoutH*_* translate by smfpt.net candidosa2
echo '

<tr>
<td class="titlebg" colspan="2">Paginas Amigas</td>
</tr>
<tr>
<td valign="middle" align="center" height="30" colspan="2">
<fieldset>
<legend>Sites de Amigos</legend>
<a href="index.php?action=pm;sa=send;u=1">Link da Pagina</a> | <a href="index.php?action=pm;sa=send;u=1">Link da Pagina</a> | <a href="index.php?action=pm;sa=send;u=1">Link da Pagina</a> | <a href="index.php?action=pm;sa=send;u=1">Link da Pagina</a> | <a href="index.php?action=pm;sa=send;u=1">Link da Pagina</a></fieldset>
</td>
</tr>';

echo '
</table>
</div>
</div>';
}

?>


Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Amendoim

Margarett, infelizmente algo se passa..

O codigo, esta introduzido, o antigo, mas á um problema!
Quando tento apagar o codigo, ficando normal, dá um erro de parser,
E se substituir esse codigo que me deste, da varios erros..

Vou-te passar o board.index por anexo, e ve o que se passa se faz favor, esta mesmo no fim o codigo ;)
Se conseguires editar com o teu codigo era porreiro!
Versão 2.0 RC2 Portuguese_Pt

Simple Portal 2.3 Portuguese_Pt

Em crescimento na programação :)

http://www.gamextuga.com

Amendoim

Es um genio margreet  ;D

Funcionou bem, editei varias vezes ate conseguir o desejado..

agora so tem uma coisa, eu queria colocar com fundo, ou seja, tas a ver a parte onde tem quem esta online, o sitiu das legendas etc..
Bem, o mod manual nao insere isso, e fica com fundo branco, alem de nao estar bem ligado a baixo do "utilizares online"..

Como posso juntar ao utilizadores online, sem ter aquele espaço branco (aquela tirinha) e posso por um fundo igual ou parecido ao resto do forum, sem tar tudo branco? :)


Segue uma print  ;)


Obrigado..
Versão 2.0 RC2 Portuguese_Pt

Simple Portal 2.3 Portuguese_Pt

Em crescimento na programação :)

http://www.gamextuga.com

margarett

Passa-me outra vez o BoardIndex, agora já corrigido. Isso tem de se juntar a tabela à do Info Center.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Amendoim

Margarett, ja tenho dois Modos de parcerias..

Este seu que me fez, mais um que tenho no meu forum por baixo :D
Quando este que tenho agora, ponho o outro por baixo, testado e ficam assim com muito mais local para parcerias..

grato mesmo ;)
Versão 2.0 RC2 Portuguese_Pt

Simple Portal 2.3 Portuguese_Pt

Em crescimento na programação :)

http://www.gamextuga.com

Advertisement: