Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,509,512
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 05-02-24 01:38 AM
Guest: Register | Login

0 users currently in Help/Suggestions/Bug Reports | 2 guests | 1 bot

Main - Help/Suggestions/Bug Reports - Re: Re: Re: Re: Re: Re: Re: Re: Re: PM titles New thread | New reply


Kernal
Posted on 04-14-07 08:02 PM (rev. 2 of 04-14-07 08:03 PM) Link | Quote | ID: 26602

Gone
Level: 88

Posts: 1378/1881
EXP: 6465081
Next: 185583

Since: 02-20-07

Last post: 6152 days
Last view: 6142 days
During some back-and-forth PM exchanges, if one or the other person doesn't manually edit the title, there can be a ridiculous amount of unnecessary "Re:"s added to the beginning. Can you make it so that it doesn't append "Re:" to the beginning of a title that already starts with "Re:", so that only one of them ever shows up?

Stifu
Posted on 04-14-07 08:32 PM Link | Quote | ID: 26611


Cobrat
Level: 56

Posts: 83/666
EXP: 1361901
Next: 36275

Since: 02-22-07

Last post: 691 days
Last view: 313 days
A better system (but a bit harder to implement) would be to increment a number, like Re[2]:, Re[3]:... Like some mail clients do.

Raccoon Sam
Posted on 04-14-07 08:45 PM Link | Quote | ID: 26614


Cobrat
Level: 56

Posts: 143/672
EXP: 1380643
Next: 17533

Since: 02-19-07
From: Hi

Last post: 3473 days
Last view: 2704 days
I agree with Stifu. Although it would look neater if the indicator number would be superscript.

____________________


JrShrooboid
Posted on 04-14-07 08:49 PM Link | Quote | ID: 26617


Porcupo
Level: 41

Posts: 164/317
EXP: 445982
Next: 34163

Since: 03-29-07
From: Somewhere far, far away.

Last post: 6068 days
Last view: 5252 days
Posted by Raccoon Sam
I agree with Stifu. Although it would look neater if the indicator number would be superscript.


I agree with Racoon Sam, agreeing with Stifu.

NightKev
Posted on 04-14-07 09:21 PM (rev. 2 of 04-14-07 09:21 PM) Link | Quote | ID: 26632


Cape Luigi
Level: 131

Posts: 386/4792
EXP: 26241803
Next: 182817

Since: 03-15-07

Last post: 3740 days
Last view: 3652 days
Posted by JrShrooboid
Posted by Raccoon Sam
I agree with Stifu. Although it would look neater if the indicator number would be superscript.


I agree with Racoon Sam, agreeing with Stifu.
I agree with JrShrooboid, agreeing with R...you get the idea. Re2: etc would be good.

____________________

Xkeeper
Posted on 04-15-07 01:49 AM Link | Quote | ID: 26717


Level: 105

Posts: 1318/2846
EXP: 12033620
Next: 228640

Since: 02-19-07

Last post: 6065 days
Last view: 2803 days
If you guys feel like coding it, be my guest.

RegExes are not my skill.

(Also, the next person who does nothing but go I AGREE WITH Y is going to be shot)

____________________
I dealt with it.

Madman200
Posted on 04-15-07 01:53 AM Link | Quote | ID: 26719


Level: 58

Posts: 295/726
EXP: 1550314
Next: 27232

Since: 02-20-07

Last post: 4457 days
Last view: 4457 days
If it starts with "Re:", change it to "Re[2]:".
If it starts with "Re[2]:", change it to "Re[3]:".
If it starts with "Re[3]:", change it to "Re[4]:".
If it starts with "Re[4]:", change it to "Re[5]:".
If it starts with "Re[5]:", change it to "Re[6]:".
And so on like that...but I'm not a coder. I just get many ideas that only reach the thought phase.

Xkeeper
Posted on 04-15-07 01:54 AM Link | Quote | ID: 26720


Level: 105

Posts: 1319/2846
EXP: 12033620
Next: 228640

Since: 02-19-07

Last post: 6065 days
Last view: 2803 days
If you want to do a few hundred checks in a row, that's fine too. Nevermind the fact that, you know, that'd be quite often an would be slow as hell.

____________________
I dealt with it.

Madman200
Posted on 04-15-07 01:55 AM Link | Quote | ID: 26722


Level: 58

Posts: 296/726
EXP: 1550314
Next: 27232

Since: 02-20-07

Last post: 4457 days
Last view: 4457 days
If it starts with "Re:", change it to "Re[2]:".
If it starts with "Re[number]:", change it to "Re[number+1]:".

Should've thought condensed. Me. Bah.

Shiryu
Posted on 04-15-07 02:10 AM Link | Quote | ID: 26731


Bloober
Level: 47

Posts: 186/437
EXP: 724011
Next: 42192

Since: 02-19-07

Last post: 6125 days
Last view: 5997 days
just set some sort of variable next to "Re:".
The variable when is 0 doesn't show anything (Normal PM), when you reply that variable's value is increased by 1. when the value is 1 it just shows "Re:". In the rest of the cases it shows "Re" and the value.

This way it just displays how many times the variable (PM) has been replied, instead of using a weird filter.

If I had knowledge of PHP or whatever the code of the board is, I would make it.

____________________
Generated a 991044 foot, 10.4-inch twiggy catgirl with orange hair, who weighs 315,239,939,065.9 pounds and has soft A-cup breasts, and it only took 0.00031 seconds.

Xkeeper
Posted on 04-15-07 02:17 AM Link | Quote | ID: 26737


Level: 105

Posts: 1321/2846
EXP: 12033620
Next: 228640

Since: 02-19-07

Last post: 6065 days
Last view: 2803 days
Extra database clutter

____________________
I dealt with it.

JrShrooboid
Posted on 04-15-07 02:18 AM Link | Quote | ID: 26738


Porcupo
Level: 41

Posts: 175/317
EXP: 445982
Next: 34163

Since: 03-29-07
From: Somewhere far, far away.

Last post: 6068 days
Last view: 5252 days
Maybe if you get to a cirten number, like 25, you just start over from Re[1]:

darkwitch
Posted on 04-15-07 03:03 AM Link | Quote | ID: 26759


Paragoomba
Level: 20

Posts: 64/65
EXP: 41526
Next: 913

Since: 02-21-07
From: Puerto Rico

Last post: 6226 days
Last view: 6226 days
Reply 1 sets a "RE[1]:" at the title, then at the reply of the PM:

$a=1;while($a<200){$title=str_replace("RE[$a]","RE[$a+1]",$title);$a++;}

While a 200 loop is terrible for PHP, is the easiest way around that. Unless your an expert in preg_match and such functions (which I'm not).

Or adding a "is_reply" field in the DB:
$extra="";if($PM_DATA['is_reply'] != 'yes') $extra="RE: ";

Xkeeper
Posted on 04-15-07 03:04 AM Link | Quote | ID: 26760


Level: 105

Posts: 1322/2846
EXP: 12033620
Next: 228640

Since: 02-19-07

Last post: 6065 days
Last view: 2803 days
Posted by darkwitch
Reply 1 sets a "RE[1]:" at the title, then at the reply of the PM:

$a=1;while($a<200){$title=str_replace("RE[$a]","RE[$a+1]",$title);$a++;}
I can tell just by reading that -- your code will result in "Re[200]" every time.

____________________
I dealt with it.

darkwitch
Posted on 04-15-07 03:07 AM (rev. 2 of 04-15-07 03:07 AM) Link | Quote | ID: 26761


Paragoomba
Level: 20

Posts: 65/65
EXP: 41526
Next: 913

Since: 02-21-07
From: Puerto Rico

Last post: 6226 days
Last view: 6226 days
Posted by Xkeeper
Posted by darkwitch
Reply 1 sets a "RE[1]:" at the title, then at the reply of the PM:

$a=1;while($a<200){$title=str_replace("RE[$a]","RE[$a+1]",$title);$a++;}
I can tell just by reading that -- your code will result in "Re[200]" every time.


Um, it shouldn't, it just trying to replace every RE[] with a number between 1 and 200. In other words, it will only get you a 200 if there is a "RE[199]" in the title...

Xkeeper
Posted on 04-15-07 03:09 AM Link | Quote | ID: 26762


Level: 105

Posts: 1323/2846
EXP: 12033620
Next: 228640

Since: 02-19-07

Last post: 6065 days
Last view: 2803 days
And this, firedude darkwitch, is why you fail.

After fixing it

$a=1;while($a<200){$title=str_replace("RE[$a]","RE[". ($a+1) ."]",$title);$a++;}


I was indeed correct.

I hope you can figure out why. If not, I dare say you are doomed to failure in programming.

____________________
I dealt with it.

Cellar Dweller
Posted on 04-15-07 04:53 AM Link | Quote | ID: 26803


Snifit
Level: 39

Posts: 23/287
EXP: 385359
Next: 19412

Since: 02-19-07
From: Arkansas

Last post: 4057 days
Last view: 3225 days
What about:

if (preg_match("/^Re \\[(\\d*)\\]: (.*)\$/", $title, $matches)) {
$title = "Re [".($matches[1]+1)."]: ".$matches[2];
} else if (preg_match("/^Re: (.*)\$/", $title, $matches)) {
$title = "Re [2]: ".$matches[1];
} else {
$title = "Re: ".$title;
}


This code should be good for about 231 "Re"s without wrapping, and it's loop free.

Xkeeper
Posted on 04-15-07 06:40 AM Link | Quote | ID: 26836


Level: 105

Posts: 1328/2846
EXP: 12033620
Next: 228640

Since: 02-19-07

Last post: 6065 days
Last view: 2803 days
That second elseif could probably be "if (substr($title, 0, 3) == "Re:") instead...

____________________
I dealt with it.

Stifu
Posted on 04-15-07 09:21 AM Link | Quote | ID: 26868


Cobrat
Level: 56

Posts: 84/666
EXP: 1361901
Next: 36275

Since: 02-22-07

Last post: 691 days
Last view: 313 days
Posted by Xkeeper
Extra database clutter

Not needed, just gotta use regular expressions as Cellar Dweller showed....

Main - Help/Suggestions/Bug Reports - Re: Re: Re: Re: Re: Re: Re: Re: Re: PM titles New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.028 seconds. (321KB of memory used)
MySQL - queries: 82, rows: 110/110, time: 0.018 seconds.