EasyMOD alpha3 v0.0.8 released

This forum is now closed as part of retiring phpBB2.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Locked
User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Wed May 28, 2003 12:37 am

Templating : ahh, that's a real deal : as the subSilver is quite badly wroten to my point of view (too many qualified things in it), but as phpBB is tied with, I let fall any try to be compliant, and always advice to install first on subSilver, and then install on the specific style template by comparing the result on subSilver. It's also the best way to avoid some weird modification on particular templates. The bad thing is that installers have to have some knowledge of HTML to perform an installation (which is actually often the case for people wanting to set hughe mods). That's also why I provide modified files for those kind of mods ;).

Comments modified lines and replace : now you know why I complain not having the MUTE command :) : this way of coding is particular efficient for upgrading or uninstalling mods or board. Also this prevent silent modification of lines modified, letting the user find the original lines, and let him choose what to do : on the sql sample you give, if the prec modifications were about adding some user fields, it would be of no reason to add the u.* without removing it ;).

Missing part : yep, the sample is only a (small) part of the PCP : this is the modification part to the original phpBB files, the sql and copy are not included, and the added files also. I was performing a check on the install description (which is the main goal for my purpose of the tool : using the descro, do I get the same files that the one I worked on :)).

Legit error : this was the main point : I still doesn't find in which case this appends, after having recheck all the 34 files involved. Note : not all inline/find doesn't mess, some works.

Nuttzy99
Former Team Member
Posts: 4917
Joined: Fri Aug 03, 2001 7:09 am
Location: the 11th dimension
Contact:

Post by Nuttzy99 » Wed May 28, 2003 12:58 am

Ptirhiik - RPGnet-fr wrote: Templating : ahh, that's a real deal
Heh, I still think adjusting your FIND string would fix this ;) But at least EM now displays a warning on the failed non-subSilver files and things will work for at least subSilver. Same for English vs. other langs.
now you know why I complain not having the MUTE command :)
[..SNIP..]
letting the user find the original lines, and let him choose what to do
My goal is that by the time is EM and MOD authors are writing MODs to conform to it, it will VERY rare for anyone to be manually updating their boards ;) The benefits to what you are suggesting is undeniable. But it's a trade-off. Having MODs installed automatically is first priority ;)
on the sql sample you give, if the prec modifications were about adding some user fields, it would be of no reason to add the u.* without removing it ;).
I don't quite follow what you are saying here :(
Legit error : this was the main point : I still doesn't find in which case this appends, after having recheck all the 34 files involved. Note : not all inline/find doesn't mess, some works.
It is very possible the INLINE error is related to the same thing . You could save me some time by posting some specific instances when INLINE doesn't work ;)

Thanks!
-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
No Support via PM please!

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Wed May 28, 2003 1:18 am

Argh ! I just cleaned up all the things. Well, let me finish my currently work, and I will be more free to re-perform the analysis. I think the replace was also involved in the messy inline, and not in the add - I just have to recheck.


For the example :

Code: Select all

$sql = "SELECT u.username, u.user_id, 
replaced with

Code: Select all

$sql= "SELECT u.* 
: an other mod come to add u.user_rank ie, it is of no use to add this, as it's already included. Even if the u.user_rank was there before the replace with u.*, it has to be removed :).

Nuttzy99
Former Team Member
Posts: 4917
Joined: Fri Aug 03, 2001 7:09 am
Location: the 11th dimension
Contact:

Post by Nuttzy99 » Wed May 28, 2003 1:23 am

Well what if someone modified the SQL to include another table. Then having u.* is going to screw it all up ;)

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
No Support via PM please!

User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Post by drathbun » Wed May 28, 2003 1:49 am

Nuttzy99 wrote: Well what if someone modified the SQL to include another table. Then having u.* is going to screw it all up ;)

Actually, it shouldn't. For example, the following works just fine:

Code: Select all

SELECT a.*, b.col1, b.col2
from some_table a, some_other_table b
where...
So there should not be an issue with using the * as a shortcut to grab the entire table row. Just from a SQL point of view, anyway. Not sure how it fits with the policy to make a mod EM compliant. ;-)

Dave
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image

Nuttzy99
Former Team Member
Posts: 4917
Joined: Fri Aug 03, 2001 7:09 am
Location: the 11th dimension
Contact:

Post by Nuttzy99 » Wed May 28, 2003 2:15 am

You missed the point. The line was originally something like SELECT u.username, u.user_id, .... etc. Then a MOD changes it to u.*. Now another MOD wants to add some more vars but it can't b/c it doesn't know that a previous MOD changed it to u.* and all the descriptive landmarks about the line were wiped out.

Get it now? :P

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
No Support via PM please!

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Wed May 28, 2003 2:34 am

Nuttzy99 wrote: (../..)all the descriptive landmarks about the line were wiped out.
No, as they are supposed to be commented as deleted lines, while an inline/replace will actually wipe them. The fact is the added mod doesn't have to be automatcly installed as the line has changed. Even if an inline achieve the job, you don't know if the modification is to be made : a line that have been changed has not the same signification than the original :).

User avatar
GPHemsley
Registered User
Posts: 1475
Joined: Fri Apr 18, 2003 3:12 am
Location: Long Beach, NY
Name: Gordon Hemsley
Contact:

Post by GPHemsley » Wed May 28, 2003 2:58 am

I'm not sure if you guys realize this, nor am I sure that you don't, but the muted lines shouldn't be picked up during a search, unless the search is only for one line, because there will be a bunch of // in the middle, quite possibly.... Let me know if I'm completely off-topic. I'll understand. :P

LifeIsPain
Former Team Member
Posts: 2148
Joined: Tue Oct 01, 2002 7:04 am
Location: Way Way Behind

Post by LifeIsPain » Wed May 28, 2003 3:40 am

Before we make all mods conform to EasyMOD, I do think one issue needs to be addressed.

Currently, if a find fails in a subSilver file, the process is halted. I would like to bring up the issue of lines that may be optional. For example, in a default install of subSilver, you have a butt long stylesheet in there. If the user has elected to remove the stylesheet, and instead go with the external css file, any find would fail, as the code was removed. Could there be a comment line that EasyMOD looks for to see if the code is optional? This wouldn't be something to add to the MOD template standards, but it would give us mod authors a bit more control.

That said, this is another instance of when a regular expression would be good, so that a mod could be made to kill the bandwidth hog :)

Also, if I were to write a mod that integrates with EasyMOD, would that be ok? I am thinking of Rod's new field instructions here....
LifeIsPain - one who needs to be smackedLife is pain, highness! Anyone who says differently is selling something.

Nuttzy99
Former Team Member
Posts: 4917
Joined: Fri Aug 03, 2001 7:09 am
Location: the 11th dimension
Contact:

Post by Nuttzy99 » Wed May 28, 2003 4:01 am

Ptirhiik - RPGnet-fr wrote: The fact is the added mod doesn't have to be automatcly installed as the line has changed.

Nuttzy99 wrote: Having MODs installed automatically is first priority


We'll just have to agree to disagree. I'd much rather have an auto "installer" than an auto "commenter". And that is where we differ ;)
GPHemsley wrote: but the muted lines shouldn't be picked up during a search
The way things stand right now, they indeed should be picked up. When I write the uninstaller that will determine better how this should be handled. The bottom line is that all MOD authors will need to write their MODs the same way. Whether it ends up looking like Ptirhiik's method has yet to be determined ;) But right now his method is clashing with EM alpha. At this point that's not a problem. When the beta comes out and the uninstall method has been decided, then it could be a problem. But again, there is an equal possiblity that uninstall method will use his method. We'll see ;)

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
No Support via PM please!

User avatar
GPHemsley
Registered User
Posts: 1475
Joined: Fri Apr 18, 2003 3:12 am
Location: Long Beach, NY
Name: Gordon Hemsley
Contact:

Post by GPHemsley » Wed May 28, 2003 4:05 am

Nuttzy99 wrote:
GPHemsley wrote:but the muted lines shouldn't be picked up during a search
The way things stand right now, they indeed should be picked up. When I write the uninstaller that will determine better how this should be handled. The bottom line is that all MOD authors will need to write their MODs the same way. Whether it ends up looking like Ptirhiik's method has yet to be determined ;) But right now his method is clashing with EM alpha. At this point that's not a problem. When the beta comes out and the uninstall method has been decided, then it could be a problem. But again, there is an equal possiblity that uninstall method will use his method. We'll see ;)


OK, apparently my meaning came across wrong.... When I said "shouldn't" I really meant "wouldn't", in a sense. I was saying that if the lines were muted, the only way for EM to pick them up would be if the FIND was for only one line... It was more a question about the truth than an opinion on what you should do. ;) Sorry about the confusion. :D

Nuttzy99
Former Team Member
Posts: 4917
Joined: Fri Aug 03, 2001 7:09 am
Location: the 11th dimension
Contact:

Post by Nuttzy99 » Wed May 28, 2003 4:13 am

LifeIsPain wrote: Before we make all mods conform to EasyMOD, I do think one issue needs to be addressed.
There is a heck of a lot more than one ;) It's an evolution thing. The key thing will be for the MOD Team to be flexible. If EM can't do the job then it should not hold up the MOD Community. For most MODs, EM will be fine. But for others, maybe we'll have to make exceptions. But there better be a good reason ;)
I would like to bring up the issue of lines that may be optional.
While this is a good idea, it is not something to shoot for in the alpha, the beta, or even the first release. We can't have everything on the first try ;)
Also, if I were to write a mod that integrates with EasyMOD, would that be ok? I am thinking of Rod's new field instructions here....
That is absolutely fine as far as I'm concerned. Once installed, EM is no different from core phpBB. Maybe some of the EM MODs will end up as features :D The only thing I would suggest is that you wait for a stable release. I wouldn't even consider trying to write a MOD for it until 0.0.10 comes out. There will be too much change prior to that. :roll:

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
No Support via PM please!

Nuttzy99
Former Team Member
Posts: 4917
Joined: Fri Aug 03, 2001 7:09 am
Location: the 11th dimension
Contact:

Post by Nuttzy99 » Wed May 28, 2003 4:17 am

GPHemsley wrote: When I said "shouldn't" I really meant "wouldn't", in a sense.
Nope it would. EM does not do exact line matching. It sees if the needle (the FIND) is in the haystack (the core phpBB). The only difference between the lines is that the one in the haystack has // preceeding it, so the needle will still be found ;)

This revelation first came to mind when John Abela had a similar coding style ;)

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
No Support via PM please!

Nuttzy99
Former Team Member
Posts: 4917
Joined: Fri Aug 03, 2001 7:09 am
Location: the 11th dimension
Contact:

Post by Nuttzy99 » Wed May 28, 2003 6:27 am

Nuttzy99 wrote: The reason is that I've been discarding whitespace when doing a FIND and this seems to be causing a problem.
This was easy to identify and also easy to find the cause. The hard part was fixing the darn thing! But I did ;) Along the way I also found another potential bug that could be related to the INLINE thing.

Ptirhiik, give me an example of an INLINE messing up and then I'm sure I can track it down ;) Thanks!

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
No Support via PM please!

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Wed May 28, 2003 6:47 am

Here you are (sorry, this was longer than I thought) : from the sample :

Code: Select all

#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/overall_header.tpl
# [...SNIP...]
#-----[ FIND ]------------------------------------------------
#
	  <td width="20%" valign="middle" align="center" class="{listrow.ROW_CLASS}"><span class="name">&<a href="{listrow.U_FROM_USER_PROFILE}" class="name">{listrow.FROM}</a></span></td>
#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
class="name">{listrow.FROM}
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
class="{listrow.CLASS_NAME}">{listrow.FROM}
give this result :

Code: Select all

	  <td width="55%" valign="middle" class="{listrow.ROW_CLASS}"><span class="topictitle">&<a href="{listrow.U_READ}" class="topictitle">{listrow.SUBJECT}</a></span></td>
class="{listrow.CLASS_NAME}">{listrow.FROM}
	  <td width="15%" align="center" valign="middle" class="{listrow.ROW_CLASS}"><span class="postdetails">{listrow.DATE}</span></td>
As you can see, the search block has been wipe, probably because of the replace with, used in anINLINE/FIND context.

Locked

Return to “[2.0.x] MOD Writers Discussion”