Page 1 of 1
how to remove number of replies
Posted: Mon Oct 22, 2007 6:41 pm
by icepack
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:
I've noticed that after the name of the poster and the date there is a (x) where x is the number of replies. just wondering which part of the code i edit to remove that.
also just wondering if it was possible to move someone's post.
btw the license removal is great, so simple!! thanks klemen
Posted: Tue Oct 23, 2007 1:08 pm
by Klemen
Hmm, try this:
1. BACKUP ALL FILES, including threads.txt!
2. In threads.txt remove brackets (and the number within) all lines starting with
. For example change
to just
3. in mboard.php change
to
twice within the code.
4. in mboard.php find
Code: Select all
if (!empty($up) && strstr($mythread,'<!--o '.$up.'-->'))
{
preg_match("/<\!--(.*)-->\s\((.*)\)/",$mythread,$matches);
$number_of_replies=$matches[2];$number_of_replies--;
$newthreads.= '<!--o '.$up.'--> ('.$number_of_replies.")\n";
continue;
}
elseif (strstr($mythread,'<!--z '.$num.'-->')) {$keep = 'NO'; continue;}
and change it to
Code: Select all
if (strstr($mythread,'<!--z '.$num.'-->')) {$keep = 'NO'; continue;}
4. in mboard.php find
Code: Select all
preg_match("/<\!--(.*)-->\s\((.*)\)/",$threads[$i],$matches);
$number_of_replies=$matches[2];$number_of_replies++;
$threads[$i] = "<!--o $orig_id--> ($number_of_replies)\n";
and change it to
Code: Select all
$threads[$i] = "<!--o $orig_id-->\n";
I haven't tested any of this though.
As for moving posts - no easy way of doing it, you'd have to edit threads.txt manually. Each post starts with <!--z NUMBER--> and ends with <!--k NUMBER-->. Replies are located between <!--o NUMBER--> and <!--k NUMBER-->. You need to keep track of all the <ul>, <li> and <p>'s and close them properly. If you wish more help here you will have to try and see. I suggest upload a test verison somewhere, post a few posts to see how the threads.txt changes. When you get the hang of it try moving a few posts (NUMBERs don't really matter, just that the architecture is correct).
Posted: Wed Oct 24, 2007 11:07 am
by icepack
tested and wrking
thanks a lt!