News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

[Request] Hidden Content

Started by TiagoF7, March 02, 2007, 05:07:41 PM

Previous topic - Next topic

TiagoF7

Quote from: TiagoF7 on March 02, 2007, 05:00:18 PM
There is any hidden content mod for SMF 1.1.2?

I will give you an example:

http://www.wrestlement.com/showthread.php?t=307 [nofollow]

In this thread you only can see what is written after you write a message and post it at that topic, then the message will show up in the first page...

There is any modification to do that in SMF?

Quoted from: http://www.simplemachines.org/community/index.php?topic=154806.0

;)

ディン1031

#1
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

TiagoF7

I get this error when I click on a profile:

8: Undefined index: hide_hiddentext
File: /home/tiagofer/public_html/SMF/Sources/Subs.php
Line: 993

What I have to do?  ;)

TiagoF7

This is what is written in line 993 of subs.php:

$message = preg_replace("/\[hide\](.+?)\[\/hide\]/i", (empty($modSettings['hide_onlyonetimeinfo']) ? $modSettings['hide_hiddentext'] : "&nbsp"), $message);

ディン1031

#4
Which version of the Mod?
Which SMF Version?
Which other mods are installed? Tiny Portal?

And i need mor than this line at least 10 before and 10 after, and i need the setting of the hide tag special that you made.

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

TiagoF7

Quote from: DIN1031 on April 03, 2007, 08:00:00 AM
Which version of the Mod?
Which SMF Version?
Which other mods are installed? Tiny Portal?

And i need mor than this line at least 10 before and 10 after, and i need the setting of the hide tag special that you made.

Bye
DIN1031
I installed http://custom.simplemachines.org/mods/index.php?mod=118 - HideTagSpecial124.zip [nofollow]; an d I have SMF 1.1.2.

This is what is written on subs.php, something like 10 lines before and 10 lines after:

Quote
   //Hide Mod.. i remove the code before i do anything...
   //Built the correct hidden content informations :), or add a the one time infomration :)
   if((empty($context['user_post_avaible']) || !isset($context['user_post_avaible'])) && $message !== false && !empty($message)) {
      //Check you're a guest? Should i show this infomations?
      if(empty($modSettings['hide_noinfoforguests']) || !$user_info['is_guest']) {
         //Lets change the HideTag ;) this is a secret and should be a secret :)
         if (empty($modSettings['hide_hiddentext'])) $modSettings['hide_hiddentext'] = ' '; //A tiny little space =)
         // The MUI Switch ;D
         if (!empty($modSettings['hide_MUIswitch'])) $modSettings['hide_hiddentext'] = &$txt['hide_hiddentext'];
         // hmmmm should i use image insteat of text?
         if (!empty($modSettings['hide_hidecontentimages'])) $modSettings['hide_hiddentext'] = '

';

         //One Time information?
         if(!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 .= '
'.$modSettings['hide_hiddentext'];
            }
         }
      }
      else
         $modSettings['hide_hiddentext'] = ' ';
   }
   //Here i remove this content :) or show onetime unhide info :)
   if((empty($context['user_post_avaible']) || !isset($context['user_post_avaible'])) && $message !== false) {
      //Remove it ;D
      $message = preg_replace("/\[hide\](.+?)\[\/hide\]/i", (empty($modSettings['hide_onlyonetimeinfo']) ? $modSettings['hide_hiddentext'] : "&nbsp"), $message);
      $message = preg_replace(array('~\n?\[hide.*?\].+?\[/hide\]\n?~is', '~^\n~', '~\[/hide\]~'), (empty($modSettings['hide_onlyonetimeinfo']) ? $modSettings['hide_hiddentext'] : "&nbsp"), $message);
   }
   elseif(!empty($context['user_post_avaible']) && $message !== false && !empty($modSettings['hide_onlyonetimeinfo']) && !empty($modSettings['hide_unhidecontnetimage'])) {
      //Okay i need to add the un hidden image at the end of the post :)
      if(preg_match("/\[hide\](.+?)\[\/hide\]/i", $message) != 0 || preg_match(array('~\n?\[hide.*?\].+?\[/hide\]\n?~is', '~^\n~', '~\[/hide\]~'), $message) != 0) {
         $message .= '

';      
      }
   }

   // Never show smileys for wireless clients.  More bytes, can't see it anyway :P.
   if (WIRELESS)
      $smileys = false;
   elseif ($smileys !== null && ($smileys == '1' || $smileys == '0'))
      $smileys = (bool) $smileys;

   if (empty($modSettings['enableBBC']) && $message !== false)
   {
      if ($smileys === true)
         parsesmileys($message);

      return $message;

TiagoF7


ディン1031

#7
Which settings did you made for the mod?

None?

Hmmm okay i will fix it, i release a upgrade for it :).

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

TiagoF7

I just installed the mod by Admin Cpanel...

ディン1031

Quote from: TiagoF7 on April 04, 2007, 11:11:30 AM
I just installed the mod by Admin Cpanel...
Install the upgrade, it will remove this error ;).

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

TiagoF7


TiagoF7

#11
I was trying to use another template, the template Im trying to use is SMFOne, and now I get this error:

8: Undefined index: can_hide_post
Ficheiro: /home/tiagofer/public_html/SMF/Themes/default/languages/Post.portuguese.php (main sub template - eval?)
Linha: 540

Linha - Line
Ficheiro - File

What can I do to solve it?

TiagoF7


Advertisement: