LassoStartup not executing?

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

Re: how to get the full host name

Jolle Carlestam-2
13 apr 2008 kl. 09.47 skrev Wade Maxfield:
> I set it to On, on my setup so that I can have a site answer to  
> multiple domain names, without having to add each name to the Lasso  
> Sites setup.

Without knowing about issues with UseCanoncalName I I think I have a  
solution thats to my liking anyhow. On sites where I have several  
aliases but only want one instance to be used by Lasso I use  
modrewrite rules to change the URL.

Say I have domain.tld as the actual domain and the one I want Lasso to  
react on. But I have www.domain.tld as a serverAlias.
I then use modRewrite to change www.domain.tld to domain.tld before  
it's sent on to Lasso.

Here's a real life example:
         <IfModule mod_rewrite.c>
                 RewriteEngine On
                 RewriteCond %{REQUEST_METHOD} ^TRACE
                 RewriteRule .* - [F]
                 RewriteCond %{HTTP_HOST}   !^bubblegunclub\.se [NC]
                 RewriteCond %{HTTP_HOST}   !^bubblegumclub\.se [NC]
                 RewriteCond %{HTTP_HOST}   bubblegumclub\.se [NC]
                 RewriteCond %{HTTP_HOST}   !^$
                 RewriteRule ^/(.*)         http://bubblegunclub.se/$1 
[L,R]

         </IfModule>

HDB
Jolle

--
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: how to get the full host name

dguardiola
>
Extra big thanks to all of you, Jolle and Wade
Wade understood what I needed (bubblegums.whatever.com) and finally  
answered to "where does server_name comes from",

All I need is on the apache/mod_Rewrite side now, and you gave me two  
ways of doing it :
- turn UseCanonical off so that server_name really reflects what the  
full request is (and that will work with my local hosts file and  
"dev.example.com" domains)

- or use jolle example to deal with this %{HTTP_HOST} thing and pass  
the right subhost to Lasso as a var...

I'm on my way now :-)
(and next book I buy is about apache....)



> Here's a real life example:
>         <IfModule mod_rewrite.c>
>                 RewriteEngine On
>                 RewriteCond %{REQUEST_METHOD} ^TRACE
>                 RewriteRule .* - [F]
>                 RewriteCond %{HTTP_HOST}   !^bubblegunclub\.se [NC]
>                 RewriteCond %{HTTP_HOST}   !^bubblegumclub\.se [NC]
>                 RewriteCond %{HTTP_HOST}   bubblegumclub\.se [NC]
>                 RewriteCond %{HTTP_HOST}   !^$
>                 RewriteRule ^/(.*)         http://bubblegunclub.se/ 
> $1 [L,R]
>
>         </IfModule>
>

--
Dominique Guardiola, QUINODE
http://www.quinode.fr/





--
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: how to get the full host name

Bil Corry-3
In reply to this post by Wade Maxfield
Wade Maxfield wrote on 4/13/2008 2:47 AM:
> So if UseCanonicalName is off, then when a client hits the site using
> domain.com, Apache passes the server name to Lasso as domain.com and if
> they hit www.domain.com Lasso sees www.domain.com
>
> And if UseCanoncalName is on, then no matter which name the client hits
> the site with, the server name passed to lasso will always be domain.com

To make it consistent regardless of the server settings, [lp_page_path] does what Trevor does, which is pulls the Host header from the client request, and falls back to [server_name] when the Host header is absent.

Since the Host header can be spoofed by the client, its good practice to check that the value is actually valid for each page request.  And this is true whether UseCanonicalName is on or off.


> I set it to On, on my setup so that I can have a site answer to multiple
> domain names, without having to add each name to the Lasso Sites setup.

This brings up another good practice, which is to have the default Lasso site 1 (the catch-all site) simply point to a "If you're reading this, you've gotten lost" error message page.  This will prevent someone from creating a DNS entry for a domain they control, but then point it to your site.  It also is an excellent way to debug when your site settings are incorrect (you think you're going to site 2 when really you're going to site 1).

(BTW Wade, excellent post).


- Bil


--
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: Checkerboard layout for records?

Bil Corry-3
In reply to this post by Ken Wallace-2
Ken Wallace wrote on 4/11/2008 11:49 AM:
>  From a database referencing photo thumbnails, we'd like a checkerboard
> 5 across and however many rows of photos down.

Here's the easiest way, no math involved:

[

        // simulate a [records_array] from an [inline]
        var('records_array') = array;
        loop(46);
                $records_array->insert(array(loop_count,'Record ' + loop_count));
        /loop;

       
        // split records_array into columns, and even out the columns
        var('checkerboard') = lp_array_columns($records_array,-maxcols=5,-horizontal);

        // setup alternating colors
        var('alternate') = lp_array_roundRobin('red','blue');

        // output it
        '<table>';
        iterate($checkerboard,var('row'));
                '<tr>';
                iterate($row,var('record'));
                        '<td style="color: white; background: '+$alternate+'">';
                        if($record === null); // run out of records?
                                '&nbsp;';
                        else;
                                $record->get(2);
                        /if;
                        '</td>';
                /iterate;
                '</tr>';
        /iterate;
        '</table>';

]


Grab the lp ctags from here:

        <http://tagSwap.net/lp__library>


- Bil


--
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
|

Custom tag and array

Daniel Roth-7
In reply to this post by dguardiola
Hi folks, i'm bit of a rookie altogether... any help or pointing to  
the right direction would be great...

<?LassoScript
Var('myIterator' = Iterator($index_page));
While($myIterator->atEnd == False);
'<p>' + ($myIterator->Value)->(Split:',') + '</p>';
Null: $myIterator->Forward;
/While;
?>

gives me:

array: (340), (341), (342), (343), (344), (345), (346), (347), (348),  
(349)
array: (352), (354), (355)
array: (155), (221), (226), (227)

what i'm attempting to do is get a custom tag going so i can output  
those numbers as hrefs... I'd love to get the tag to work right in the  
iterator somehow

but i can't seem to get it to work separately...

[Define_Tag: 'MyLink', -Required='PAGE']
[Local: 'Output' = '<a href="' + 'index.lasso?page=' #PAGE + '">' +  
#PAGE + '</a>']
[Return: 'Output']
[/Define_Tag]

[$index_page->(ForEach: \MyLink)]

i'm sure i'm missin' something, maybe 5 things. any help would be  
greatly appreciated.

-Dan Roth

--
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: Custom tag and array

Wade Maxfield
Daniel Roth wrote:

> Hi folks, i'm bit of a rookie altogether... any help or pointing to the
> right direction would be great...
>
> <?LassoScript
> Var('myIterator' = Iterator($index_page));
> While($myIterator->atEnd == False);
> '<p>' + ($myIterator->Value)->(Split:',') + '</p>';
> Null: $myIterator->Forward;
> /While;
> ?>
>
> gives me:
>
> array: (340), (341), (342), (343), (344), (345), (346), (347), (348), (349)
> array: (352), (354), (355)
> array: (155), (221), (226), (227)
>
> what i'm attempting to do is get a custom tag going so i can output
> those numbers as hrefs... I'd love to get the tag to work right in the
> iterator somehow
>
> but i can't seem to get it to work separately...
>
> [Define_Tag: 'MyLink', -Required='PAGE']
> [Local: 'Output' = '<a href="' + 'index.lasso?page=' #PAGE + '">' +
> #PAGE + '</a>']
> [Return: 'Output']
> [/Define_Tag]
>
> [$index_page->(ForEach: \MyLink)]
>
> i'm sure i'm missin' something, maybe 5 things. any help would be
> greatly appreciated.
>
> -Dan Roth
>

There's one obvious mistake above:

Return: 'Output'  really should be  Return: #Output  (you want to return
the Local variable called Output, not the string 'Output')

<?LassoScript

Define_Tag: 'MyLink', -Required='PAGE';

   Local: 'Output' = '<a href="index.lasso?page='+#PAGE+'">'+#PAGE+'</a>';
   Return: #Output;

/Define_Tag;

?>

Using LassoScript rather than [Square Brackets] can make things a little
easier to read for things like custom tags or any other Lasso heavy code
(rather than HTML heavy)

Also can you step back a bit and show us what the starting data is?
What's an example of the value(s) for $index_page?

And what exactly should be spat out the other side?

If you're starting with a string that is a list of page numbers
separated with a comma, then the easist way would be to just split the
string, then iterate through the resulting array


Variable: 'indexList'=$index_page->(Split: ',');
Iterate: $indexList, (Local: 'thePage');
     '<a href="index.lasso?page=' + #thePage + '">' + #thePage + '</a>';
/Iterate;


Or something like that.

  - Wade

--
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: Custom tag and array

Bil Corry-3
Wade Maxfield wrote on 4/16/2008 4:26 PM:
> Define_Tag: 'MyLink', -Required='PAGE';

Probably want -encodenone in there to make the tag easier to use:

        Define_Tag: 'MyLink', -Required='PAGE', -encodenone;


- Bil


--
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: Custom tag and array

Daniel Roth-7
In reply to this post by Wade Maxfield
Hi wade and thanks for help... to back it up:

it's a field filled with string data separated by ','.

searching and putting into 2 arrays and attempting to get at them  
(well one of them for now)

<?LassoScript
Inline: -FindAll,
-Database='cont_pages',
-Table='INDEX',
-ReturnField='pages', 'subject',
-KeyField='id',
-MaxRecords=3;

records;
$index_sub->(Insert:  (Field:'subject'));
$index_page->(Insert: (Field:'pages'));
/records;
/Inline;
?>

[$pages] returns data like:
array: (340), (341), (342), (343), (344), (345), (346), (347), (348),  
(349)
array: (352), (354), (355)
array: (155), (221), (226), (227)


i tried what you said or at least what i think you meant below... and  
it worked but i need the groups of data in the field to stay together  
like above, this gave ungrouped output.

<?LassoScript
Inline: -FindAll,
-Database='cont_pages',
-Table='INDEX',
-ReturnField='pages', 'subject',
-KeyField='id',
-MaxRecords=15;

records;

Variable: 'indexList'=(Field:'pages')->(Split: ',');
Iterate: $indexList, (Local: 'thePage');
    '<p>''<a href="index.lasso?page=' + #thePage + '">' + #thePage +  
'</a></p>';
/Iterate;

/records;
/Inline;
?>



On Apr 16, 2008, at 5:26 PM, Wade Maxfield wrote:

> Daniel Roth wrote:
>> Hi folks, i'm bit of a rookie altogether... any help or pointing to  
>> the right direction would be great...
>> <?LassoScript
>> Var('myIterator' = Iterator($index_page));
>> While($myIterator->atEnd == False);
>> '<p>' + ($myIterator->Value)->(Split:',') + '</p>';
>> Null: $myIterator->Forward;
>> /While;
>> ?>
>> gives me:
>> array: (340), (341), (342), (343), (344), (345), (346), (347),  
>> (348), (349)
>> array: (352), (354), (355)
>> array: (155), (221), (226), (227)
>> what i'm attempting to do is get a custom tag going so i can output  
>> those numbers as hrefs... I'd love to get the tag to work right in  
>> the iterator somehow
>> but i can't seem to get it to work separately...
>> [Define_Tag: 'MyLink', -Required='PAGE']
>> [Local: 'Output' = '<a href="' + 'index.lasso?page=' #PAGE + '">' +  
>> #PAGE + '</a>']
>> [Return: 'Output']
>> [/Define_Tag]
>> [$index_page->(ForEach: \MyLink)]
>> i'm sure i'm missin' something, maybe 5 things. any help would be  
>> greatly appreciated.
>> -Dan Roth
>
> There's one obvious mistake above:
>
> Return: 'Output'  really should be  Return: #Output  (you want to  
> return the Local variable called Output, not the string 'Output')
>
> <?LassoScript
>
> Define_Tag: 'MyLink', -Required='PAGE';
>
>  Local: 'Output' = '<a href="index.lasso?page='+#PAGE+'">'+#PAGE+'</
> a>';
>  Return: #Output;
>
> /Define_Tag;
>
> ?>
>
> Using LassoScript rather than [Square Brackets] can make things a  
> little easier to read for things like custom tags or any other Lasso  
> heavy code (rather than HTML heavy)
>
> Also can you step back a bit and show us what the starting data is?  
> What's an example of the value(s) for $index_page?
>
> And what exactly should be spat out the other side?
>
> If you're starting with a string that is a list of page numbers  
> separated with a comma, then the easist way would be to just split  
> the string, then iterate through the resulting array
>
>
> Variable: 'indexList'=$index_page->(Split: ',');
> Iterate: $indexList, (Local: 'thePage');
>    '<a href="index.lasso?page=' + #thePage + '">' + #thePage + '</a>';
> /Iterate;
>
>
> Or something like that.
>
> - Wade
>
> --
> 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/

Reply | Threaded
Open this post in threaded view
|

Re: Custom tag and array

jasonhuck
If I follow what you're saying, I think you just need to adjust the
markup a little bit:

records;
    // start your paragraph here, one for each record
    '<p>';

    // build the row of links
    var('indexList') = field('pages')->split(',');

    iterate($indexList, local('thePage'));
         '<a href="index.lasso?page=' + #thePage + '">' + #thePage + '</a>';
    /iterate;

    // close the paragraph
    '</p>';
/records;


- jason




On Wed, Apr 16, 2008 at 6:35 PM, Daniel Roth <[hidden email]> wrote:

> Hi wade and thanks for help... to back it up:
>
>  it's a field filled with string data separated by ','.
>
>  searching and putting into 2 arrays and attempting to get at them (well one
> of them for now)
>
>  <?LassoScript
>  Inline: -FindAll,
>  -Database='cont_pages',
>  -Table='INDEX',
>  -ReturnField='pages', 'subject',
>  -KeyField='id',
>  -MaxRecords=3;
>
>  records;
>  $index_sub->(Insert:  (Field:'subject'));
>  $index_page->(Insert: (Field:'pages'));
>  /records;
>  /Inline;
>  ?>
>
>  [$pages] returns data like:
>
>  array: (340), (341), (342), (343), (344), (345), (346), (347), (348), (349)
>  array: (352), (354), (355)
>  array: (155), (221), (226), (227)
>
>
>  i tried what you said or at least what i think you meant below... and it
> worked but i need the groups of data in the field to stay together like
> above, this gave ungrouped output.
>
>  <?LassoScript
>  Inline: -FindAll,
>  -Database='cont_pages',
>  -Table='INDEX',
>  -ReturnField='pages', 'subject',
>  -KeyField='id',
>  -MaxRecords=15;
>
>  records;
>
>  Variable: 'indexList'=(Field:'pages')->(Split: ',');
>  Iterate: $indexList, (Local: 'thePage');
>    '<p>''<a href="index.lasso?page=' + #thePage + '">' + #thePage +
> '</a></p>';
>  /Iterate;
>
>  /records;
>  /Inline;
>  ?>
>
>
>
>
>
>  On Apr 16, 2008, at 5:26 PM, Wade Maxfield wrote:
>
>
> > Daniel Roth wrote:
> >
> > > Hi folks, i'm bit of a rookie altogether... any help or pointing to the
> right direction would be great...
> > > <?LassoScript
> > > Var('myIterator' = Iterator($index_page));
> > > While($myIterator->atEnd == False);
> > > '<p>' + ($myIterator->Value)->(Split:',') + '</p>';
> > > Null: $myIterator->Forward;
> > > /While;
> > > ?>
> > > gives me:
> > > array: (340), (341), (342), (343), (344), (345), (346), (347), (348),
> (349)
> > > array: (352), (354), (355)
> > > array: (155), (221), (226), (227)
> > > what i'm attempting to do is get a custom tag going so i can output
> those numbers as hrefs... I'd love to get the tag to work right in the
> iterator somehow
> > > but i can't seem to get it to work separately...
> > > [Define_Tag: 'MyLink', -Required='PAGE']
> > > [Local: 'Output' = '<a href="' + 'index.lasso?page=' #PAGE + '">' +
> #PAGE + '</a>']
> > > [Return: 'Output']
> > > [/Define_Tag]
> > > [$index_page->(ForEach: \MyLink)]
> > > i'm sure i'm missin' something, maybe 5 things. any help would be
> greatly appreciated.
> > > -Dan Roth
> > >
> >
> > There's one obvious mistake above:
> >
> > Return: 'Output'  really should be  Return: #Output  (you want to return
> the Local variable called Output, not the string 'Output')
> >
> > <?LassoScript
> >
> > Define_Tag: 'MyLink', -Required='PAGE';
> >
> >  Local: 'Output' = '<a href="index.lasso?page='+#PAGE+'">'+#PAGE+'</a>';
> >  Return: #Output;
> >
> > /Define_Tag;
> >
> > ?>
> >
> > Using LassoScript rather than [Square Brackets] can make things a little
> easier to read for things like custom tags or any other Lasso heavy code
> (rather than HTML heavy)
> >
> > Also can you step back a bit and show us what the starting data is? What's
> an example of the value(s) for $index_page?
> >
> > And what exactly should be spat out the other side?
> >
> > If you're starting with a string that is a list of page numbers separated
> with a comma, then the easist way would be to just split the string, then
> iterate through the resulting array
> >
> >
> > Variable: 'indexList'=$index_page->(Split: ',');
> > Iterate: $indexList, (Local: 'thePage');
> >   '<a href="index.lasso?page=' + #thePage + '">' + #thePage + '</a>';
> > /Iterate;
> >
> >
> > Or something like that.
> >
> > - Wade
> >
> > --
> > 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/
>
>



--
tagSwap.net :: Open Source Lasso Code
<http://tagSwap.net/>

--
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: Custom tag and array

Wade Maxfield
In reply to this post by Daniel Roth-7
Daniel Roth wrote:

> Hi wade and thanks for help... to back it up:
>
> it's a field filled with string data separated by ','.
>
> searching and putting into 2 arrays and attempting to get at them (well
> one of them for now)
>
> <?LassoScript
> Inline: -FindAll,
> -Database='cont_pages',
> -Table='INDEX',
> -ReturnField='pages', 'subject',
> -KeyField='id',
> -MaxRecords=3;
>
> records;
> $index_sub->(Insert:  (Field:'subject'));
> $index_page->(Insert: (Field:'pages'));
> /records;
> /Inline;
> ?>
>
> [$pages] returns data like:
> array: (340), (341), (342), (343), (344), (345), (346), (347), (348), (349)
> array: (352), (354), (355)
> array: (155), (221), (226), (227)
>

So where did $pages come from?


If I understand you correctly, you want something like the following to
appear on the page

Subject1: 1 2 7 12
Subject2: 4 6 32

where each number is a link to the page with that number.
I don't know if you are separating your logic from your display code,
but I'm going to make an assumption that you are.

<?LassoScript

Variable: 'subjectIndex'=Array;

Inline: -FindAll,
-Database='cont_pages',
-Table='INDEX',
-ReturnField='pages', 'subject',
-KeyField='id',
-MaxRecords=3;

records;

   Variable: 'indexList'=(Field:'pages')->(Split: ',');
   $subjectIndex->(Insert: (Pair: (Field: 'subject')=$indexList));

/records;

/Inline;
?>

Then elsewhere on the page, where you want to show the index list:

[Iterate: $subjectIndex, (Local: 'theSubject')]
<p>
[$theSubject->(First)]:
[Iterate: $theSubject->(Second), (Local: 'thePage')]<a
href="index.lasso?page=[#thePage]">[#thePage]</a> [/Iterate]
</p>
[/Iterate]

or

<?LassoScript

Iterate: $subjectIndex, (Local: 'theSubject');
   '<p>';
   $theSubject->(First) + ': ';
   Iterate: $theSubject->(Second), (Local: 'thePage');
     '<a href="index.lasso?page=' + #thePage + '">' + #thePage + '</a> ';
   /Iterate;
   '</p>/r';
/Iterate;

?>


All code is untested, so you may need to fix any typos, or syntax
errors.  8)

  - Wade

--
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: Custom tag and array

Daniel Roth-7
exactly what i meant and I could barely describe it t'boot. Thanks  
again for the help and advice, cheers!


On Apr 16, 2008, at 7:24 PM, Wade Maxfield wrote:

> Daniel Roth wrote:
>> Hi wade and thanks for help... to back it up:
>> it's a field filled with string data separated by ','.
>> searching and putting into 2 arrays and attempting to get at them  
>> (well one of them for now)
>> <?LassoScript
>> Inline: -FindAll,
>> -Database='cont_pages',
>> -Table='INDEX',
>> -ReturnField='pages', 'subject',
>> -KeyField='id',
>> -MaxRecords=3;
>> records;
>> $index_sub->(Insert:  (Field:'subject'));
>> $index_page->(Insert: (Field:'pages'));
>> /records;
>> /Inline;
>> ?>
>> [$pages] returns data like:
>> array: (340), (341), (342), (343), (344), (345), (346), (347),  
>> (348), (349)
>> array: (352), (354), (355)
>> array: (155), (221), (226), (227)
>
> So where did $pages come from?
>
>
> If I understand you correctly, you want something like the following  
> to appear on the page
>
> Subject1: 1 2 7 12
> Subject2: 4 6 32
>
> where each number is a link to the page with that number.
> I don't know if you are separating your logic from your display  
> code, but I'm going to make an assumption that you are.
>
> <?LassoScript
>
> Variable: 'subjectIndex'=Array;
>
> Inline: -FindAll,
> -Database='cont_pages',
> -Table='INDEX',
> -ReturnField='pages', 'subject',
> -KeyField='id',
> -MaxRecords=3;
>
> records;
>
>  Variable: 'indexList'=(Field:'pages')->(Split: ',');
>  $subjectIndex->(Insert: (Pair: (Field: 'subject')=$indexList));
>
> /records;
>
> /Inline;
> ?>
>
> Then elsewhere on the page, where you want to show the index list:
>
> [Iterate: $subjectIndex, (Local: 'theSubject')]
> <p>
> [$theSubject->(First)]:
> [Iterate: $theSubject->(Second), (Local: 'thePage')]<a  
> href="index.lasso?page=[#thePage]">[#thePage]</a> [/Iterate]
> </p>
> [/Iterate]
>
> or
>
> <?LassoScript
>
> Iterate: $subjectIndex, (Local: 'theSubject');
>  '<p>';
>  $theSubject->(First) + ': ';
>  Iterate: $theSubject->(Second), (Local: 'thePage');
>    '<a href="index.lasso?page=' + #thePage + '">' + #thePage + '</a>  
> ';
>  /Iterate;
>  '</p>/r';
> /Iterate;
>
> ?>
>
>
> All code is untested, so you may need to fix any typos, or syntax  
> errors.  8)
>
> - Wade
>
> --
> 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/

Reply | Threaded
Open this post in threaded view
|

[server_time] problem with 24-hour time

Stephen Smiroldo-2
In reply to this post by Jim de Zwart
I'm using the below code:

var: 'date' = ((server_date:-Extended) + ' ' + (server_time:-Extended));
var: 'date' = (Date_Format: $enterDate, -Format='%Q %T');

I have test setting the server time to both 12-hour and 24-hour but when
outputting variable 'date' I'm getting 12-hour in Lasso every time.

What should I be doing different?

Lasso 8.5
Windows 2003 server




--
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: [server_time] problem with 24-hour time

Bil Corry-3
Stephen Smiroldo wrote on 4/29/2008 3:55 PM:
> I'm using the below code:
>
> var: 'date' = ((server_date:-Extended) + ' ' + (server_time:-Extended));
> var: 'date' = (Date_Format: $enterDate, -Format='%Q %T');
>
> I have test setting the server time to both 12-hour and 24-hour but when
> outputting variable 'date' I'm getting 12-hour in Lasso every time.
>
> What should I be doing different?

You are setting the variable $date twice above, so the first one is overwritten by the second one.  Not sure if you meant to do that, but you can remove the first one since it's currently extraneous.

If you want to display the current date and time in 24hr format, you can do this:

        date->format('%Q %T');  // 2008-04-29 18:06:25



- Bil



--
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: [server_time] problem with 24-hour time

Stephen Smiroldo-2

Wow that was easy! The Lasso date tags sure have simplified over the years.
For some reason, regarding dates, my mind is somewhat planted in the Lasso
3/5 days when date manipulation was a complex beast. I access Lasso
Reference on a regular basis but have continued to over complicate the date
tags.

Do you know if this tag getting the server's or client's date/time?

Thanks,
Stephen Smiroldo
HSMM



> Stephen Smiroldo wrote on 4/29/2008 3:55 PM:
>> I'm using the below code:
>>
>> var: 'date' = ((server_date:-Extended) + ' ' + (server_time:-Extended));
>> var: 'date' = (Date_Format: $enterDate, -Format='%Q %T');
>>
>> I have test setting the server time to both 12-hour and 24-hour but when
>> outputting variable 'date' I'm getting 12-hour in Lasso every time.
>>
>> What should I be doing different?
>
> You are setting the variable $date twice above, so the first one is
> overwritten by the second one.  Not sure if you meant to do that, but you can
> remove the first one since it's currently extraneous.
>
> If you want to display the current date and time in 24hr format, you can do
> this:
>
> date->format('%Q %T');  // 2008-04-29 18:06:25
>
>
>
> - Bil
>
>



--
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: [server_time] problem with 24-hour time

Bil Corry-3
Stephen Smiroldo wrote on 4/30/2008 7:41 AM:
> Do you know if this tag getting the server's or client's date/time?

[date] returns the server's datetime.


- Bil


--
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/

123