Page 1 of 1

hiding replies

Posted: Fri Mar 28, 2008 4:16 am
by neilis
Script URL:
Version of script:
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

Would it be possible to show only the numbers of replies but hide their subjects on the front page?

Posted: Fri Mar 28, 2008 11:46 am
by icepack
i wanted to do the same and did manage to change it before. but it's not worth it as loads of people never find the link to the reply otherwsie

solved

Posted: Fri Mar 28, 2008 3:01 pm
by neilis
Ok, I think I managed to do it just deleting these lines of code... might try it for a while just to see how it works.


$threads[$i] .= "<!--s $count--><ul><li><a href=\"msg/$count.$settings[extension]\">$subject</a> - <b>$name</b> <i>$date</i>\n";
$threads[$i] .= "<!--o $count--> (0)\n";
$threads[$i] .= "</li></ul><!--k $count-->\n";


But now I'm on to something more difficult: is there a way to limit the levels of the thread, like "no replies to a reply"?

Posted: Sun Mar 30, 2008 6:39 pm
by neilis
Never mind, did it!



$threads = file_get_contents("threads.txt");

$pos = strpos($threads, '<!--o '.$count.'-->');


if ($pos !== false)

{

$content .= '</p>

<p><font color="#996600">'.$comments.'</font color="#996600"></p>

<hr>

<p align="center"><b></b></p>
<ul>
<!-- zacni --><p></p>
</ul>
<hr></td>
</tr></table>
</center></div>

<p align="left"><a name="new"></a><b></b></p>
<div align="center"><center>
<table border="0"><tr>

<td>
<form method=post action="'.$settings['mboard_url'].'/mboard.php" name="form" onSubmit="return mboard_checkFields();">
<p><input type="hidden" name="a" value="reply">comentário<br><input type=text name="subject" value="Re: '.$subject.'" size=30 maxlength=100><br><br>autor<br><input type=text name="name" size=30 maxlength=30><br><br>
texto<br><textarea cols=25 rows=7 name="message"></textarea>
<input type="hidden" name="orig_id" value="'.$count.'">
<input type="hidden" name="orig_name" value="'.$name.'">
<input type="hidden" name="orig_subject" value="'.$subject.'">
<input type="hidden" name="orig_date" value="'.$date.'"><br>';

$content.='
<p><input type=submit value="Enviar">
</form>
</td>
</tr></table>
</center></div>
';

}

else

{

$content .= '</p>

<p><font color="#996600">'.$comments.'</font color="#996600"></p>

<hr>

<p align="center"><b></b></p>
<ul>
<!-- zacni --><p></p>
</ul>
<hr></td>
</tr></table>
</center></div>

<p align="left"><a name="new"></a><b></b></p>
<div align="center"><center>
<table border="0"><tr>
</tr></table>
</center></div>
';

}

Posted: Sun Mar 30, 2008 6:46 pm
by neilis
By the way, Mr. Klemen, congrutulations for the mboard! I've been messing around with the code (but it's working, so far... ), to make it even simpler, for a "miniboard" version. If you'd like to take a look... www.neilisboa.com.br/indexnovo
best regards

Posted: Mon Mar 31, 2008 6:34 pm
by Klemen
Yes, it is "mini", I see now why you needed to hide replies :) Enjoy the script.