02: Order! Order!

This is a temporary forum setup for the purpose of discussing the EMC standards
Locked
ant
Registered User
Posts: 4
Joined: Wed Jun 11, 2003 6:45 pm

Re: 02: Order! Order!

Post by ant »

So the order the commands are proceced is:

1) FIND
2) BEFORE, ADD
3) IN-LINE FIND
4) IN-LINE BEFORE, ADD

Would you put in REPLACE in after FIND but before BEFORE, ADD? (If you used it, which you really shouldn't. :P ) :?:
Nuttzy99
Registered User
Posts: 927
Joined: Fri Aug 03, 2001 7:09 am
Contact:

Re: 02: Order! Order!

Post by Nuttzy99 »

I would put a REPLACE after the BEFORE, ADD since the text involved with the REPLACE comes after the text involved with the BEFORE, ADD. It really doesn't matter though but it does make for a nice convention ;) The only thing that *must* happen is that AFTER, ADD be the last command to be used on the FIND block. Also IN-LINE FIND commands should be in sequential order as well b/c of the way lines are committed to the file.

-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: 02: Order! Order!

Post by -=ET=- »

Ptirhiik wrote:hum.. Are you sure this is correctly parsed by the actual version of easymod ? :)
Yes, I can confirm too.
I've use this case many times and it works fine :)

P.S.: just an example...

Code: Select all

# 
#-----[ 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'
User avatar
Throckmorton
Registered User
Posts: 21
Joined: Tue Aug 16, 2005 9:23 pm
Location: Naperville, IL

Re: 02: Order! Order!

Post by Throckmorton »

Never mind...

(Trying to delete this message gave me an error.)
This space for rent.
User avatar
Nux
Registered User
Posts: 943
Joined: Tue Jun 14, 2005 5:09 pm
Location: 3cities, Poland
Contact:

Re: 02: Order! Order!

Post by Nux »

I would say you ought to have a different FIND for the IN-LINE

Code: Select all

#
#-----[ FIND ]-----------------------------------------------------------------
#
else if ( $mode == 'smilies' )
{
#
#-----[ AFTER, ADD ]---------------------------------------------------------
#
   //START MOD Smiley_management
   $page_id = ( !empty($HTTP_GET_VARS['page']) ) ? intval($HTTP_GET_VARS['page']) &#58 0;
#
#-----[ FIND ]-----------------------------------------------------------------
#
   generate_smilies('window', PAGE_POSTING);
#
#-----[ INLINE FIND ]---------------------------------------------------------
#
PAGE_POSTING
#
#-----[ INLINE AFTER, ADD ]---------------------------------------------------------
#
, $page_id
#
#-----[ AFTER, ADD ]---------------------------------------------------------
#
   //END MOD Smiley_management
Though I don't know if the first find here is uniqe.
Locked