[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta
Subject:    Re: [Quanta] HTML blocks or include files
From:       Sasha Andric <sasha () goldnet ! ca>
Date:       2005-06-27 13:32:55
Message-ID: 200506271032.56087.sasha () goldnet ! ca
[Download RAW message or body]

On June 27, 2005 10:13 am, Tim Michelsen wrote:
> Sorry, for beeing misunderstood but I am just looking for a advanced
> find&replace option that replaces certain patterns in all my project
> html files instead of manually do it. After that I would upload them to
> the webspace and have them there as static web pages.
> I  may sound oldfashioned but unfortionately it is needed in some cases
> (low budget, security/accress rights restictions).


You can define actions that occur when file is saved. 

So lets say you keep your block in block_navigation.html file, you could have 
an action that executes when file is saved and 

1. checks if the file name is block_SOMETHING.html 

and if so

2.  searches all .html files for something like:
<!-- BLOCK START SOMETHING -->
block content is here
<!-- BLOCK END SOMETHING -->

and if it finds it

3. replaces found "block content" with the content from the "block_" file you 
just saved.

4. pops up message dock saying how many replacements happened and where

You could script this action in php, perl, bash or some other language you 
like.

I just recently realized the power of Quanta's scripted actions and use them 
now to encode my php files , report php errors and do some other stuff.


_______________________________________________
Quanta mailing list
Quanta@mail.kde.org
https://mail.kde.org/mailman/listinfo/quanta

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic