Duplicate a site and replacing UserName

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Duplicate a site and replacing UserName

detlef.hebbel
Duplicate a site and replacing UserName

Scenario:

1. For user '12345' I have a site with about 20 lasso pages which is  
calling values from a database like that:

[Inline:
-Database='MyDatabase',
-Table='MyTable',
'UserName'='12345',
etc...
...pages will populate data from user '12345'.


2. Now I make a copy (on the server) of the site for a new user  
'ABCDE', and I would Lasso to replace all inlines to the new UserName:

[Inline:
-Database='MyDatabase',
-Table='MyTable',
'UserName'='ABDCE',
etc...

3. Question How can I tackle this problem? Replacing the search item  
in all inlines of all pages. This must work on Lasso server. (On my  
desktop machine I would do it with BBedit).
What would be the best way to make a copy of a complete site folder,  
where the 'UserName'='12345',  becomes 'UserName'='ABDCE'.

I have tried several ways without any success, like having the inline  
in an external file, etc

Are there any ideas available?

Any help would be appreciated.

Thanks

Detlef





--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Duplicate a site and replacing UserName

stevepiercy
Create a file that cannot be served directly (for security purposes) and which contains the necessary information to connect to a database:

    var('my_inline_params'  = array(
        'UserName'  = '12345',
        'thing1'    = 'oogah boogah',
        ...
        )
    );

    var('my_db_cnxn' = array(
        -database   = 'mydb',
        -table      = 'mytable',
        -username   = 'myuser',
        -password   = 'mypass'
        )
    );

In your inlines in your pages:

    inline(
        $my_db_cnxn,
        $my_inline_params,
        -search
    );

Now in that one file, you need to change the value for UserName and any other sitewide inline parameter only once.  mmm... sitewide variables are tasty.

--steve


On Thursday, December 27, 2007, [hidden email] (Detlef Hebbel) pronounced:

>Duplicate a site and replacing UserName
>
>Scenario:
>
>1. For user '12345' I have a site with about 20 lasso pages which is  
>calling values from a database like that:
>
>[Inline:
>-Database='MyDatabase',
>-Table='MyTable',
>'UserName'='12345',
>etc...
>....pages will populate data from user '12345'.
>
>
>2. Now I make a copy (on the server) of the site for a new user  
>'ABCDE', and I would Lasso to replace all inlines to the new UserName:
>
>[Inline:
>-Database='MyDatabase',
>-Table='MyTable',
>'UserName'='ABDCE',
>etc...
>
>3. Question How can I tackle this problem? Replacing the search item  
>in all inlines of all pages. This must work on Lasso server. (On my  
>desktop machine I would do it with BBedit).
>What would be the best way to make a copy of a complete site folder,  
>where the 'UserName'='12345',  becomes 'UserName'='ABDCE'.
>
>I have tried several ways without any success, like having the inline  
>in an external file, etc
>
>Are there any ideas available?
>
>Any help would be appreciated.
>
>Thanks
>
>Detlef
>
>
>
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Duplicate a site and replacing UserName

Mason Miller
In reply to this post by detlef.hebbel
How about an include that sets a variable called thisUsername with the  
username and then having the inline say something like -username=
$thisUsername.

Mason

On Dec 27, 2007, at 3:47 AM, Detlef Hebbel wrote:

> 2. Now I make a copy (on the server) of the site for a new user  
> 'ABCDE', and I would Lasso to replace all inlines to the new UserName:
>
> [Inline:
> -Database='MyDatabase',
> -Table='MyTable',
> 'UserName'='ABDCE',
> etc...
>
> 3. Question How can I tackle this problem? Replacing the search item  
> in all inlines of all pages. This must work on Lasso server. (On my  
> desktop machine I would do it with BBedit).
> What would be the best way to make a copy of a complete site folder,  
> where the 'UserName'='12345',  becomes 'UserName'='ABDCE'.
>
> I have tried several ways without any success, like having the  
> inline in an external file, etc
>
> Are there any ideas available?
>
> Any help would be appreciated.
>
> Thanks
>
> Detlef
>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Duplicate a site and replacing UserName

detlef.hebbel
In reply to this post by stevepiercy
Thanks for the 'sitewide variable' idea, I will go along this line and  
try several ways. Includes did not work yet.

Cheers

Detlef


On 28/12/2007, at 12:37 AM, Steve Piercy - Web Site Builder wrote:

> Create a file that cannot be served directly (for security purposes)  
> and which contains the necessary information to connect to a database:
>
>    var('my_inline_params'  = array(
>        'UserName'  = '12345',
>        'thing1'    = 'oogah boogah',
>        ...
>        )
>    );
>
>    var('my_db_cnxn' = array(
>        -database   = 'mydb',
>        -table      = 'mytable',
>        -username   = 'myuser',
>        -password   = 'mypass'
>        )
>    );
>
> In your inlines in your pages:
>
>    inline(
>        $my_db_cnxn,
>        $my_inline_params,
>        -search
>    );
>
> Now in that one file, you need to change the value for UserName and  
> any other sitewide inline parameter only once.  mmm... sitewide  
> variables are tasty.
>
> --steve
>
>
> On Thursday, December 27, 2007, [hidden email] (Detlef  
> Hebbel) pronounced:
>
>> Duplicate a site and replacing UserName
>>
>> Scenario:
>>
>> 1. For user '12345' I have a site with about 20 lasso pages which is
>> calling values from a database like that:
>>
>> [Inline:
>> -Database='MyDatabase',
>> -Table='MyTable',
>> 'UserName'='12345',
>> etc...
>> ....pages will populate data from user '12345'.
>>
>>
>> 2. Now I make a copy (on the server) of the site for a new user
>> 'ABCDE', and I would Lasso to replace all inlines to the new  
>> UserName:
>>
>> [Inline:
>> -Database='MyDatabase',
>> -Table='MyTable',
>> 'UserName'='ABDCE',
>> etc...
>>
>> 3. Question How can I tackle this problem? Replacing the search item
>> in all inlines of all pages. This must work on Lasso server. (On my
>> desktop machine I would do it with BBedit).
>> What would be the best way to make a copy of a complete site folder,
>> where the 'UserName'='12345',  becomes 'UserName'='ABDCE'.
>>
>> I have tried several ways without any success, like having the inline
>> in an external file, etc
>>
>> Are there any ideas available?
>>
>> Any help would be appreciated.
>>
>> Thanks
>>
>> Detlef
>>
>>
>>
>>
>>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy               Web Site Builder               Soquel, CA
> <[hidden email]>                  <http://www.StevePiercy.com/>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/