Code: Select all
// Additional tables
Code: Select all
define('THANKS_TABLE', $table_prefix . 'thanks');
Code: Select all
/** @var string table_prefix */
protected $table_prefix;
/** @var string THANKS_TABLE */
protected $thanks_table;
Code: Select all
private function check_user_posted_by_topicId($topic_id)
{
$b_hide = true;
global $auth;
$sql = "SELECT forum_id
FROM " . TOPICS_TABLE . "
WHERE topic_id = ".$topic_id." ";
$result = $this->db->sql_query($sql);
$forum_id = $this->db->sql_fetchrow($result);
$forum_id = $forum_id['forum_id'];
$this->db->sql_freeresult($result);
if ($auth->acl_get('m_', $forum_id))
{
// If moderator or admin, skip reply check, auto unhide
$b_hide = false;
}
else if ($this->user->data['user_id'] != ANONYMOUS)
{
// Check if the topic viewer has posted in the topic
$sql = "SELECT poster_id, topic_id
FROM " . POSTS_TABLE . "
WHERE topic_id = $topic_id
AND poster_id = " . $this->user->data['user_id'];
$result = $this->db->sql_query($sql);
$b_hide = $this->db->sql_affectedrows($result) ? false : true;
$this->db->sql_freeresult($result);
}
$this->b_hide = $b_hide;
$this->template->assign_var('S_HIDE_DOHIDE', $b_hide);
}
Code: Select all
private function check_user_posted_by_topicId($topic_id)
{
$b_hide = true;
global $auth;
$sql = "SELECT forum_id
FROM " . TOPICS_TABLE . "
WHERE topic_id = ".$topic_id." ";
$result = $this->db->sql_query($sql);
$forum_id = $this->db->sql_fetchrow($result);
$forum_id = $forum_id['forum_id'];
$this->db->sql_freeresult($result);
// If moderator or admin, skip reply check, auto unhide
if ($auth->acl_get('m_', $forum_id))
{
$b_hide = false;
}
else
{
// Check if the topic viewer has said thanks in that topic
$sql = "SELECT topic_id, user_id
FROM " . THANKS_TABLE. "
WHERE topic_id = $topic_id
AND user_id = " . $this->user->data['user_id'];
$result = $this->db->sql_query($sql);
$b_hide = (int) $this->db->sql_affectedrows($result) ? false : true;
$this->db->sql_freeresult($result);
// Check if the topic viewer has posted in that topic
if ($b_hide == true)
{
$sql = "SELECT poster_id, topic_id
FROM " . POSTS_TABLE . "
WHERE topic_id = $topic_id
AND poster_id = " . $this->user->data['user_id'];
$result = $this->db->sql_query($sql);
$b_hide = $this->db->sql_affectedrows($result) ? false : true;
$this->db->sql_freeresult($result);
}
}
$this->b_hide = $b_hide;
$this->template->assign_var('S_HIDE_DOHIDE', $b_hide);
}
Code: Select all
'HIDEBB_MESSAGE_HIDDEN_DESCRIPTION' => 'You need to reply to this topic before you can view the hidden message',
Code: Select all
'HIDEBB_MESSAGE_HIDDEN_DESCRIPTION' => 'You need to reply or thank to this topic before you can view the hidden message',
Try to editing the language file.eunaumtenhoid wrote:idea :
how change text for image on hide?
Code: Select all
'HIDEBB_MESSAGE_HIDDEN_DESCRIPTION' => 'You need to reply or thank to this topic before you can view the hidden message',
Code: Select all
'HIDEBB_MESSAGE_HIDDEN_DESCRIPTION' => 'In order to view the hidden content, you must respond of this topic or thank the Author of the post! <br />Click on the icon <img src="http://PATH OF THE IMAGE/thank.png" alt="*" title="Thank the Author of the post" /> that are at the top of the post',
Code: Select all
<!-- BEGIN unhide_open --><dl class="hidebox unhide"><dt>{L_HIDEBB_MESSAGE_UNHIDE}</dt><dd><!-- END unhide_open -->
<!-- BEGIN unhide_close --></dd></dl><!-- END unhide_close -->
<!-- BEGIN hide --><dl class="hidebox hide"><dt>{L_HIDEBB_MESSAGE_HIDDEN}</dt><dd>{L_HIDEBB_MESSAGE_HIDDEN_DESCRIPTION}</dd></dl><!-- END hide -->
Code: Select all
<!-- BEGIN unhide_open --><dl class="hidebox unhide"><dt>{L_HIDEBB_MESSAGE_UNHIDE}</dt><dd><!-- END unhide_open -->
<!-- BEGIN unhide_close --></dd></dl><!-- END unhide_close -->
<!-- BEGIN hide --><dl><dd><img src="./images/thankshide.png" alt="*" title="{L_HIDEBB_MESSAGE_HIDDEN_DESCRIPTION}" /> </dd></dl><!-- END hide -->
It does not work with the extension hide because the page not reloaded!eunaumtenhoid wrote:Man is possible add this ext addon for hide too >>> viewtopic.php?f=456&t=2259666
I'll like see these tooeunaumtenhoid wrote:is possible add premiss for group viem hide like adm?
So you want to add group permission to view the hide like administrators? In other words you want to disable the hide bbcode for specific groups?uruguayito wrote:I'll like see these tooeunaumtenhoid wrote:is possible add premiss for group viem hide like adm?
YEAHLeinad4Mind wrote:So you want to add group permission to view the hide like administrators? In other words you want to disable the hide bbcode for specific groups?uruguayito wrote:I'll like see these tooeunaumtenhoid wrote:is possible add premiss for group viem hide like adm?