Thank Post Mod 0.2.0 (hide MOD compatible)

Hier kommen die Support Anfragen für phpBB 3.0.x MODs hinein.
ADPCrazy
Beiträge: 8
Registriert: 19. Mai 2011 14:32
Familienstand: Single
Wohnort: Italy
Hat sich bedankt: 0
Danksagung erhalten: 0
Kontaktdaten:

Thank Post Mod 0.2.0 (hide MOD compatible)

Beitrag von ADPCrazy »

Your phpBB Version: 3.0.8
Your phpBB Type: Standard phpBB (also called Vanilla (phpBB2) or Olympus (phpBB3))
MODs installed: Yes
Your knowledge: Basic Knowledge
Boardlink: http://www.animedp.it

What have you done before the problem was there?
I installed the mod Thank Post Mod 0.2.0 (hide MOD compatible) + Simple Hide BBcode MOD 0.4.0

What have you already tryed to solve the problem?
No

Description and Message
Hello Mahony,
I installed the mod mentioned in the title and I have implemented the mod Simple Hide and thanks to that I noticed something that a user also writing a message in reply to a topic displays the hidden content.

I wish that this possibility is denied the user must use only the thanks to button.

Then if a post thank all the hidden text is displayed in every post on the topic, you could not do that you view only the text only hidden in the post thanked?
From what I understand is set to Simple Hide BBcode topic_id you can not configure it to post_id?

Is it possible?

I apologize for the bad english ^^
Benutzeravatar
Mahony
Site Admin
Site Admin
Beiträge: 792
Registriert: 3. Dez 2006 22:09
Hat sich bedankt: 22 Mal
Danksagung erhalten: 6 Mal

Re: Thank Post Mod 0.2.0 (hide MOD compatible)

Beitrag von Mahony »

Hello
ADPCrazy hat geschrieben:I wish that this possibility is denied the user must use only the thanks to button.
Hm...Show me your viewtopic.php in the Pastebin.
ADPCrazy hat geschrieben:Then if a post thank all the hidden text is displayed in every post on the topic, you could not do that you view only the text only hidden in the post thanked?
From what I understand is set to Simple Hide BBcode topic_id you can not configure it to post_id?

Is it possible?
Unfortunately this is not possible.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.
Klug ist, wer nur die Hälfte von dem glaubt, was er hört. Weise ist, wer erkennt, welche Hälfte richtig ist.

Bild
ADPCrazy
Beiträge: 8
Registriert: 19. Mai 2011 14:32
Familienstand: Single
Wohnort: Italy
Hat sich bedankt: 0
Danksagung erhalten: 0
Kontaktdaten:

Re: Thank Post Mod 0.2.0 (hide MOD compatible)

Beitrag von ADPCrazy »

ok posted viewtopic.php
Benutzeravatar
Mahony
Site Admin
Site Admin
Beiträge: 792
Registriert: 3. Dez 2006 22:09
Hat sich bedankt: 22 Mal
Danksagung erhalten: 6 Mal

Re: Thank Post Mod 0.2.0 (hide MOD compatible)

Beitrag von Mahony »

Hello

Find (viewtopic.php)

Code: Alles auswählen

// Unhide Check
$unhide = false;
if ($user->data['user_id'] != ANONYMOUS)
{
   // If moderator or admin, skip reply check, auto unhide
   if ($auth->acl_get('m_', $forum_id))
   {
      $unhide = true;
   }
   else
   {
      // Check if the topic viewer has said thanks in that topic
      $sql = "SELECT topic_id, thanks_from
        FROM " . THANKS_TABLE . "
        WHERE topic_id = $topic_id
        AND thanks_from = " . $user->data['user_id'];

      $result = $db->sql_query($sql);
      $unhide = $db->sql_affectedrows($result) ? true : false;
      $db->sql_freeresult($result);

      // Check if the topic viewer has posted in that topic
      if ($unhide == false)
      {
         $sql = "SELECT poster_id, topic_id
           FROM " . POSTS_TABLE . "
           WHERE topic_id = $topic_id
           AND poster_id = " . $user->data['user_id'];

         $result = $db->sql_query($sql);
         $unhide = $db->sql_affectedrows($result) ? true : false;
         $db->sql_freeresult($result);
       }
   }
}
Replace with

Code: Alles auswählen

//Begin Thank Post MOD
// Unhide Check
$unhide = false;
if ($user->data['user_id'] != ANONYMOUS)
{
   // If moderator or admin, skip reply check, auto unhide
   if ($auth->acl_get('m_', $forum_id))
   {
      $unhide = true;
   }
   else
   {
      // Check if the topic viewer has said thanks in that topic
      $sql = "SELECT topic_id, thanks_from
        FROM " . THANKS_TABLE . "
        WHERE topic_id = $topic_id
        AND thanks_from = " . $user->data['user_id'];

      $result = $db->sql_query($sql);
      $unhide = $db->sql_affectedrows($result) ? true : false;
      $db->sql_freeresult($result);

   }
}
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.
Klug ist, wer nur die Hälfte von dem glaubt, was er hört. Weise ist, wer erkennt, welche Hälfte richtig ist.

Bild
ADPCrazy
Beiträge: 8
Registriert: 19. Mai 2011 14:32
Familienstand: Single
Wohnort: Italy
Hat sich bedankt: 0
Danksagung erhalten: 0
Kontaktdaten:

Re: Thank Post Mod 0.2.0 (hide MOD compatible)

Beitrag von ADPCrazy »

ok thanks it works perfectly ^^
ADPCrazy
Beiträge: 8
Registriert: 19. Mai 2011 14:32
Familienstand: Single
Wohnort: Italy
Hat sich bedankt: 0
Danksagung erhalten: 0
Kontaktdaten:

Re: Thank Post Mod 0.2.0 (hide MOD compatible)

Beitrag von ADPCrazy »

Hello Mahony,
I have noted that now the author of the message does not display hidden text, how do I fix?
I would like the author displays everything normally.
Benutzeravatar
Mahony
Site Admin
Site Admin
Beiträge: 792
Registriert: 3. Dez 2006 22:09
Hat sich bedankt: 22 Mal
Danksagung erhalten: 6 Mal

Re: Thank Post Mod 0.2.0 (hide MOD compatible)

Beitrag von Mahony »

Hello
Use this code

Code: Alles auswählen

// Unhide Check
    $unhide = false;
    if ($user->data['user_id'] != ANONYMOUS)
    {
       // If moderator or admin, skip reply check, auto unhide
       if ($auth->acl_get('m_', $forum_id))
       {
          $unhide = true;
       }
       else
       {
          // Check if the topic viewer has said thanks in that topic
          $sql = "SELECT topic_id, thanks_from
            FROM " . THANKS_TABLE . "
            WHERE topic_id = $topic_id
            AND thanks_from = " . $user->data['user_id'];

          $result = $db->sql_query($sql);
          $unhide = $db->sql_affectedrows($result) ? true : false;
          $db->sql_freeresult($result);

          // Check if the topic viewer has posted in that topic
          if ($unhide == false)
          {
             $sql = "SELECT poster_id, topic_id
               FROM " . POSTS_TABLE . "
               WHERE topic_id = $topic_id
               AND poster_id = " . $user->data['user_id'];

             $result = $db->sql_query($sql);
             $unhide = $db->sql_affectedrows($result) ? true : false;
             $db->sql_freeresult($result);
           }
       }
    }
and lock the post

You must then remove this Mahony @ Thank Post Mod (hide MOD compatible )
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.
Klug ist, wer nur die Hälfte von dem glaubt, was er hört. Weise ist, wer erkennt, welche Hälfte richtig ist.

Bild
ADPCrazy
Beiträge: 8
Registriert: 19. Mai 2011 14:32
Familienstand: Single
Wohnort: Italy
Hat sich bedankt: 0
Danksagung erhalten: 0
Kontaktdaten:

Re: Thank Post Mod 0.2.0 (hide MOD compatible)

Beitrag von ADPCrazy »

But just as it was originally back then I can not lock all the topics so users can not even add a comment, you can not give permission only to the author of the topic?
As is given to the administrators and moderators?
Benutzeravatar
Mahony
Site Admin
Site Admin
Beiträge: 792
Registriert: 3. Dez 2006 22:09
Hat sich bedankt: 22 Mal
Danksagung erhalten: 6 Mal

Re: Thank Post Mod 0.2.0 (hide MOD compatible)

Beitrag von Mahony »

Hello
ADPCrazy hat geschrieben: you can not give permission only to the author of the topic?
As is given to the administrators and moderators?
Yes, it would be possible. In such cases, these users would always see the hidden content.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.
Klug ist, wer nur die Hälfte von dem glaubt, was er hört. Weise ist, wer erkennt, welche Hälfte richtig ist.

Bild
ADPCrazy
Beiträge: 8
Registriert: 19. Mai 2011 14:32
Familienstand: Single
Wohnort: Italy
Hat sich bedankt: 0
Danksagung erhalten: 0
Kontaktdaten:

Re: Thank Post Mod 0.2.0 (hide MOD compatible)

Beitrag von ADPCrazy »

No, I expressed myself badly I mean you can not do that only the author of the topic can see the hidden text and others do not?
Because as you mentioned the code in the previous post all the user can see the hidden content by entering a message, but I wish that the possibility should be removed and the author of the topic can be seen instead as the author.
Antworten