Problems with [IN-LINE FIND]
 
 
Post new topic   Reply to topic   printer-friendly view    phpMiX.org Forum Index -> phpBB MODs -> DHTML Collapsible Forum Index
View previous topic :: View next topic  
Author Message
NetKman
Apprentice
Apprentice


Joined: 22 Aug 2004
Posts: 7

PostPosted: Sun Aug 22, 2004 4:32 pm    Post subject: Problems with [IN-LINE FIND] Reply with quote

ummmm, i have a small prob here markus, your install instructions call for this in index_body.tpl:
#-----[ FIND ]------------------------------------------
#
<tr>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
tr
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
onclick="swIndexCats({catrow.CAT_ID}, false);" style="cursor:pointer;cursor:hand;"

There is not a tr anywhere in my file, other than <tr> and </tr>. Loads of td's, th's.

Heres another:
#-----[ FIND ]------------------------------------------
#
<tr>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
tr
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
id="forum_{catrow.CAT_ID}_{catrow.forumrow.FORUM_ID}"
#
# NOTE --- so the result should look something like this:
# <tr id="forum_{catrow.CAT_ID}_{catrow.forumrow.FORUM_ID}">
#
Same prob, any ideas?
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Sun Aug 22, 2004 4:56 pm    Post subject: Re: Problems with [IN-LINE FIND] Reply with quote

I'm afraid, best answer I can give you is this:

How to install a MOD:
http://www.phpbb.com/kb/article.php?article_id=150

Check out the explanation for the IN-LINE FIND action.

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
NetKman
Apprentice
Apprentice


Joined: 22 Aug 2004
Posts: 7

PostPosted: Sun Aug 22, 2004 5:12 pm    Post subject: Re: Problems with [IN-LINE FIND] Reply with quote

yea, i know that stuff, not my first mod...lol. Its just not there is all, guess i'm screwed.
Thanks bud.
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Sun Aug 22, 2004 5:21 pm    Post subject: Re: Problems with [IN-LINE FIND] Reply with quote

NetKman wrote:
There is not a tr anywhere in my file, other than <tr> and </tr>.

So, you have tr between < and >.

Let's see...

First FIND action points you to a line containing <tr>, right?

So, the next [IN-LINE FIND] refers to tr in that line.

Then, just skip to next [IN-LINE AFTER, ADD] action, which is telling you to insert the following text, just after tr in that line:
Code:
onclick="swIndexCats({catrow.CAT_ID}, false);" style="cursor:pointer;cursor:hand;"


So, you had:
Code:
  <tr>


And after those actions you get:
Code:
  <tr onclick="swIndexCats({catrow.CAT_ID}, false);" style="cursor:pointer;cursor:hand;">


Follow?

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
NetKman
Apprentice
Apprentice


Joined: 22 Aug 2004
Posts: 7

PostPosted: Sun Aug 22, 2004 5:31 pm    Post subject: Re: Problems with [IN-LINE FIND] Reply with quote

So, are you saying i should just add the

<tr onclick="swIndexCats({catrow.CAT_ID}, false);" style="cursor:pointer;cursor:hand;">

after the <tr>, even tho there is no {IN-LINE FIND] tr ?
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Sun Aug 22, 2004 5:39 pm    Post subject: Re: Problems with [IN-LINE FIND] Reply with quote

Nope, you should replace:
Code:
 <tr>

By:
Code:
 <tr onclick="swIndexCats({catrow.CAT_ID}, false);" style="cursor:pointer;cursor:hand;">


IN-LINE actions take place within the line pointed by previous FIND action.

The same could be written as:
Code:

#
#---[ FIND ]---------------
#
 <tr>
#
#---[ REPLACE WITH ]---------------
#
 <tr onclick="swIndexCats({catrow.CAT_ID}, false);" style="cursor:pointer;cursor:hand;">


However, I decided to write the MOD script to avoid any possible conflict with other MODs that might have changed significant pieces of the target file. So, my FIND actions search as unique as possible strings.

I hope this helps you understand how the IN-LINE actions work. Wink

BTW, EasyMOD works like a charm with this MOD.

Cheers

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
NetKman
Apprentice
Apprentice


Joined: 22 Aug 2004
Posts: 7

PostPosted: Sun Aug 22, 2004 6:18 pm    Post subject: Re: Problems with [IN-LINE FIND] Reply with quote

Gotcha m8. One last Q. There are 2 <tr>'s before the next change, which one do i make this change to, the first one? 
Back to top
View user's profile Send private message
NetKman
Apprentice
Apprentice


Joined: 22 Aug 2004
Posts: 7

PostPosted: Sun Aug 22, 2004 6:55 pm    Post subject: Re: Problems with [IN-LINE FIND] Reply with quote

Never mind last post, got it!!!

Expect something extra special in your christmas stocking this year. Wink
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Sun Aug 22, 2004 6:59 pm    Post subject: Re: Problems with [IN-LINE FIND] Reply with quote

ok, MOD scripts are processed top-down.

If you have latest version of this MOD, which is 1.0.3, it contains several comments for most of the actions, to help you apply the MOD manually, if you're not using EasyMOD.

For instance, this piece:
Quote:
#
#-----[ FIND ]------------------------------------------
#
# NOTE --- the whole line to look for should be similar to this:
# <td class="cat" colspan="2" height="28"><span class="cat"><a href="{catrow.U_VIEWCAT}" class="cat">{catrow.CAT_DESC}</a></span></td>
#
"{catrow.U_VIEWCAT}"
#
#-----[ IN-LINE FIND ]------------------------------------------
#
"{catrow.U_VIEWCAT}"
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
onclick="return swIndexCats({catrow.CAT_ID}, true);" onfocus="this.blur();"
#
# NOTE --- so the result should look something like this:
# <td class="cat" colspan="2" height="28"><span class="cat"><a href="{catrow.U_VIEWCAT}" onclick="return swIndexCats({catrow.CAT_ID}, true);" onfocus="this.blur();" class="cat">{catrow.CAT_DESC}</a></span></td>
#


First FIND action points you to the whole line. Next IN-LINE FIND action points you to that specific string within the previously found line.

Once done, just skip to the next action:
Code:
#
#-----[ FIND ]------------------------------------------
#
<tr>


The search for this FIND action starts just where you were when previous action finished. It is, the next TR tag on the table.

NOTE: While writing this and using preview I saw your previous post. However, I hit the Submit anyway. Just if that helps anyone else. Wink

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    phpMiX.org Forum Index -> phpBB MODs -> DHTML Collapsible Forum Index All times are GMT + 1 Hour
 
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum