Autor Tópico: Hide Tag Special  (Lida 7406 vezes)

0 Membros e 5 Visitantes estão a ver este tópico.

Offline candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5072
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
Hide Tag Special
« em: 17 de Novembro de 2007, 23:44 »
sourcedir/ManagePosts.php

Código: [Seleccione]
'posts' => array('ModifyPostSettings', 'admin_forum'),
Código: [Seleccione]
'posts' => array('ModifyPostSettings', 'admin_forum'),
'hidetagspecial' => array('ModifyHideTagSpecialSettings', 'admin_forum'),

Código: [Seleccione]
'href' => $scripturl . '?action=postsettings;sa=posts',
'is_selected' => $_REQUEST['sa'] == 'posts',
);

Código: [Seleccione]
'href' => $scripturl . '?action=postsettings;sa=posts',
'is_selected' => $_REQUEST['sa'] == 'posts',
);
$context['admin_tabs']['tabs'][] = array(
'title' => $txt['hidetagspecial_titel'],
'description' => $txt['hidetagspecial_description'],
'href' => $scripturl . '?action=postsettings;sa=hidetagspecial',
'is_selected' => $_REQUEST['sa'] == 'hidetagspecial',
);

Código: [Seleccione]
// Bulletin Board Code...a lot of Bulletin Board Code.
function ModifyBBCSettings()

Código: [Seleccione]
//This is everything you need for the hide tag special in posts :)
function ModifyHideTagSpecialSettings()
{
global $txt, $scripturl, $context, $settings, $sc, $db_prefix, $modSettings;

// Setup the template.
$context['sub_template'] = 'edit_hidetagspecial_settings';
$context['page_title'] = $txt['hidetagspecial_titel'];

// Wanna save this page?
if (isset($_POST['save_settings']))
{
checkSession();

global $func;

//Prepare Textareas :)

$_POST['hide_hiddentext'] = $func['htmlspecialchars'](stripslashes($_POST['hide_hiddentext']), ENT_QUOTES);
$_POST['hide_unhiddentext'] = $func['htmlspecialchars'](stripslashes($_POST['hide_unhiddentext']), ENT_QUOTES);

//Allowed Groups ;)
if(!empty($_POST['hide_autounhidegroups'])) {
$new_array = array();
foreach($_POST['hide_autounhidegroups'] as $i) {
$i = (int) $i;
if(!empty($i))
$new_array[$i] = $i;
}
$_POST['hide_autounhidegroups'] = implode(',', $new_array);
}

// Update the actual settings.
updateSettings(array(
'hide_MUIswitch' => empty($_POST['hide_MUIswitch']) ? '0' : '1',
'hide_enableHTML' => empty($_POST['hide_enableHTML']) ? '0' : '1',
'hide_useSpanTag' => empty($_POST['hide_useSpanTag']) ? '0' : '1',
'hide_enableUnhiddenText' => empty($_POST['hide_enableUnhiddenText']) ? '0' : '1',
'hide_hiddentext' => empty($_POST['hide_hiddentext']) ? '' : $_POST['hide_hiddentext'],
'hide_unhiddentext' => empty($_POST['hide_unhiddentext']) ? '' : $_POST['hide_unhiddentext'],
'hide_posUnhiddenText' => empty($_POST['hide_posUnhiddenText']) || $_POST['hide_posUnhiddenText'] > 4 ? 4 : $_POST['hide_posUnhiddenText'],
'hide_onlyonetimeinfo' => empty($_POST['hide_onlyonetimeinfo']) ? '0' : '1',
'hide_noinfoforguests' => empty($_POST['hide_noinfoforguests']) ? '0' : '1',
'hide_autounhidegroups' => empty($_POST['hide_autounhidegroups']) ? '' : $_POST['hide_autounhidegroups'],
'hide_minpostunhide' => empty($_POST['hide_minpostunhide']) ? '0' : (int) $_POST['hide_minpostunhide'],
'hide_minpostautounhide' => empty($_POST['hide_minpostautounhide']) ? '0' : (int) $_POST['hide_minpostautounhide'],
'hide_karmaenable' => !empty($_POST['hide_karmaenable']) && !empty($modSettings['karmaMode']) ? '1' : '0',
'hide_minkarmaunhide' => empty($_POST['hide_minkarmaunhide']) ? '0' : (int) $_POST['hide_minkarmaunhide'],
'hide_minkarmaautounhide' => empty($_POST['hide_minkarmaautounhide']) ? '0' : (int) $_POST['hide_minkarmaautounhide'],
'hide_minimumkarmaandpost' => empty($_POST['hide_minimumkarmaandpost']) ? '0' : '1',
'hide_onlykarmagood' => empty($_POST['hide_onlykarmagood']) ? '0' : '1',
));

redirectexit('action=postsettings;sa=hidetagspecial');
}

//Load membergroups.
$modSettings['hide_autounhidegroups'] = !empty($modSettings['hide_autounhidegroups']) ? explode(',', $modSettings['hide_autounhidegroups']) : array();
$request = db_query("
SELECT groupName, ID_GROUP, minPosts
FROM {$db_prefix}membergroups
ORDER BY minPosts, ID_GROUP != 1, ID_GROUP != 2, ID_GROUP != 3, groupName", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
{
$context['groups'][(int) $row['ID_GROUP']] = array(
'id' => $row['ID_GROUP'],
'name' => trim($row['groupName']),
'checked' => in_array($row['ID_GROUP'], $modSettings['hide_autounhidegroups']),
'is_post_group' => $row['minPosts'] != -1,
);
}
mysql_free_result($request);
//Sorry for the lazyness... but it's easier...
loadLanguage('ManageBoards');

}

// Bulletin Board Code...a lot of Bulletin Board Code.
function ModifyBBCSettings()


sourcedir/Display.php

Código: [Seleccione]
// Find the previous or next topic.  Make a fuss if there are no more.
Código: [Seleccione]
//Okay let's Check an prepare ;)
$context['user_post_avaible'] = 0; //Standard Show no hidden content ;)

//Only a Member Thing ;)
if (!$user_info['is_guest']) {
$check_for_hide = true;

//Groupcheck ;D
if($check_for_hide && !empty($modSettings['hide_autounhidegroups'])) {
$modSettings['hide_autounhidegroups'] = explode(',', $modSettings['hide_autounhidegroups']);
foreach($user_info['groups'] as $group_id)
if(in_array($group_id, $modSettings['hide_autounhidegroups'])) {
$check_for_hide = false;
$context['user_post_avaible'] = 1;
break; //One is enouph ;D
}
} }

$karmaOk = false;
$postOk = false;

//Okay know let's look for the post minimum ;D
if($check_for_hide && (!empty($modSettings['hide_minpostunhide']) || !empty($modSettings['hide_minpostautounhide']))) {
//Load the posts data ;D
global $user_settings;

//Need a minimum post to unhide?
if(!empty($modSettings['hide_minpostunhide']) && $modSettings['hide_minpostunhide'] > 0 && $user_settings['posts'] < $modSettings['hide_minpostunhide']) {
$postOk = true;
$check_for_hide = false;
}

//Auto Unhide????
if(!empty($modSettings['hide_minpostautounhide']) && $modSettings['hide_minpostautounhide'] > 0 && $user_settings['posts'] > $modSettings['hide_minpostautounhide']) {
$check_for_hide = false;
$context['user_post_avaible'] = 1;
}

}
else
$postOk = true;

//Okay Check Karma Things :)
if(!empty($modSettings['karmaMode']) && $check_for_hide && !empty($modSettings['hide_karmaenable'])) {
//Karma Check :D for this i need to load the user infos :x
loadMemberData($ID_MEMBER);
loadMemberContext($ID_MEMBER);
global $memberContext;

if(!empty($modSettings['hide_onlykarmagood']))
$karmaValue = $memberContext[$ID_MEMBER]['karma']['good'];
else
$karmaValue = $memberContext[$ID_MEMBER]['karma']['good'] - $memberContext[$ID_MEMBER]['karma']['bad'];

//Need a minimum karma to unhide?
if(!empty($modSettings['hide_minkarmaunhide']) && $karmaValue < $modSettings['hide_minkarmaunhide']) {
$check_for_hide = false;
$karmaOk = true;
}

//Auto Unhide for Karma?
if(!empty($modSettings['hide_minkarmaautounhide']) && $karmaValue > $modSettings['hide_minkarmaautounhide']) {
$check_for_hide = false;
$context['user_post_avaible'] = 1;
}

}
else
$karmaOk = true;

// Find if there a post from you in this thread :) (For the hide tag)
if(empty($context['user_post_avaible']) && $check_for_hide) {
$request = db_query("
SELECT ID_MSG, ID_MEMBER
FROM {$db_prefix}messages
WHERE ID_TOPIC = $topic AND ID_MEMBER = $ID_MEMBER
LIMIT 1", __FILE__, __LINE__);

if (mysql_num_rows($request)) $context['user_post_avaible'] = 1;
else $context['user_post_avaible'] = 0;
mysql_free_result($request);
}
}


sourcedir/Post.php

Código: [Seleccione]
$form_message = preg_replace('~<br(?: /)?' . '>~i', "\n", $form_message);
Código: [Seleccione]
//Remove Hidden content... i don't need a information for this...
$form_message = preg_replace("~\[hide\](.+?)\[\/hide\]~i", "&nbsp;", $form_message);
$form_message = preg_replace(array('~\n?\[hide.*?\].+?\[/hide\]\n?~is', '~^\n~', '~\[/hide\]~'), "&nbsp;", $form_message);

Código: [Seleccione]
FROM ({$db_prefix}messages AS m, {$db_prefix}boards AS b)
Código: [Seleccione]
, m.ID_MEMBER AS ID_MEMBER_CHECK, b.ID_BOARD as ID_BOARD_CHECK
FROM ({$db_prefix}messages AS m, {$db_prefix}boards AS b)


Código: [Seleccione]
$context['sub_template'] = 'modifyfast';
$context['message'] = array(

Código: [Seleccione]
//This is a check that SMF not do... i will check if he allowed to edit or edit any
global $ID_MEMBER;

if(!allowedTo('modify_any', $row['ID_BOARD_CHECK']) && $ID_MEMBER != $row['ID_MEMBER_CHECK']) {
//Remove the Hidden Content because it's only for the master post *g*
$row['body'] = preg_replace("/\[hide\](.+?)\[\/hide\]/i", "&nbsp;", $row['body']);
$row['body'] = preg_replace(array('~\n?\[hide.*?\].+?\[/hide\]\n?~is', '~^\n~', '~\[/hide\]~'), "&nbsp;", $row['body']);
}

$context['sub_template'] = 'modifyfast';
$context['message'] = array(


Código: [Seleccione]
// Remove any nested quotes.
if (!empty($modSettings['removeNestedQuotes']))

Código: [Seleccione]
//Remove the Hidden Content because it's only for the master post *g*
$row['body'] = preg_replace("/\[hide\](.+?)\[\/hide\]/i", "&nbsp;", $row['body']);
$row['body'] = preg_replace(array('~\n?\[hide.*?\].+?\[/hide\]\n?~is', '~^\n~', '~\[/hide\]~'), "&nbsp;", $row['body']);

// Remove any nested quotes.
if (!empty($modSettings['removeNestedQuotes']))



sourcedir/Search.php

Código: [Seleccione]
// Do the censor thang...
censorText($message['body']);

Código: [Seleccione]
$message['body'] = preg_replace("/\[hide\](.+?)\[\/hide\]/i", "&nbsp;", $message['body']);
$message['body'] = preg_replace(array('~\n?\[hide.*?\].+?\[/hide\]\n?~is', '~^\n~', '~\[/hide\]~'), "&nbsp;", $message['body']);


sourcedir/Subs.php

Código: [Seleccione]
global $txt, $scripturl, $context, $modSettings, $user_info;
static $bbc_codes = array(), $itemcodes = array(), $no_autolink_tags = array();
static $disabled;

Código: [Seleccione]
//On the first Parsing i will gernerate all things i need ;) after that it's not needable :)
if(!isset($modSettings['hide_preparedOption'])) {
//First there is nothing in it ;)
$modSettings['hide_preparedOption']['hiddentext'] = '&nbsp;';
$modSettings['hide_preparedOption']['unhiddentext'] = '&nbsp;';

if(empty($modSettings['hide_noinfoforguests']) || !$user_info['is_guest']) {

//Prepare the hidden information :)
$modSettings['hide_preparedOption']['hiddentext'] = isset($modSettings['hide_hiddentext']) ? $modSettings['hide_hiddentext'] : '';
$modSettings['hide_preparedOption']['hiddentext'] = str_replace('$language', $user_info['language'], $modSettings['hide_preparedOption']['hiddentext']);
if (!empty($modSettings['hide_MUIswitch']) && isset($txt['hide_hiddentext']))
$modSettings['hide_preparedOption']['hiddentext'] = str_replace('$txtvariable', $txt['hide_hiddentext'], $modSettings['hide_preparedOption']['hiddentext']);
if (!empty($modSettings['hide_enableHTML']))
$modSettings['hide_preparedOption']['hiddentext'] = un_htmlspecialchars($modSettings['hide_preparedOption']['hiddentext']);

//Prepare the unhidden infomation?
if(!empty($modSettings['hide_enableUnhiddenText'])) {
$modSettings['hide_preparedOption']['unhiddentext'] = isset($modSettings['hide_unhiddentext']) ? $modSettings['hide_unhiddentext'] : '';
$modSettings['hide_preparedOption']['unhiddentext'] = str_replace('$language', $user_info['language'], $modSettings['hide_preparedOption']['unhiddentext']);
if (!empty($modSettings['hide_MUIswitch']) && isset($txt['hide_unhiddentext']))
$modSettings['hide_preparedOption']['unhiddentext'] = str_replace('$txtvariable', $txt['hide_unhiddentext'], $modSettings['hide_preparedOption']['unhiddentext']);
if (!empty($modSettings['hide_enableHTML']))
$modSettings['hide_preparedOption']['unhiddentext'] = un_htmlspecialchars($modSettings['hide_preparedOption']['unhiddentext']);
}
}
}

//Hide Mod.. i remove the code before i do anything...
if($message !== false && !empty($message)) {
if((empty($context['user_post_avaible']) || !isset($context['user_post_avaible'])) && !empty($modSettings['hide_onlyonetimeinfo'])) {
//Okay some more things to do, i must check if there a hidden content... without i need do nothing ;)
if(preg_match("/\[hide\](.+?)\[\/hide\]/i", $message) != 0 || preg_match("/\[hide(.+?)\](.+?)\[\/hide\]/i", $message) != 0) {
//Add the Hidden Text at the end of the post :)
$message .= '[br]'.$modSettings['hide_preparedOption']['hiddentext'];
}
}
//Here i remove this content :) or show onetime unhide info :)
if(!isset($context['user_post_avaible']) || empty($context['user_post_avaible'])) {
//Remove it ;D
$message = preg_replace("/\[hide\](.+?)\[\/hide\]/i", (empty($modSettings['hide_onlyonetimeinfo']) ? $modSettings['hide_preparedOption']['hiddentext'] : "&nbsp"), $message);
$message = preg_replace(array('~\n?\[hide.*?\].+?\[/hide\]\n?~is', '~^\n~', '~\[/hide\]~'), (empty($modSettings['hide_onlyonetimeinfo']) ? $modSettings['hide_preparedOption']['hiddentext'] : "&nbsp"), $message);
}
elseif(!empty($context['user_post_avaible']) && !empty($modSettings['hide_onlyonetimeinfo']) && !empty($modSettings['hide_enableUnhiddenText'])) {
//Okay i need to add the unhidden information at the end of the post :)
if(preg_match("/\[hide\](.+?)\[\/hide\]/i", $message) != 0 || preg_match("/\[hide(.+?)\](.+?)\[\/hide\]/i", $message) != 0) {
$message .= '[br]'.$modSettings['hide_preparedOption']['unhiddentext'];
}
}
}


Código: [Seleccione]
array(
'tag' => 'white',
'before' => '<span style="color: white;">',
'after' => '</span>',
),


Código: [Seleccione]
array(
'tag' => 'hide',
'before' => '<div class="hiddencontent">',
'after' => '</div>'.(!empty($modSettings['hide_enableUnhiddenText']) && empty($modSettings['hide_onlyonetimeinfo']) ? $modSettings['hide_preparedOption']['unhiddentext'] : ''),
),


Código: [Seleccione]
// Cleanup whitespace.
$message = strtr($message, array('  ' => ' &nbsp;', "\r" => '', "\n" => '<br />', '<br /> ' => '<br />&nbsp;', '' => "\n"));


Código: [Seleccione]
// Cleanup whitespace.
$message = strtr($message, array('  ' => ' &nbsp;', "\r" => '', "\n" => '<br />', '<br /> ' => '<br />&nbsp;', '' => "\n"));

//Clean up some missing removed hide close tags...
if(preg_match("/\[\/hide\]/i", $message) != 0)
$message = preg_replace("/\[\/hide\]/i", '', $message);


themedir/Admin.template.php

Código: [Seleccione]
function template_convert_entities()

Código: [Seleccione]
// Template for editing post settings.
function template_edit_hidetagspecial_settings()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;

echo '
<form action="', $scripturl, '?action=postsettings;sa=hidetagspecial" method="post" accept-charset="', $context['character_set'], '">
<table border="0" cellspacing="0" cellpadding="4" align="center" width="80%" class="tborder">
<tr class="titlebg">
<td colspan="2">', $txt['hidetagspecial_titel'], '</td>
</tr>
<tr class="windowbg2">
<th width="50%" align="right">
<label for="hide_MUIswitch_check">', $txt['hide_MUIswitch'], '</label> <span style="font-weight: normal;">(<a href="', $scripturl, '?action=helpadmin;help=hide_MUIswitch_help" onclick="return reqWin(this.href);">?</a>)</span>:
</th>
<td valign="top">
<input type="checkbox" name="hide_MUIswitch" id="hide_MUIswitch_check"', empty($modSettings['hide_MUIswitch']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr>
<tr class="windowbg2">
<th width="50%" align="right">
<label for="hide_enableHTML_check">', $txt['hide_enableHTML'], ':<br />
<span class="smalltext" style="font-weight: normal;">'.$txt['hide_enableHTML_help'].'</span></label>
</th>
<td valign="top">
<input type="checkbox" name="hide_enableHTML" id="hide_enableHTML_check"', empty($modSettings['hide_enableHTML']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr>
<tr class="windowbg2">
<th width="50%" align="right">
<label for="hide_enableUnhiddenText_check">', $txt['hide_enableUnhiddenText'], ':  <span style="font-weight: normal;">(<a href="', $scripturl, '?action=helpadmin;help=hide_unhiddentext_help" onclick="return reqWin(this.href);">?</a>)</span>
</th>
<td valign="top">
<input type="checkbox" name="hide_enableUnhiddenText" id="hide_enableUnhiddenText_check"', empty($modSettings['hide_enableUnhiddenText']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr>
<tr class="windowbg2">
<td colspan="2"><hr /></td>
</tr>
<tr class="windowbg2">
<th width="50%" align="right">
<label for="hide_hiddentext_textarea">', $txt['hide_hiddentext'], ' <span style="font-weight: normal;">(<a href="', $scripturl, '?action=helpadmin;help=hide_text_help" onclick="return reqWin(this.href);">?</a>)</span>:<br />
<span class="smalltext" style="font-weight: normal;">'.$txt['hide_hiddentext_help'].'</span></label>
</th>
<td valign="top">
<textarea name="hide_hiddentext" id="hide_hiddentext_textarea" cols="40" rows="8">', (empty($modSettings['hide_hiddentext']) ? '' : $modSettings['hide_hiddentext']), '</textarea>
</td>
</tr>
<tr class="windowbg2">
<th width="50%" align="right">
<label for="hide_unhiddentext_textarea">', $txt['hide_unhiddentext'], ' <span style="font-weight: normal;">(<a href="', $scripturl, '?action=helpadmin;help=hide_text_help" onclick="return reqWin(this.href);">?</a>)</span>:<br />
<span class="smalltext" style="font-weight: normal;">'.$txt['hide_hiddentext_help'].'</span></label>
</th>
<td valign="top">
<textarea name="hide_unhiddentext" id="hide_unhiddentext_textarea" cols="40" rows="8">', (empty($modSettings['hide_unhiddentext']) ? '' : $modSettings['hide_unhiddentext']), '</textarea>
</td>
</tr>
<tr class="windowbg2">
<th width="50%" align="right">
<label for="hide_onlyonetimeinfo_check">', $txt['hide_onlyonetimeinfo'], ':<br />
<span class="smalltext" style="font-weight: normal;">'.$txt['hide_onlyonetimeinfo_help'].'</span></label>
</th>
<td valign="top">
<input type="checkbox" name="hide_onlyonetimeinfo" id="hide_onlyonetimeinfo_check"', empty($modSettings['hide_onlyonetimeinfo']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr>
<tr class="windowbg2">
<th width="50%" align="right">
<label for="hide_noinfoforguests_check">', $txt['hide_noinfoforguests'], '</label>:
</th>
<td valign="top">
<input type="checkbox" name="hide_noinfoforguests" id="hide_noinfoforguests_check"', empty($modSettings['hide_noinfoforguests']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr>
<tr class="windowbg2">
<td colspan="2"><hr /></td>
</tr>
<tr class="windowbg2">
<th width="50%" align="right" valign="top">
<label for="hide_autounhidegroups_input" onclick="return openAutoUnhideGroupsList();">', $txt['hide_autounhidegroups'], '</lable>:
</th>
<td valign="top" align="left"><a href="#" onclick="return openAutoUnhideGroupsList();">'.$txt['mboards_groups'].'</a><br />
<div id="allowedAutoUnhideGroupsList" style="display:block;">';

// List all the membergroups so the user can choose who may access this board.
foreach ($context['groups'] as $group)
echo '
<label for="groups_', $group['id'], '"><input type="checkbox" name="hide_autounhidegroups[]" value="', $group['id'], '" id="groups_', $group['id'], '"', $group['checked'] ? ' checked="checked"' : '', ' /> <span', $group['is_post_group'] ? ' style="border-bottom: 1px dotted;" title="' . $txt['mboards_groups_post_group'] . '"' : '', '>', $group['name'], '</span></label><br />';
echo '
<input type="checkbox" onclick="invertAll(this, this.form, \'hide_autounhidegroups[]\');" /> <i>', $txt[737], '</i><br />
<br /></div>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
//This Skript is only for Opening and Closing the group select list
var allowedFlashGroupListStatus = false;

function openAutoUnhideGroupsList() {
if(allowedFlashGroupListStatus) {
allowedFlashGroupListStatus = false;
document.getElementById("allowedAutoUnhideGroupsList").style.display = "block";
}
else {
allowedFlashGroupListStatus = true;
document.getElementById("allowedAutoUnhideGroupsList").style.display = "none";
}

return false;
}

window.onload=openAutoUnhideGroupsList;
// ]]></script>

</td>
</tr>
<tr class="windowbg2">
<th width="50%" align="right">
<label for="hide_minpostunhide_input">', $txt['hide_minpostunhide'], '</label>:
</th>
<td valign="top">
<input type="text" name="hide_minpostunhide" id="hide_minpostunhide_input" value="', (empty($modSettings['hide_minpostunhide']) ? '0' : $modSettings['hide_minpostunhide']), '" class="check" />
</td>
</tr>
<tr class="windowbg2">
<th width="50%" align="right">
<label for="hide_minpostautounhide_input">', $txt['hide_minpostautounhide'], ':<br />
<span class="smalltext" style="font-weight: normal;">'.$txt['hide_minpostautounhide_help'].'</span></label>
</th>
<td valign="top">
<input type="text" name="hide_minpostautounhide" id="hide_minpostautounhide_input" value="', (empty($modSettings['hide_minpostautounhide']) ? '0' : $modSettings['hide_minpostautounhide']), '" class="check" />
</td>
</tr>';
if(!empty($modSettings['karmaMode'])) {
echo '
<tr class="windowbg2">
<td colspan="2"><hr /></td>
</tr>
<tr class="windowbg2">
<th width="50%" align="right">
<label for="hide_karmaenable_check">', $txt['hide_karmaenable'], ':<br />
<span class="smalltext" style="font-weight: normal;">'.$txt['hide_karmaenable_help'].'</span></label>
</th>
<td valign="top">
<input type="checkbox" name="hide_karmaenable" id="hide_karmaenable_check"', empty($modSettings['hide_karmaenable']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr>
<tr class="windowbg2">
<th width="50%" align="right">
<label for="hide_minkarmaunhide_input">', $txt['hide_minkarmaunhide'], ':</label>
</th>
<td valign="top">
<input type="text" name="hide_minkarmaunhide" id="hide_minkarmaunhide_input" value="', (empty($modSettings['hide_minkarmaunhide']) ? '0' : $modSettings['hide_minkarmaunhide']), '" class="check" />
</td>
</tr>
<tr class="windowbg2">
<th width="50%" align="right">
<label for="hide_minkarmaautounhide_input">', $txt['hide_minkarmaautounhide'], ':<br />
<span class="smalltext" style="font-weight: normal;">'.$txt['hide_minpostautounhide_help'].'</span></label>
</th>
<td valign="top">
<input type="text" name="hide_minkarmaautounhide" id="hide_minkarmaautounhide_input" value="', (empty($modSettings['hide_minkarmaautounhide']) ? '0' : $modSettings['hide_minkarmaautounhide']), '" class="check" />
</td>
</tr>
<tr class="windowbg2">
<th width="50%" align="right">
<label for="hide_minimumkarmaandpost_check">', $txt['hide_minimumkarmaandpost'], ':</label>
</th>
<td valign="top">
<input type="checkbox" name="hide_minimumkarmaandpost" id="hide_minimumkarmaandpost_check"', empty($modSettings['hide_minimumkarmaandpost']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr>
<tr class="windowbg2">
<th width="50%" align="right">
<label for="hide_onlykarmagood_check">', $txt['hide_onlykarmagood'], ':</label>
</th>
<td valign="top">
<input type="checkbox" name="hide_onlykarmagood" id="hide_onlykarmagood_check"', empty($modSettings['hide_onlykarmagood']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr>';
}
echo '
<tr class="windowbg2">
<td align="right" colspan="2">
<input type="submit" name="save_settings" value="', $txt['manageposts_settings_submit'], '" />
</td>
</tr>
</table>
<input type="hidden" name="sc" value="', $context['session_id'], '" />
</form>';
}

function template_convert_entities()

languagedir/Admin.portuguese.php

Código: [Seleccione]
?>
Código: [Seleccione]
$txt['hidetagspecial_titel'] = 'Esconder especial';
$txt['hidetagspecial_description'] = 'Você pode ajustar todo as difinicoes que necessitou para Hide Tag Special mod "[hide][/hide]"';
$txt['hide_MUIswitch'] = 'MUI SWITCH';
$txt['hide_enableHTML'] = 'Enable HTML';
$txt['hide_enableHTML_help'] = 'Permita-lhe o HTML do uso sobre Hidden or Unhidden Text';
$txt['hide_enableUnhiddenText'] = 'Permitir Unhidden Informaçao';
$txt['hide_hiddentext'] = 'Informação Escondida Do Texto';
$txt['hide_unhiddentext'] = 'Unhidden Text Information';
$txt['hide_hiddentext_help'] = 'BBC permitido, você pode usar <strong>$txtvariable</strong> and <strong>$language</strong>,<br />olhe na ajuda para mais informacao.';
$txt['hide_onlyonetimeinfo'] = 'Mostrar un-/hidden Informação do texto uma vez';
$txt['hide_onlyonetimeinfo_help'] = 'Isto será mostrado somente na extremidade do poste.';
$txt['hide_noinfoforguests'] = 'Informação do texto escondido para convidados';
$txt['hide_karmaenable_help'] = 'Esta opção deve ser permitida que todas as opções do karma trabalham';
$txt['hide_karmaenable'] = 'Permitir suporte de Karma escondido';
$txt['hide_minkarmaunhide'] = 'Minmum karma conte para permitir o índice do unhide';
$txt['hide_minkarmaautounhide'] = 'Contagem do karma de Minmum ao índice do unhide sem postar';
$txt['hide_minimumkarmaandpost'] = 'A necessidade do usuário o karma e o quadro mínimos ver o índice escondido';
$txt['hide_onlykarmagood'] = 'Count only the Karma Good value not the total summary';
$txt['hide_autounhidegroups'] = 'Allowed Groups to see a hidden content without posting';
$txt['hide_minpostunhide'] = 'Minmum post count to allow unhide content';
$txt['hide_minpostautounhide'] = 'Contagem do poste Minima ao índice do unhide sem postar';
$txt['hide_minpostautounhide_help'] = '"0" ou esvazíe para incapacitar esta opção';
$txt['hide_useSpanTag'] = 'Use SPAN html tag instead of DIV.';
$txt['hide_posUnhiddenText'] = 'Posição para a informação do texto de Unhidden';
$txt['hide_posUnhiddenOption1'] = 'Antes Do Índice Escondido';
$txt['hide_posUnhiddenOption2'] = 'Antes no índice escondido';
$txt['hide_posUnhiddenOption3'] = 'Em seguida no índice escondido';
$txt['hide_posUnhiddenOption4'] = 'Após O Índice Escondido';


languagedir/Help.portuguese.php

Código: [Seleccione]
?>
Código: [Seleccione]
$txt['hide_MUIswitch_help'] = '
<strong>MUI SWITCH - Hide Tag Special</strong><br /><br />
This Option is for Multi Language Forums, it enable the replacment for
<strong>$txtvariable</strong> with $txt[\'hide_hiddentext\']
or $txt[\'hide_unhiddentext\']. So that it use the correct Language
for the user. Please don\'t forget to insert the $txtvariable in the
Textarea of the Infomation so that you can use it.<br />
<span class="smalltext">You find this variable in <strong>index.english.php</strong> for example</span>';
$txt['hide_unhiddentext_help'] = '
<strong>Unhidden Informations - Hide Tag Special</strong><br /><br />
This information appear after you post to a thread, and will be shown after a Hide Tag.
So that the user know the content is unhidden.';
$txt['hide_text_help'] = '
<strong>Text Informations - Hide Tag Special</strong><br /><br />
Normal the Textarea will be BBC Parsed.<br />
You can use the Area to give a user the Infomation that there is a hidden or unhidden content.<br />

In the area you can use 2 Variables for MUI use.<br /><br />
<strong>$language</strong>:<br />
This will replace with the language that the user use.<br />
<em>Example:</em> <strong>hidden_$language</strong> will be in the output <strong>hidden_english</strong>
when the user use english as language.<br /><br />
<strong>$txtvariable</strong>:<br />
Work only if you enable the MUI Switch!<br />
This will replace the $txtvariable with the $txt[\'hide_hiddentext\'] or $txt[\'hide_unhiddentext\']
to make it Multilingual useable.<br />
<em>Example:</em> [b]$txtvarible[/b] will be in english something like
<div class="quote"><strong>The text from the index.english.php</strong></div>
because the $txtvariable is replaced with this.<br /><br />
<em>Some Examples for Hidden/Unhidden Informations:</em><br />
If you like to use a Image for the Text use:
<div class="code">[img]http://www.example.com/image.jpg[/img]</div>
Do you like to use a Image that be diffrent for each language use:
<div class="code">[img]http://www.example.com/$lanuguage.jpg[/img]</div>
You can also combine text and picture:
<div class="code">Here is a secret, please post to see it.[br][img]http://www.example.com/hidden.jpg[/img]</div>
[br] stands for a new line.
You can also combine MUI Switch and $language Picture:
<div class="code">$txtvariable[br][img]http://www.example.com/$lanuguage.jpg[/img]</div>
<span class="smalltext">$txtvariable will replace only if you enable MUI Switch</span>';
$txt['hide_useSpanTag_help'] = '
<strong>SPAN instead of DIV - Hide Tag Special</strong><br /><br />
Use &lt;span class=&quot;hiddencontent&quot;&gt;Hidden Value&lt;/span&gt; instead
of &lt;div class=&quot;hiddencontent&quot;&gt;Hidden Value&lt;/div&gt; after unhidding Text.';
$txt['hide_posUnhiddenText_help'] = '
<strong>Unhidden Text Position - Hide Tag Special</strong><br /><br />
With this you can select where the unhidden text should be stand,
after unhidding the content.<br /><br />
<u>Before Hidden Content</u>:<br />
<strong>Unhidden Text</strong>&lt;div class=&quot;hiddencontent&quot;&gt;Hidden Value&lt;/div&gt;<br />
<u>Before In Hidden Content</u>:<br />
&lt;div class=&quot;hiddencontent&quot;&gt;<strong>Unhidden Text</strong> Hidden Value&lt;/div&gt;<br />
<u>After In Hidden Content</u>:<br />
&lt;div class=&quot;hiddencontent&quot;&gt;Hidden Value <strong>Unhidden Text</strong>&lt;/div&gt;<br />
<u>After Hidden Content</u>:<br />
&lt;div class=&quot;hiddencontent&quot;&gt;Hidden Value&lt;/div&gt;<strong>Unhidden Text</strong><br />
<br />
This Option will only work when you enable Unhidden Text Information and not enabled the
Option for "Show the un-/hidden Text Information one time".';

languagedir/index.portuguese.php

Código: [Seleccione]
?>
Código: [Seleccione]
$txt['hide_hiddentext'] = 'Está aqui um pequeno segredo do... Ou nao?';
$txt['hide_unhiddentext'] = 'Meu pequeno segredo mostro agora ... Ou nao?';


display.template.php ou post.template.php

Código: [Seleccione]
'ftp' => array('code' => 'ftp', 'before' => '[ftp=', 'after' => ']', 'after' => '[/ftp]', 'description' => $txt[434]),
Código: [Seleccione]
'sakla' => array('code' => 'sakla', 'before' => '[sakla]', 'after' => '[/sakla]', 'description' => $txt[537]),

images/bbc

Offline jass

  • Iniciar SmfPt
  • *
  • Mensagens: 92
  • Rank: 13
  • Sexo: Masculino
    • TugaLinux4You
Re: Hide Tag Special
« Responder #1 em: 18 de Novembro de 2007, 16:39 »
Boas

exelente trabalho mesmo

olha uma pergunta eu queria era que se o topico estivesse fechado que ninguem via nada sem responder mas os anexxos tambem que nao visem, porque de momento da para ver os anexos so nao da para ver as mensagens..

cumps

Offline candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5072
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
Re: Hide Tag Special
« Responder #2 em: 18 de Novembro de 2007, 19:48 »
Sim tem que instalar o Mod de Agradecimento depois instalar este que funciona mesmo bem...

Ou também podes instalar Hide post depois agradecimento

Offline AlaStar

  • Iniciar SmfPt
  • *
  • Mensagens: 43
  • Rank: 2
Re: Hide Tag Special
« Responder #3 em: 14 de Dezembro de 2008, 11:17 »
candidosa2 será que pode por as legendas do que é necessário fazer ?
se é para substituir ou se é para adicionar. Obrigado  wink

Offline AlaStar

  • Iniciar SmfPt
  • *
  • Mensagens: 43
  • Rank: 2
Re: Hide Tag Special
« Responder #4 em: 19 de Dezembro de 2008, 12:29 »
*bump*

Offline candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5072
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
Re: Hide Tag Special
« Responder #5 em: 19 de Dezembro de 2008, 23:01 »
Ok vou analizar

Offline AlaStar

  • Iniciar SmfPt
  • *
  • Mensagens: 43
  • Rank: 2
Re: Hide Tag Special
« Responder #6 em: 21 de Dezembro de 2008, 05:37 »
Ok vou analizar

Obrigado, vou aguardar.

Offline Amendoim

  • Smfpt em 10%
  • *
  • Mensagens: 228
  • Rank: 0
Re: Hide Tag Special
« Responder #7 em: 04 de Março de 2009, 18:28 »
Ok vou analizar

Obrigado, vou aguardar.


Tambem queria, nao sei se é pra substituir, adicionar depois ou antes, é pena porque esta exelente este tuto wink

Offline candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5072
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
Re: Hide Tag Special
« Responder #8 em: 04 de Março de 2009, 21:32 »
bem e só comparar os códigos
se tiver o mesmo que o original isso quer dizer que tem que pesquisar depois substituir por código abaixo

Offline Darkness

  • VectorSeries.Net
  • Administrador
  • *
  • Mensagens: 337
  • Rank: 3
  • Sexo: Masculino
  • Vector Series
    • Vector Series
Re:Hide Tag Special
« Responder #9 em: 08 de Maio de 2009, 00:33 »
Para ajudar aqui traduzi o help.portuguese_brasilian.php só por na pasta themes/defaut/languagem

Antes de:
Código: [Seleccione]
?>
Insira:
Código: [Seleccione]
$txt['hide_MUIswitch_help'] = '
<strong>MUI SWITCH - Hide Tag Special</strong><br /><br />
Esta opção é para vários idiomas de fóruns, permitem o replacment para
<strong>$txtvariable</strong> com $txt[\'hide_hiddentext\']
ou $txt[\'hide_unhiddentext\']. Assim que usar a linguagem correta
para usuario. Por favor não se esqueça de inserir o $txtvariable na
Área de texto das informações para que você poder usá-lo.<br />
<span class="smalltext">Você encontrará essa variável no <strong>index.english.php</strong> por exemplo</span>';
$txt['hide_unhiddentext_help'] = '
<strong>Informações reexibidas - Hide Tag Special</strong><br /><br />
Esta informação aparecer depois de lançar um tópico e serão mostradas depois de uma hode tag.
Para que o usuário saibam o conteúdo é reexibido.';
$txt['hide_text_help'] = '
<strong>Informações de texto - Hide Tag Special</strong><br /><br />
Normal a área de texto será analisada o BBC.<br />
Você pode usar o espaço para dar a um usuário a informação que não há um conteúdo oculto ou reexibido.<br />

Na área você pode usar 2 variáveis para uso MUI.<br /><br />
<strong>$language</strong>:<br />
Este irá substituir o idioma que o usuário usar.<br />
<em>Examplo:</em> <strong>hidden_$language</strong> será a saída <strong>hidden_english</strong>
Quando o usuário usar inglês como linguagem.<br /><br />
<strong>$txtvariable</strong>:<br />
Só funciona se você habilitar o botão MUI!<br />
Isto irá substituir o $txtvariable com o $txt[\'hide_hiddentext\'] ou $txt[\'hide_unhiddentext\']
que fique Multilingual utilizável.<br />
<em>Examplo:</em> [b]$txtvarible[/b] será em inglês algo como
<div class="quote"><strong>O texto a partir do index.english.php</strong></div>
porque o $txtvariable passa-se com esta.<br /><br />
<em>Alguns exemplos para Hidden/Unhidden Informações:</em><br />
Se você gosta de usar uma imagem para a utilização de texto:
<div class="code">[img]http://www.example.com/image.jpg[/img]</div>
Gosta de usar uma imagem diffrente para cada utilização de linguagem:
<div class="code">[img]http://www.example.com/$lanuguage.jpg[/img]</div>
Você também pode combinar texto e imagem:
<div class="code">Aqui está um segredo, por favor clique para vê-lo.[br][img]http://www.example.com/hidden.jpg[/img]</div>
[br] representa uma nova linha.
Você também pode combinar MUI mudar e $language Imagem:
<div class="code">$txtvariable[br][img]http://www.example.com/$lanuguage.jpg[/img]</div>
<span class="smalltext">$txtvariable irá substituir apenas se você habilitar alternar MUI</span>';
$txt['hide_useSpanTag_help'] = '
<strong>ESTENDER em vez de DIVIDIR - Hide Tag Special</strong><br /><br />
Use &lt;span class=&quot;hiddencontent&quot;&gt;Hidden Value&lt;/span&gt; instead
of &lt;div class=&quot;hiddencontent&quot;&gt;Hidden Value&lt;/div&gt; after unhidding Text.';
$txt['hide_posUnhiddenText_help'] = '
<strong>Reexibidas de posição de texto - Hide Tag Special</strong><br /><br />
Com isso você pode selecionar onde o texto reexibido deve parecer,
Depois do conteúdo escondido.<br /><br />
<u>Antes do Conteúdo Escondido</u>:<br />
<strong>Texto escondido</strong>&lt;div class=&quot;hiddencontent&quot;&gt;Hidden Value&lt;/div&gt;<br />
<u>Antes do conteudo escondido</u>:<br />
&lt;div class=&quot;hiddencontent&quot;&gt;<strong>Texto escondido</strong> Hidden Value&lt;/div&gt;<br />
<u>Depois de conteúdo oculto</u>:<br />
&lt;div class=&quot;hiddencontent&quot;&gt;Hidden Value <strong>Unhidden Text</strong>&lt;/div&gt;<br />
<u>Depois de conteúdo oculto</u>:<br />
&lt;div class=&quot;hiddencontent&quot;&gt;Hidden Value&lt;/div&gt;<strong>Unhidden Text</strong><br />
<br />
Esta opção só funcionará quando você habilitar reexibidas de texto de informações e não habilitado a opção
para "Mostrar informações do conteudo oculto uma vez".';

Translator SMF - Brazilian
Não respondo MP de ajuda, Poste sua duvida no forum para ajuda

Offline Darkness

  • VectorSeries.Net
  • Administrador
  • *
  • Mensagens: 337
  • Rank: 3
  • Sexo: Masculino
  • Vector Series
    • Vector Series
Re:Hide Tag Special
« Responder #10 em: 10 de Maio de 2009, 04:02 »
Um erro. Estava dando errado naum aparecia a imagem bbc dai eu modifiquei algo que estava faltando se der o mesmo erro basta fazer o seguinte:

Renomear esta gif para Hide.gif ("H" maiusculo mesmo") e upar na pasta thema atual/images/bbc

theme/defaut/language

Encontre:
Código: [Seleccione]
?>
Adcione antes:
Código: [Seleccione]
$txt[537]) = 'Hide Tag';
E dai fica tudo perfeito  wink

Translator SMF - Brazilian
Não respondo MP de ajuda, Poste sua duvida no forum para ajuda