Want to share what MODs you've gotten to work with EM? Happy about all the time your're saving? Want to say "thanks"? Here's the place.
Forum rules DO NOT give out any FTP passwords to anyone! There is no reason to do so! If you need help badly enough, create a temporary FTP account that is restricted to only the files that you need help with and give the information for that. Giving out FTP information can be very dangerous!
######################################
# This is just a test, please don't use it on your forum ;-)
######################################
#
#--[IN-LINE FIND]--
#
blah
#
#--[ IN-LINE AFTER, ADD ]---
#
blah1 somestuff
<!-- BEGIN somestuff -->
morestuff
<!-- END somestuff -->
blah someotherstuffalso
#
#-- [EOM]--
#
if so, then i can replace my ugliest template FIND/REPLACE with some IN-LINE functionality...
I'll explain a bit more. phpbb.com's support forum is slow ATM.
So basicaly that would be just vanilla FIND and AFTER, ADD. The idea or IN-LINE is to find something on a line, and within that line, add something new. This is useful for SQL queries and HTML attributes. Most code does not require this kind of placement, though. Thus, adding multiple lines with an inline add is illogicall.
A_Jelly_Doughnut wrote:Thus, adding multiple lines with an inline add is illogicall.
Not really. What if you have to add multiple lines in the middle of a line? Xore's example is perfect. The way phpBB templates are written, there are things like </td> on the same line as the text that it contains. If you need to add multiple lines before the </td>, it's pretty much impossible without doing a replace.
ok, i guess the balance is, which is worse? my suggestion, or doing a FIND, REPLACE on the entire line
it's been said several times that my FIND, REPLACE in a certain instance is rather... brutal... this was just an alternative possibility... it would be nice if the <!-- BEGIN --> and <!-- END --> tags could be on a line with other things...
i've even looked seriously into editing template.php to be able to add an assign_block_var_from_handle just to avoid this.
(btw, i'm wounded by the fact that the block_vars functionality is so grieviously crippled by not being able to make multiple calls to it surpressing new iterations, as well as the aforementioned lack of assigning from handle... ) .. i haven't had the opportunity to check does anyone know (offhand) if this functionality will be included in phpbb22 ?
All I can say is that I do plan to address this issue and I hope to do this soon. However I would like to address it on my own time table b/c the issue does intersect with a few others. Right now I'm liking the idea of just inserting a line break using an IN-LINE command and then using a straight AFTER, ADD to do whatever else you need. I don't like the idea of breaking convention that IN-LINE is for single line manipulation.
But I'm open to alterante thinking b/c I've had to deal too many times with people that aren't. I should have this issues addressed within the week. I'm hoping to have all EMC done this week, but these things have a habit of taking 10 times longer than you expect