[SPLIT]Delete/Replace argument

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.
User avatar
Nuttzy99
Former Team Member
Posts: 4917
Joined: Fri Aug 03, 2001 7:09 am
Location: the 11th dimension
Contact:

Post by Nuttzy99 » Fri Aug 08, 2003 11:38 pm

Ok Gang, Xore has given us this little gem in the Cash MOD...

Code: Select all

# 
#-----[ FIND ]------------------------------------------ 
# 
		<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span><br /></td>

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 
		<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}
		<!-- BEGIN cashrow -->
		<br />{postrow.cashrow.CASH_NAME}: {postrow.cashrow.CASH_AMOUNT}
		<!-- END cashrow -->
		</span><br /></td>
...first of all I HATE the FIND command he has here. However he usually does try to avoid FINDing multiple lines word for word. But the reason he choose to do this is that he needs to breakup the line before the </span> so he can insert the <!-- BEGIN cashrow --> block. So he was kind of trapped.

So in this case we may want to be able to do an IN-LINE FIND and drop a carriage return before </span>. BTW, EM does not currently do this. So we may want to add carriage returns by saying this...

Code: Select all

# 
#-----[ IN-LINE REPLACE WITH (or after or before) ]---------------------- 
# 

...with nothing present represents a carriage return. This would then support those that are looking for the DELETE commands to be implemented. I'm not sure. What do people think? Keep in mind that nothing 100% solid will be decided at this time. But it would be nice to get a consensus ;)

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

AbelaJohnB
Former Team Member
Posts: 5674
Joined: Fri Jul 06, 2001 11:56 pm

Post by AbelaJohnB » Fri Aug 08, 2003 11:58 pm

Ah Nuttzy chimed in above, I have placed a Freeze on all changes, additions, and removals of anything related to the MOD Template (including Actions) for the next 45 days.

I simply want to clairify this point. Please do not exact any methods that come up within this thread to be taken as official Actions, nor as to any method we will implament.

Thank You.

User avatar
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore » Sat Aug 09, 2003 12:03 am

Nuttzy99 wrote: ...first of all I HATE the FIND command he has here. However he usually does try to avoid FINDing multiple lines word for word. But the reason he choose to do this is that he needs to breakup the line before the </span> so he can insert the <!-- BEGIN cashrow --> block. So he was kind of trapped.


Yes, i thought it over just now... would something like this work?

Code: Select all

# 
#-----[ FIND ]------------------------------------------ 
# 
		<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span><br /></td>

# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# if you can't find this, look for {postrow.POSTER_POSTS}
# 
{postrow.POSTER_FROM}

# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
# 
<br />
		<!-- BEGIN cashrow -->
		<br />{postrow.cashrow.CASH_NAME}: {postrow.cashrow.CASH_AMOUNT}
		<!-- END cashrow -->
		<br />
... sort of an IN-LINE multilined insert?

i'm not really sure here, because this part of the template has a bad habit of getting modded heavily, and for most templates, this line won't even be found unless it's a barely-altered subSilver derivative...

thoughts?
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod

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

Post by Ptirhiik » Sat Aug 09, 2003 12:11 am

Not really convenient I think : you will probably get a better readability IMHO with :

Code: Select all

#---[ FIND ]-----------
partial foo
#---[ INLINE FIND ]----------
part foo before the carriage to return
#---[ AFTER, ADD ]----------
new foo (ie <!--- BEGIN --->)
as the add is not in line but on a new line (note this should works with easymod).

But anyway, dealing with templates is not really the point there : the lack of norms and the messy subSilver with is used as reference make this point quite unusefull and too heavy.

The first point IMHO in dealing with templates would be to replace subSilver with a clean one, with no qualification nor fancy carriage return or blank char where tabulations are awaited, neither style definition in tpls (including this *cough* simili css) or "forgetting" to declare css class or ignore them on the link or in the defs (hum...writers lazy no ?), and start from there as the standard of installation, with a really wc3 normed template. Then quite all templates would consist only in a new css and images pack, and will have only a few different files. And there you will be able to have some sense automated job on template. Till then, you just got what you deserve : a bad job because of a bad template, but halas given as reference.

PhilippT
Registered User
Posts: 419
Joined: Mon May 06, 2002 5:59 pm

Post by PhilippT » Wed Oct 29, 2003 8:01 pm

AbelaJohnB wrote: Ah Nuttzy chimed in above, I have placed a Freeze on all changes, additions, and removals of anything related to the MOD Template (including Actions) for the next 45 days.

anything new on this ???

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

Post by Nuttzy99 » Wed Oct 29, 2003 8:04 pm

Once the validation queue is caught up then this will be very high on the priority list.

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

PhilippT
Registered User
Posts: 419
Joined: Mon May 06, 2002 5:59 pm

Post by PhilippT » Wed Oct 29, 2003 8:07 pm

Im very happy to hear that to make a mod find & {delete} a part is very unusual atm

Post Reply

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

Who is online

Users browsing this forum: No registered users and 6 guests