Page 1 of 3

Hide code (links) until reply 1.0.0

PostPosted: Mon Mar 30, 2009 6:33 pm
by drndos
MOD Title (EN): Hide code (links) until reply
MOD Title (SK): Skrytie kódu (odkazov) pred odpoveďou
MOD Description (EN): Hide code in topic until the user reply in this topic.
MOD Description (SK): Skrytie kódu pred užívateľov čo nenapísali v téme odpoveď.
MOD Version: 1.0.0

Works with: phpBB 3.0.x
Language: English, Slovak

Author: Drndos
License: GNU General Public License v2

Screenshot: prosilver
Demo board: prosilver

MOD Format: ModX

Download :
Hide_code_until_reply_1_0_0.rar
(21.73 KiB) Downloaded 819 times

If you would like to be informed about new versions of MOD, please register.

If you like this MOD please donate (ak sa vám modifikácia páči prosim vás prispejte)

Re: Hide code (links) until reply 1.0.0

PostPosted: Fri Apr 10, 2009 9:14 pm
by drndos
You can simply add forum ids of forums that you want to exclude or include:
open includes/bbcode.php
find:
Code: Select all
if ($topic_id>0)

for only one forum - before add:
Code: Select all
$forum_id   = request_var('f', 0);
if($forum_id == "35")
{

for two or more forums - before add:
Code: Select all
$forum_id   = request_var('f', 0);
if($forum_id == "35" ||$forum_id == "25")
{

(do similar for more ids)
for all forums except one - before add:
Code: Select all
$forum_id   = request_var('f', 0);
if($forum_id <> "35")
{

for all forums except two or more - before add:
Code: Select all
$forum_id   = request_var('f', 0);
if($forum_id <> "35" && $forum_id <> "25")
{

(do similar for more ids)

And in all cases do this:
find:
Code: Select all
$code = $this->bbcode_tpl('code_open') . $code . $this->bbcode_tpl('code_close');

Before add:
Code: Select all
}

Re: Hide code (links) until reply 1.0.0

PostPosted: Sun Apr 12, 2009 10:34 am
by dzooky
Zajimavy MOD. No uvital by som ho v spolipraci s nejakym thanks MODom. Pre mna je to ovela praktickejsie ako "spamovanie"

Re: Hide code (links) until reply 1.0.0

PostPosted: Thu Apr 16, 2009 2:16 pm
by Ultiweap
Hey mate,

I would like to know how to install this mod. Where should I put the MODX File and what should I change in the phpbb3 files.

Thanks in advance for any help.

Re: Hide code (links) until reply 1.0.0

PostPosted: Thu Apr 16, 2009 2:41 pm
by drndos
Hello,

Here are instructions how to install mods http://www.phpbb.com/kb/article/how-to- ... ification/

You don't have to copy none of those file to your forum, the mod is very easy and you should only edit some files. Try to open Hide_code_until_reply.xml with your favorite web browser and follow the instructions.

Re: Hide code (links) until reply 1.0.0

PostPosted: Thu Apr 16, 2009 2:53 pm
by Ultiweap
Ok mate,

But when I change the HTML code in the notepad I need to press enter or simply copy and paste the line you ask to copy just before the the word to fine?

Re: Hide code (links) until reply 1.0.0

PostPosted: Thu Apr 16, 2009 3:03 pm
by drndos
You should edit the files with PSPad www.pspad.com, or wordpad,
Yes add it on the new line (all instructions are in the modx file)
It should look like this:
Code: Select all
$topic_id   = request_var('t', 0);
    if ($topic_id>0)
    {
      global $user;
        global $db;
      $sql = 'SELECT *
        FROM ' . POSTS_TABLE . '
        WHERE topic_id ="' . $topic_id . '"
      AND poster_id ="' . $user->data["user_id"] . '"';
       $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      if(empty($row)) $code = $user->lang['HAVE_TO_REPLY'];
    }
$code = $this->bbcode_tpl('code_open') . $code . $this->bbcode_tpl('code_close');

and lang like this:
Code: Select all
'HAVE_TO_REPLY'           => 'You have to reply to view this code',
'HIDDEN_USERS_ONLINE'         => '%d hidden users online',

Re: Hide code (links) until reply 1.0.0

PostPosted: Thu Apr 16, 2009 5:08 pm
by Ultiweap
Thanks a lot man. It works well.

Re: Hide code (links) until reply 1.0.0

PostPosted: Sat May 09, 2009 8:02 am
by lansiko
This looks like a simple and elegant MOD. Is it possible to use image as the locked message rather than just plain text? That will be cool...

Re: Hide code (links) until reply 1.0.0

PostPosted: Sat May 09, 2009 7:12 pm
by drndos
try adding the html code in instead of the plain text in language file ... like <img src="path_to_image" />