Closed Thread Icon

Topic awaiting preservation: need a little else/if help :) (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12592" title="Pages that link to Topic awaiting preservation: need a little else/if help :) (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: need a little else/if help :) <span class="small">(Page 1 of 1)</span>\

 
Synthetic
Paranoid (IV) Inmate

From: under your rug,
Insane since: Jul 2001

posted posted 01-26-2003 22:50
code:
if ( (strlen($ibforums->input['TopicTitle']) < ($ibforums->vars['min_topic_title'])) )
{
$class->obj['post_errors'] = 'no_topic_title';
}
if ( (strlen($ibforums->input['TopicDesc']) < ($ibforums->vars['min_topic_desc'])) )
{
$class->obj['post_errors'] = 'no_topic_desc';
}
if ( (strlen($ibforums->input['TopicTitle']) < ($ibforums->vars['min_topic_title'])) and (strlen(!$ibforums->input['TopicDesc']) < ($ibforums->vars['min_topic_desc'])) )
{
$class->obj['post_errors'] = 'no_topic_title_or_desc';
}



Incase you can't tell from the code, this is what i'm trying to do...

if they don't meet the requirments for the TopicTitle they get the 'no_topic_topic' error
if they don't meet the requirments for the TopicDesc they get the 'no_topic_desc' error
if they don't meet the requirments for the TopicDesc & the TopicDesc they get the 'no_topic_title_or_desc' error

The problem is that even if the requirements are met for the input['TopicDesc'] it still shows the error for the 'no_topic_title_or_desc'

I know it must have something to do with me needing an else if or something in there, but i tried a few different combinations with no avail, anyone know what i need?



[This message has been edited by Synthetic (edited 01-26-2003).]

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 01-27-2003 01:48

if (!topicDesc && !topicTitle)
else if(!topicTitle)
else

You need to start it offer coving both, then move down to single cases.

Synthetic
Paranoid (IV) Inmate

From: under your rug,
Insane since: Jul 2001

posted posted 01-29-2003 00:57

thanks

Synthetic
Paranoid (IV) Inmate

From: under your rug,
Insane since: Jul 2001

posted posted 01-29-2003 01:30

[edit]

(Nevermind, I answered my own question shortly after posting lol)

[/edit]

[This message has been edited by Synthetic (edited 01-29-2003).]

« BackwardsOnwards »

Show Forum Drop Down Menu