01: MODing Philosophy

This is a temporary forum setup for the purpose of discussing the EMC standards
Locked
Nuttzy99
Registered User
Posts: 927
Joined: Fri Aug 03, 2001 7:09 am
Contact:

Re: 01: MODing Philosophy

Post by Nuttzy99 »

...and comments in the MOD script are going to be very much encouraged! I do agree that we should always allow for the possiblity of manual installations ;)

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
My Other Site
User avatar
-=ET=-
Registered User
Posts: 214
Joined: Mon May 26, 2003 1:35 pm
Location: France

Re: 01: MODing Philosophy

Post by -=ET=- »

Ptirhiik wrote:A good example is the gender mod, which was correctly written on the sql instruction, would be compliant with the EMC requirement for this particular line, and has screwed an impressive amount of boards because of this issue due to the high level of difficulty to add in-line fragment where it is supposed to be.
Ptirhiik wrote:I was mentioning only this paticular line, which was a find, an in-line find, and an in-line after, add, in the usercp_register.php. All were perfectly right, but in-line process are comfusing for users, which very often doesn't notice the comma or the quote, much more often than after/before adding.
I don't know which release of EM are you talking about but the first real release announced to be EM compatible (and NOT EMC!) is the 1.2.5 and I've done the how-to for Niels.

That's true that I've seen in the past many Niels's MODs with some instructions not really clear (with white space(s) you need to take care before or after the string you have to insert) but that finished with this release.

ALL the how-to I write NEVER use any white space(s) before or after a string to insert in an SQL statement!

Here are the instructions of Gender 1.2.5 about the SQL statement of usercp_register.php...

Code: Select all

# 
#-----[ FIND ]------------------------------------------------ 
# 
$sql = "UPDATE " . USERS_TABLE . "
SET

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
$avatar_sql . "

# 
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
# 
, user_gender = '$gender'

# 
#-----[ FIND ]------------------------------------------------ 
# 
$sql = "INSERT INTO " . USERS_TABLE . "
VALUES

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
, user_style

# 
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
# 
, user_gender

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
, $user_style

# 
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
# 
, $gender
So, where is the problem?
I think it's difficult to use the necessary and useful IN-LINE commands with more clear instructions and NO-ONE has any particular issue with these instructions since the 1.2.5 is online on Niels's web site (but as far as I know on phpBB-fr.com there is always the old 1.2.4) :roll:

P.S.: if you were talking about old instructions, EM was not responsible of them.
Ptirhiik
Registered User
Posts: 144
Joined: Sun Apr 06, 2003 12:29 pm

Re: 01: MODing Philosophy

Post by Ptirhiik »

What I mean - and would remain true - is in-line searching is harder to understand for a user than a add : for an add, you only care of the line, for an in-line, you have to take care to each char, including the comma. And from there, the current mistake is to add fragments before a comma in place of after, forgot the double-quote that where standing in the find, and so. This is a very common issue. Remember mods author have to write their mod first to be installed at hand, not only regarding easymod requirements.

note: gender mod is an example only. For your special ask, v 1.2.4 will remain as the last tested and validated version proposed at phpbb-fr.com as long as the new version won't be extensivly checked and approved. If a problem is discovered, it won't (of course it will be reported to Niels :)). And that's true for every mod proposed :). For this specific one, I don't think it will require a long time to do.
User avatar
-=ET=-
Registered User
Posts: 214
Joined: Mon May 26, 2003 1:35 pm
Location: France

Re: 01: MODing Philosophy

Post by -=ET=- »

Ptirhiik wrote:What I mean - and would remain true - is in-line searching is harder to understand for a user than a add : for an add, you only care of the line, for an in-line, you have to take care to each char, including the comma.
Sure but as IN-LINE instructions are unavoidable so I don't see the problem.
That's a bit harder ok, but there are always anywhere things easier and other harder.
The fact is that we need IN-LINE instructions, even if you want to install a MOD manually because what is your practice: perform full line FIND and REPLACE (them) WITH premodded lines but every one know that this WILL fail after only 1 MOD installation on the same lines.

Also, I've read that you've said that the install MUST fail in some case very similar than this one (about FIND the instruction) but what will do the user manually?

He will find the issue manually, and do exactly an IN-LINE XXXXX, ADD with no instruction and after having searched for 1/4 of an hour!

Users must learn how-to to MOD, there is no other way.
Ptirhiik wrote:For your special ask, v 1.2.4 will remain as the last tested and validated version proposed at phpbb-fr.com as long as the new version won't be extensivly checked and approved. If a problem is discovered, it won't (of course it will be reported to Niels :)). And that's true for every mod proposed :). For this specific one, I don't think it will require a long time to do.
lol no! :lol:
In fact I was wrong. The title of the topic is on the translation of the 1.2.4 release but the link to the MOD is to the 1.2.5 one on Niels's web site so nothing is tested by the MOD team as Niels can change it's release at anytime (and that what he did!) lol :-)
User avatar
GPHemsley
Registered User
Posts: 1617
Joined: Fri Apr 18, 2003 4:01 am
Location: Long Beach, NY
Contact:

Re: 01: MODing Philosophy

Post by GPHemsley »

-=ET=- wrote:Users must learn how-to to MOD, there is no other way.
Exactly.

Yes, you have to take into account that users will install it by hand, and therefore need a non-technical (i.e. non-very-little-code-to-look-for) action, but it should NOT be the MOD Author's responsibility to take into account a user's stupidity. :roll: If the user cannot install the MOD correctly, you point them to the correct docs or help them with their problem on a need-to-know basis only.
Ptirhiik
Registered User
Posts: 144
Joined: Sun Apr 06, 2003 12:29 pm

Re: 01: MODing Philosophy

Post by Ptirhiik »

> What will do a user if an install fail ?
Thinking : at least you have to consider that a mod can screw entirely a board - and the database - because it is not functionaly compliant with another. Modding a program is not a non-impacting action, this is a really risky one, and if the author decided to let the mod uninstallable with some specific others, he has certainly excellents reasons to proceed in this way. The issue generated is so an issue that has to be solved by the user for his specific configuration, and assure itself the mod can be apply without any bad consequences. Acting in other way is just acting crazy, don't you think ?


> for the gender mod, thanks to report this at phpbb-fr.com : it shouldn't point on the 1.2.5 version (as I didn't see any conclusion on check on this one has been reached yet, nor at phpBB.com).
User avatar
-=ET=-
Registered User
Posts: 214
Joined: Mon May 26, 2003 1:35 pm
Location: France

Re: 01: MODing Philosophy

Post by -=ET=- »

Ptirhiik wrote:Acting in other way is just acting crazy, don't you think ?
Sure, but what will do the user, what is the choice?
He will do an IN-LINE add, he has NO choice.

I agree that it's a little (not much) harder than to add line, but if he wants to install some MODs with SQL queries modification, he will NEED to do manually an IN-LINE add!

So...?
I still don't see the problem. You can put the instruction you want (including a REPLACE WITH instead of an IN-LINE ADD), after the automatic failed or finding the issue in a manual installation, he will NEED to to this IN-LINE ADD manually to end its installation.
Nuttzy99
Registered User
Posts: 927
Joined: Fri Aug 03, 2001 7:09 am
Contact:

Re: 01: MODing Philosophy

Post by Nuttzy99 »

I'm confused. Ptirhiik, I'm pretty sure you are not "against" the use of IN-LINE commands. I think what you are saying is that for newbie users installing by hand, IN-LINE is difficult to understand. If that's the case then like the others said, a n00b needs to learn and these really aren't the most complex things either. Do you have a suggestion on making things a little easier for them? Did I even understand your point?

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
My Other Site
Ptirhiik
Registered User
Posts: 144
Joined: Sun Apr 06, 2003 12:29 pm

Re: 01: MODing Philosophy

Post by Ptirhiik »

My point is only what I mentioned in first place : no command is better or worst than another. It's only a matter to use the good one at the good place. I don't agree ie with saying replace is evil : well used, replace is better than add, at end your preoccupation is too keep the map the less modified. For the need of a mod, I will say there is no problem to push over this map, as long as it can still remain. I have experimented this in many place, and find so little installation comflicts that was really the good choice Using other way in the code to keep the map would just occurs in more comflict, duplicated code, less efficient one, and so. At some place, the in-line processing will be just better.

At least - and I think I can call me not really a nOOb ;) - I keep having problems installing those in-lines, more often because of the delimiters, sometimes because of the spot. The only advantage I've got on a non-experienced user is I will see it at first sight. If you want to try a very funny one to see what I mean, just added a new auth column in the predefined set in admin_ug_auth.php ie, let's say near the sticky column. I'm sure my point will be clear ;). Removing it is also a great toast of fun :).
Nuttzy99
Registered User
Posts: 927
Joined: Fri Aug 03, 2001 7:09 am
Contact:

Re: 01: MODing Philosophy

Post by Nuttzy99 »

Ok, I understand what you are saying about all the commas and single quotes and that attention to detail is required. But you still cannot use a REPLACE in this instance. What if another MOD has already installed something here? A REPLACE is going to completely blow it away. That is the thing that always struck me as odd when you are adding the huge amounts of duplicate code in comments straight from the MOD script. You really have no way of knowing if what you are putting there is accurate b/c if other MODs have changed those lines then your comments are out of date.

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
My Other Site
Locked