Autor Tópico: Group prefix postfix text  (Lida 7010 vezes)

0 Membros e 1 Visitante estão a ver este tópico.

Offline candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5072
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
Group prefix postfix text
« em: 06 de Novembro de 2014, 12:24 »
Autor deste mod não está ativo por muito tempo, então eu decidi escrever esta mensagem com instruções de instalação para SMF 2.0.x:

./Sources/ManageMembergroups.php

Encontre e Selecionar

Código: [Seleccione]
// Do the update of the membergroup settings.

Adicionar Antes

Código: [Seleccione]
// Add the postfix prefix to the modsettings
    $ppfix=array();
if(isset($_POST['group_prefix']))$ppfix['prefix_group'. $_REQUEST['group']]=$_POST['group_prefix'];
if(isset($_POST['group_postfix']))$ppfix['postfix_group'. $_REQUEST['group']]=$_POST['group_postfix'];
if(!empty($ppfix))
updateSettings($ppfix);
//this really isn't necessary....
$modSettings['prefix_group'.$_REQUEST['group']]=(isset($_POST['group_prefix']))?$_POST['group_prefix']:'';
$modSettings['postfix_group'.$_REQUEST['group']]=(isset($_POST['group_postfix']))?$_POST['group_postfix']:'';



Pesqusiar

Código: [Seleccione]
'min_posts' => $row['min_posts'],
'max_messages' => $row['max_messages'],

Adicionar antes

Código: [Seleccione]
'group_prefix' => (isset($modSettings['prefix_group'.$_REQUEST['group']])) ? $modSettings['prefix_group'.$_REQUEST['group']] : '', // Membergroup Prefix
'group_postfix' => (isset($modSettings['postfix_group'.$_REQUEST['group']])) ? $modSettings['postfix_group'.$_REQUEST['group']] : '' , // Membergroup Postfix




./Sources/Load.php

Pesquisar

Código: [Seleccione]
// What a monstrous array...

Adicionar antes

Código: [Seleccione]
$pre_title=isset($modSettings['prefix_group'.$profile['id_group']])?$modSettings['prefix_group'.$profile['id_group']]:'';
$post_title=isset($modSettings['postfix_group'.$profile['id_group']])?$modSettings['postfix_group'.$profile['id_group']]:'';
$pre_title=((strlen($pre_title)==0) && isset($modSettings['prefix_group'.$profile['id_post_group']])) ?$modSettings['prefix_group'.$profile['id_post_group']]: $pre_title;
$post_title=((strlen($post_title)==0) && isset($modSettings['postfix_group'.$profile['id_post_group']])) ?$modSettings['postfix_group'.$profile['id_post_group']]: $post_title;



Pesquisar por

Código: [Seleccione]
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['id_member'] . '" title="' . $txt['profile_of'] . ' ' . $profile['real_name'] . '">' . $profile['real_name'] . '</a>',

Ou Pesquisar por este

Código: [Seleccione]
'colorless_link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['id_member'] . '" title="' . $txt['profile_of'] . ' ' . $profile['real_name'] . '">' . $profile['real_name'] . '</a>',

Trocar por este codigo veja bem porque e mesmo diferente

Código: [Seleccione]
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['id_member'] . '" title="' . $txt['profile_of'] . ' ' . $profile['real_name'] . '" style="color:'.$profile['member_group_color'].';">'. $pre_title . $profile['real_name'] . $post_title . '</a>',


Pesquisar por

Código: [Seleccione]
'group_color' => $profile['member_group_color'],

Adicionar antes

Código: [Seleccione]

'prefix' => isset($modSettings['prefix_group'.$profile['id_group']])?$modSettings['prefix_group'.$profile['id_group']]:'',
'postfix' => isset($modSettings['postfix_group'.$profile['id_group']])?$modSettings['postfix_group'.$profile['id_group']]:'',





./Themes/default/ManageMembergroups.template.php


Pesquisar por
Código: [Seleccione]
<dt>
<label for="star_count_input"><strong>', $txt['membergroups_star_count'], ':</strong></label>
</dt>


Adicionar antes

Código: [Seleccione]
<dt>
<label for="group_prefix_input"><strong>', $txt['group_prefix'], ':</strong></label>
</dt>
<dd>
<input type="text" name="group_prefix" id="group_prefix_input" value="', $context['group']['group_prefix'], '" size="20" class="input_text" />
</dd>

<dt>
<label for="group_postfix_input"><strong>', $txt['group_postfix'], ':</strong></label>
</dt>
<dd>
<input type="text" name="group_postfix" id="group_postfix_input" value="', $context['group']['group_postfix'], '" size="20" class="input_text" />
</dd>





./Themes/default/languages/Admin.portuguese_pt.php

Pesquisar

Código: [Seleccione]
?>

Adicionar

Código: [Seleccione]
$txt['group_prefix']="Grupo Prefixo";
$txt['group_postfix']="Grupo Prefixo";


Offline Jorge Alexandre

  • Iniciar SmfPt
  • *
  • Mensagens: 10
  • Rank: 0
  • Sexo: Masculino
  • Hosting by Aplichost.com
Re: Group prefix postfix text
« Responder #1 em: 07 de Julho de 2016, 01:36 »
este mode serve para que?

Offline candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5072
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
Re: Group prefix postfix text
« Responder #2 em: 13 de Julho de 2016, 04:30 »
Prefixo para grupo de membros vou colocar aqui imagem para ver com fica

mais vem deste mod

http://custom.simplemachines.org/mods/index.php?mod=709