Hide Code Request »  Show posts from    to     

Icy Phoenix


Old Support Topics - Hide Code Request



jz [ Sun 14 Jan, 2007 10:51 ]
Post subject: Hide Code Request
Hi guys,

I wanted to know if it's possible to set a limit for the reply that needs to be posted in order to see the hiden text?

I want to avoid replies with just a "smiley, or thnx". Can it be done and how if so?

Code: [Hide]
  1. Sorry, but you must be registered and also must post a reply to view this message. 


thank you in advance


z3d0 [ Sun 14 Jan, 2007 11:32 ]
Post subject: Re: Hide Code Request
but how can a user post a reply if the post text is hidden?


jz [ Sun 14 Jan, 2007 12:29 ]
Post subject: Re: Hide Code Request
the whole idea of this is that: if you post say a link to download a movie, you'd like them to thank the poster before they can see that link.

I wanted to make certain users a little more active rather than passive


Zuker [ Sun 14 Jan, 2007 13:34 ]
Post subject: Re: Hide Code Request
mmm
try this
i''m not sure that this will work

open BBcode.php

find

Code: [Hide] [Select]
if($userdata['session_logged_in'])
{
$sql = "SELECT p.poster_id, p.topic_id
FROM " . POSTS_TABLE . " p
WHERE p.topic_id = $topic_id
AND p.poster_id = " . $userdata['user_id'];
$resultat = $db->sql_query($sql);
$show = $db->sql_numrows($resultat) ? true : false;
if ( ($userdata['user_level'] == ADMIN) || ($userdata['user_level'] == MOD))
{
$show = true;
}
}


replace with

Code: [Hide] [Select]
if ( (($userdata['session_logged_in']) || ($userdata['user_posts'] < 200) && ( $userdata['user_level'] = ADMIN && $userdata['user_level'] = MOD ) )
{
$show = true;
}


I've set 200 as an example



jz [ Sun 14 Jan, 2007 16:26 ]
Post subject: Re: Hide Code Request
No working..

Parse error: parse error, unexpected '{'


cubano [ Sun 14 Jan, 2007 20:38 ]
Post subject: Re: Hide Code Request
woo.. its work


jz [ Sun 14 Jan, 2007 22:17 ]
Post subject: Re: Hide Code Request
cubano wrote: [View Post]
woo.. its work


where?


Zuker [ Mon 15 Jan, 2007 00:58 ]
Post subject: Re: Hide Code Request
replace with this ando should work. There was a ( that mustn't be there

Code: [Hide]
  1. if(($userdata['session_logged_in']) || ($userdata['user_posts'] < 200) && ( $userdata['user_level'] = ADMIN && $userdata['user_level'] = MOD ) )  
  2. {  
  3. $show = true;  


jz [ Mon 15 Jan, 2007 02:15 ]
Post subject: Re: Hide Code Request
Fixed the error, but I can still post a single letter and the text is not hidden anymore..


Zuker [ Mon 15 Jan, 2007 02:48 ]
Post subject: Re: Hide Code Request
($userdata['user_posts'] < 200)

there you set the ammount of post needed to show the code


jz [ Mon 15 Jan, 2007 15:05 ]
Post subject: Re: Hide Code Request
I understand that,

but if you at the code you suggested changing is a little longer than the one you replaced it with..

I'm sure there's a way, but I'm not that good at php.


Zuker [ Mon 15 Jan, 2007 17:06 ]
Post subject: Re: Hide Code Request
i don't understand what you say jz


jz [ Mon 15 Jan, 2007 18:27 ]
Post subject: Re: Hide Code Request
hahaha,

sorry... my fingers are not keeping up with my brain

I was trying to say if you look at the part of the code you said to change is longer than the code you said to replace it with, so that's why I think is not working. any other ideas


fidunderground [ Wed 21 Mar, 2007 15:41 ]
Post subject: Re: Hide Code Request
yes this is exactly what i want....




Powered by Icy Phoenix