Hide Code Request


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: [Download] [Hide]
  1. Sorry, but you must be registered and also must post a reply to view this message. 


thank you in advance :mrorange:

Subject: Re: Hide Code Request
but how can a user post a reply if the post text is hidden?

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 8)

Subject: Re: Hide Code Request
mmm
try this
i''m not sure that this will work :mricy:

open BBcode.php

find

Code: [Download] [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: [Download] [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

:chef:

Subject: Re: Hide Code Request
No working..

Parse error: parse error, unexpected '{'

Subject: Re: Hide Code Request
woo.. its work :right1:

Subject: Re: Hide Code Request
cubano wrote: [View Post]
woo.. its work :right1:


where?

Subject: Re: Hide Code Request
replace with this ando should work. There was a ( that mustn't be there

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

Subject: Re: Hide Code Request
Fixed the error, but I can still post a single letter and the text is not hidden anymore..

Subject: Re: Hide Code Request
($userdata['user_posts'] < 200)

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

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.. :mricy:

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

Subject: Re: Hide Code Request
i don't understand what you say jz

Subject: Re: Hide Code Request
hahaha,

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

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 :mrorange:

Subject: Re: Hide Code Request
yes this is exactly what i want....

Profile PM  

Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.6273s (PHP: 3% SQL: 97%)
SQL queries: 10 - Debug Off - GZIP Enabled