Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Made all the taxonomy generate valid XHTML code.

  • Loading branch information...
commit 1d16fdb78aaf04e2f020ab994d27c41f21d627f6 1 parent 6f9f94e
Brian Loomis authored
14 app/controllers/application.inc
@@ -5,7 +5,7 @@ library:'/app/helpers/application_helper.inc';
5 5 library:'/config/valuelists.inc';
6 6 library:'/app/helpers/routes_helper.inc';
7 7 library:'/config/routes.inc';
8   -
  8 +library:'/app/helpers/components_helper.inc';
9 9
10 10 /*
11 11 iterate: $STK_tagList, local:'STK_temptagName';
@@ -17,9 +17,6 @@ if: !(#STK_temptagName >> 'timer');
17 17 // */
18 18
19 19 //protect;
20   -include('/app/views/top.inc');
21   -///protect;
22   -
23 20 if($STK_Taxonomy);
24 21 /****************************************************************************
25 22 Check the one that we have a taxonomy
@@ -27,7 +24,7 @@ if($STK_Taxonomy);
27 24 inline: $dbconn,
28 25 -table ='resources',
29 26 -op = 'eq',
30   - 'page_url' = $test ,
  27 + 'page_url' = $STK_resp ,
31 28 -maxrecords = 1,
32 29 -Search;
33 30
@@ -46,7 +43,7 @@ if($STK_Taxonomy);
46 43 //$inlpageshowingaction;
47 44 //library:'/components/inSite/categories.inc';
48 45 rows;
49   - encode_smart:(process(column('description')));
  46 + var('body'=(process(column('description'))));
50 47 if: error_currenterror != 'no error';
51 48 error_currenterror;
52 49 /if;
@@ -57,6 +54,11 @@ if($STK_Taxonomy);
57 54 This is the best.
58 55 *****************************************************************************/
59 56 //protect;
  57 +
  58 +include('/app/views/top.inc');
  59 +///protect;
  60 +
  61 +
60 62 include('/app/views/bottom.inc');
61 63 ///protect;
62 64
4 app/helpers/application_helper.inc
@@ -15,9 +15,7 @@
15 15 'STK_StrInclude' =String,
16 16 'STK_XTRA_Params' =Array,
17 17 'STK_ExtraSitePages' =(Array:'workshops', 'contact', 'services'),
18   - // 'STK_tagList' =File_ListDirectory: '/components/inSite/',
19   -// 'STK_tagListTestBase' ='/test/mocks/development/',
20   -// 'STK_tagListTest' =File_ListDirectory: $STK_tagListTestBase,
  18 +
21 19 );
22 20
23 21
3  app/views/bottom.inc
... ... @@ -1,2 +1 @@
1   -</div></body></html>
2   -[include:'/app/views/partials/debug.inc']
  1 +</body></html>
52 app/views/top.inc
... ... @@ -1,15 +1,11 @@
1   -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2   - "http://www.w3.org/TR/html4/strict.dtd">
3   -<html>
  1 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 3 <head>
5   - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6   - <meta http-equiv="PRAGMA" content="NO-CACHE">
7   - <title></title>
  4 + <title>Yes</title>
8 5 <script src="/public/javascripts/jquery-latest.pack.js" type="text/javascript" charset="utf-8"></script>
9 6 <script src="/public/javascripts/thickbox.js" type="text/javascript" charset="utf-8"></script>
10   - <script type="text/javascript">
11   - $(document).ready(function(){
12   -
  7 + <script type="text/javascript"><!--
  8 + $(document).ready(function(){
13 9 $("a.expose").click(function () {
14 10 $("p.hideme").slideToggle("slow");
15 11 });
@@ -17,17 +13,33 @@
17 13 $("p.hideme2").slideToggle("slow");
18 14 });
19 15 });
  16 + -->
20 17 </script>
21   - <link rel="stylesheet" type="text/css" href="/public/stylesheets/fonts.css">
22   - <link rel="stylesheet" type="text/css" href="/public/stylesheets/base.css">
23   - <link rel="stylesheet" type="text/css" href="/public/stylesheets/grids.css">
24   - <link rel="stylesheet" type="text/css" href="/public/stylesheets/design.css">
25   - <link rel="stylesheet" type="text/css" href="/public/stylesheets/thickbox.css">
26   -
27   -
28   -
29   -
  18 + <link rel="stylesheet" type="text/css" href="/public/stylesheets/reset.css" />
  19 + <link rel="stylesheet" type="text/css" href="/public/stylesheets/text.css" />
  20 + <link rel="stylesheet" type="text/css" href="/public/stylesheets/960.css" />
  21 + <link rel="stylesheet" type="text/css" href="/public/stylesheets/design.css" />
  22 + <link rel="stylesheet" type="text/css" href="/public/stylesheets/thickbox.css" />
30 23 </head>
31 24
32   -<body onLoad="initialize()">
33   -<div class="content">
  25 +<body>
  26 +
  27 +<div class="container_16">
  28 + <h2>
  29 + 16 Column Grid
  30 + </h2>
  31 + <div class="clear">&nbsp;</div>
  32 + <div class="grid_5">
  33 +[var('cattable_resources'='resources',);
  34 +encode_smart:(ul_taxonomy: -recurse=5, -css_id='calendar')]
  35 + </div>
  36 + <!-- end .grid_4 -->
  37 + <div class="grid_11">
  38 + [encode_smart:(var('body'))]
  39 + </div>
  40 + <div class="clear">&nbsp;</div>
  41 + <!-- end .grid_4 -->
  42 + <div class="grid_16">
  43 +[include:'/app/views/partials/debug.inc']
  44 + </div>
  45 +</div>
143 components/inSite/ul_taxonomy.inc
... ... @@ -0,0 +1,143 @@
  1 +[//lasso
  2 +/*----------------------------------------------------------------------------
  3 +
  4 +[ul_taxonomy]
  5 +Gives you unordered lists from taxonomies.
  6 +
  7 +Author: Brian Loomis
  8 +Last Modified: Jun. 28, 2008
  9 +License: Public Domain
  10 +
  11 +Description:
  12 +This tag is used to return an unordered list based off of the xs_cat tags so
  13 +that css flyout menus, or javascript jQuery madness can be applied for
  14 +ultimate styling and sliding pleasure. http://www.cssplay.co.uk/menus/ See
  15 +Stuart Nichols stuff. Once you get this tag implemented with xs_cat you will
  16 +see how easy it is to optimize dynamic css menus from your database content.
  17 +You can also modify the SQL generation easily enough to show only subnodes etc.
  18 +
  19 +
  20 +Sample Usage:
  21 +<?LassoScript
  22 +var('br'='<br />');
  23 +var('gv_error'='');
  24 +var('comp_sql'='');
  25 +!(lasso_tagexists: 'xs_cat') ?
  26 +library:'/components/inSite/category_ctags.inc';
  27 +var(
  28 + 'cattable_resources'='pages',
  29 +
  30 + );
  31 +
  32 +
  33 +
  34 +define_tag(
  35 + 'taxonomy',
  36 + -namespace='ul_',
  37 + -req='css_id', -type='string',
  38 + -req='recurse', -type='integer',
  39 + -priority='replace',
  40 + -description='Returns nested unordered lists of elements of a taxonomy within the given path.'
  41 +);
  42 +local('out')='';
  43 +var('SQL' = xs_cat->(fullCatSQL(-cattable= $cattable_resources ,-xtraReturn=', node.lft, node.rgt, node.description, node.metatags, node.metadescription, node.title_tag ',-xtraWhere='', -depth=#recurse)));
  44 +
  45 + inline(-username='xxx',-password='yyy', -database='zzz',,-SQL=$SQL, -maxrecords='500');
  46 + var('depth'= integer(column('depth')));
  47 + var('c_depth'= integer(column('depth')));
  48 + #out += '<ul id="' #css_id '">\n' ('\t' * ($depth ))
  49 + records;
  50 + var('c_depth'= integer(column('depth')));
  51 + if: integer(column('depth'))==$depth;;
  52 + #out += ('\t' * ($depth + 1)) '<li class="li_' $c_depth '">' column('title') '</li>\n';
  53 +
  54 + else: integer(column('depth'))>$depth;
  55 + #out += ('\t' * ($depth + 1)) '<ul>\n' ('\t' * ($depth + 2)) '<li class="li_' $c_depth '">' column('title') '</li>\n';
  56 +
  57 + else: integer(column('depth')) < $depth;
  58 + #out += ('\t' * ($depth )) ('</ul>\n' * ($depth )) '</ul>\n<ul>\n' ('\t' * ($depth )) '<li class="li_' $c_depth '">' column('title') '</li>\n';
  59 +
  60 + else;
  61 +
  62 + /if;
  63 + var('depth'= integer(column('depth')));
  64 + /records;
  65 + #out += '<ul>\n';
  66 + /inline;
  67 + return: #out;
  68 +
  69 +/define_tag;
  70 +
  71 +encode_smart:(ul_taxonomy: -recurse=2, -css_id='calendar');
  72 +
  73 +?>
  74 +
  75 +gets you:
  76 +
  77 +<ul id="calendar">
  78 + <li class="li_0">Databases</li>
  79 + <ul>
  80 + <li class="li_1">PostGreSQL</li>
  81 + <li class="li_1">MySQL</li>
  82 + <li class="li_1">FileMaker</li>
  83 + </ul>
  84 +
  85 +</ul>
  86 +
  87 +
  88 +Downloaded from tagSwap.net on Feb. 28, 2009.
  89 +Latest version available from <http://tagSwap.net/ul_taxonomy>.
  90 +
  91 +----------------------------------------------------------------------------*/
  92 +
  93 +
  94 +define_tag(
  95 + 'taxonomy',
  96 + -namespace='ul_',
  97 + -req='css_id', -type='string',
  98 + -req='recurse', -type='integer',
  99 + -priority='replace',
  100 + -description='Returns nested unordered lists of elements of a taxonomy within the given path.'
  101 +);
  102 +local('out')='';
  103 +var('SQL' = xs_cat->(fullCatSQL(-cattable= $cattable_resources ,-xtraReturn=', node.lft, node.rgt, node.description, node.metatags, node.metadescription, node.title_tag, node.page_url ',-xtraWhere='', -depth=#recurse)));
  104 +
  105 + inline($dbconn, -SQL=$SQL, -maxrecords='500'); var('this')=action_statement;
  106 + var('depth'= integer(column('depth')));
  107 +
  108 + var('c_depth'= integer(column('depth')));
  109 + #out += '<ul id="' #css_id '">\n' ('\t' * ($depth )) ;//'<li class="li_' $c_depth '">' column('title') '</li>\n';
  110 + records;
  111 + var('page_url'= (column('page_url'))->Lowercase &);
  112 + var('c_depth'= integer(column('depth')));
  113 + if: integer(column('depth'))==$depth;;
  114 + #out += ('\t' * ($depth + 1)) '<li class="li_' $c_depth '"><a href="' var('page_url') '" class="">' column('title') '</a></li>\n';
  115 +
  116 + else: integer(column('depth'))>$depth;
  117 + #out->(removetrailing('</li>\n'));
  118 + #out += '\r' ('\t' * ($depth + 2 )) '<ul>\n' ('\t' * ($depth + 2)) '<li class="li_' $c_depth '"><a href="' var('page_url') '" class="">' column('title') '</a></li>\n';
  119 +
  120 + else: integer(column('depth')) < $depth;
  121 + var('newdepth'= ($depth - integer(column('depth'))));
  122 + loop: -from=1, -to=($newdepth );
  123 + #out += ('\t' * ($depth + 1)) '</ul>\n' ('\t' * ($depth )) '</li>\n' ;
  124 + /loop;
  125 + #out +=('\t' * ($depth -1 )) '</ul>\n' ('\t' * ($depth - 1)) '<ul>\n' ('\t' * ($depth )) '<li class="li_' $c_depth '"><a href="' var('page_url') '" class="">' column('title') '</a></li>\n';;
  126 +
  127 + else;
  128 +
  129 + /if;
  130 + // var('newdepth'= ($depth - integer(column('depth'))));
  131 +
  132 + var('depth'= integer(column('depth')));
  133 + /records;
  134 + loop: -from=1, -to=($depth);
  135 + #out += ('\t' * ($depth + 1)) '</ul>\n' ('\t' * ($depth + 1)) '</li>\n' ;
  136 + /loop;
  137 + #out += '</ul>\n';
  138 + /inline;
  139 + //return: $this;
  140 + return: #out;
  141 +
  142 +/define_tag;
  143 +]
BIN  public/images/16_col.gif
1  public/stylesheets/960.css
... ... @@ -0,0 +1 @@
  1 +.container_12,.container_16{margin-left:auto;margin-right:auto;width:960px}.grid_1,.grid_2,.grid_3,.grid_4,.grid_5,.grid_6,.grid_7,.grid_8,.grid_9,.grid_10,.grid_11,.grid_12,.grid_13,.grid_14,.grid_15,.grid_16{display:inline;float:left;margin-left:10px;margin-right:10px}.container_12 .grid_3,.container_16 .grid_4{width:220px}.container_12 .grid_6,.container_16 .grid_8{width:460px}.container_12 .grid_9,.container_16 .grid_12{width:700px}.container_12 .grid_12,.container_16 .grid_16{width:940px}.alpha{margin-left:0}.omega{margin-right:0}.container_12 .grid_1{width:60px}.container_12 .grid_2{width:140px}.container_12 .grid_4{width:300px}.container_12 .grid_5{width:380px}.container_12 .grid_7{width:540px}.container_12 .grid_8{width:620px}.container_12 .grid_10{width:780px}.container_12 .grid_11{width:860px}.container_16 .grid_1{width:40px}.container_16 .grid_2{width:100px}.container_16 .grid_3{width:160px}.container_16 .grid_5{width:280px}.container_16 .grid_6{width:340px}.container_16 .grid_7{width:400px}.container_16 .grid_9{width:520px}.container_16 .grid_10{width:580px}.container_16 .grid_11{width:640px}.container_16 .grid_13{width:760px}.container_16 .grid_14{width:820px}.container_16 .grid_15{width:880px}.container_12 .prefix_3,.container_16 .prefix_4{padding-left:240px}.container_12 .prefix_6,.container_16 .prefix_8{padding-left:480px}.container_12 .prefix_9,.container_16 .prefix_12{padding-left:720px}.container_12 .prefix_1{padding-left:80px}.container_12 .prefix_2{padding-left:160px}.container_12 .prefix_4{padding-left:320px}.container_12 .prefix_5{padding-left:400px}.container_12 .prefix_7{padding-left:560px}.container_12 .prefix_8{padding-left:640px}.container_12 .prefix_10{padding-left:800px}.container_12 .prefix_11{padding-left:880px}.container_16 .prefix_1{padding-left:60px}.container_16 .prefix_2{padding-left:120px}.container_16 .prefix_3{padding-left:180px}.container_16 .prefix_5{padding-left:300px}.container_16 .prefix_6{padding-left:360px}.container_16 .prefix_7{padding-left:420px}.container_16 .prefix_9{padding-left:540px}.container_16 .prefix_10{padding-left:600px}.container_16 .prefix_11{padding-left:660px}.container_16 .prefix_13{padding-left:780px}.container_16 .prefix_14{padding-left:840px}.container_16 .prefix_15{padding-left:900px}.container_12 .suffix_3,.container_16 .suffix_4{padding-right:240px}.container_12 .suffix_6,.container_16 .suffix_8{padding-right:480px}.container_12 .suffix_9,.container_16 .suffix_12{padding-right:720px}.container_12 .suffix_1{padding-right:80px}.container_12 .suffix_2{padding-right:160px}.container_12 .suffix_4{padding-right:320px}.container_12 .suffix_5{padding-right:400px}.container_12 .suffix_7{padding-right:560px}.container_12 .suffix_8{padding-right:640px}.container_12 .suffix_10{padding-right:800px}.container_12 .suffix_11{padding-right:880px}.container_16 .suffix_1{padding-right:60px}.container_16 .suffix_2{padding-right:120px}.container_16 .suffix_3{padding-right:180px}.container_16 .suffix_5{padding-right:300px}.container_16 .suffix_6{padding-right:360px}.container_16 .suffix_7{padding-right:420px}.container_16 .suffix_9{padding-right:540px}.container_16 .suffix_10{padding-right:600px}.container_16 .suffix_11{padding-right:660px}.container_16 .suffix_13{padding-right:780px}.container_16 .suffix_14{padding-right:840px}.container_16 .suffix_15{padding-right:900px}.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}.clearfix:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.clearfix{display:inline-block}* html .clearfix{height:1%}.clearfix{display:block}
25 public/stylesheets/design.css
@@ -14,10 +14,31 @@ h1 {
14 14 }
15 15
16 16 .hideme {
17   -//display:none;
  17 +display:none;
18 18 }
19 19
20 20 div.content {
21 21 text-align: left;
22 22 min-height:500px;
23   -}
  23 +}
  24 +
  25 +.container_16
  26 +{
  27 + background: #fff url(/public/images/16_col.gif) repeat-y;
  28 + min-height: 600px;
  29 +}
  30 +
  31 +ul
  32 +{
  33 + margin-left: 10px;
  34 +}
  35 +
  36 +li
  37 +{
  38 + margin-left: 10px;
  39 +}
  40 +
  41 +a.action_node
  42 +{
  43 + text-decoration: none;
  44 +}
1  public/stylesheets/reset.css
... ... @@ -0,0 +1 @@
  1 +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outline:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}
1  public/stylesheets/text.css
... ... @@ -0,0 +1 @@
  1 +body{font:13px/1.5 Helvetica,Arial,'Liberation Sans',FreeSans,sans-serif}a:focus{outline:1px dotted invert}hr{border:0 #ccc solid;border-top-width:1px;clear:both;height:0}h1{font-size:25px}h2{font-size:23px}h3{font-size:21px}h4{font-size:19px}h5{font-size:17px}h6{font-size:15px}ol{list-style:decimal}ul{list-style:square}li{margin-left:30px}p,dl,hr,h1,h2,h3,h4,h5,h6,ol,ul,pre,table,address,fieldset{margin-bottom:20px}
8 resources.lasso
@@ -120,10 +120,10 @@ select: $do;
120 120
121 121
122 122 '<a href="?do=subNode&amp;id=' (field('id')) '" title="Examine the whole tree under this node"><img src="/public/images/hr_subtree.png" alt="image" width="16" height="16" align="absmiddle" border="0" /></a> |\r';
123   - ' Sub Page <a href="?do=addChild&amp;id=' (field('id')) '#' loop_count '" title="Add a Child, this will add a new area with depth equal to this one plus one from the document root"><img src="/public/images/hr_add_child.png" alt="image" width="16" height="16" align="absmiddle" border="0" /></a> |\r';
124   - ' New Page <a href="?do=addSibling&amp;id=' (field('id')) '#' loop_count '" title="Add a Sibling, this will add a new area with depth equal to this one from the document root"><img src="/public/images/hr_dupe.png" alt="image"width="16" height="16" align="absmiddle" border="0" /></a> |\r';
125   - ' Move this Area Up 1 Node<a href="?do=moveNode&amp;id=' (field('id')) '" title="Move the Node, this will move this node and all its children up one level in the current hierachy, it will be the same distance from the document root." onclick="return confirm(\'Are you sure you want to MOVE THIS RECORD and all of the CHILDREN underneath it UP ONE ROW?\')"><img src="/public/images/hr_switch_nodes.png" alt="image"width="16" height="16" align="absmiddle" border="0" /></a> |';
126   - ' <a href="?do=deleteNode&amp;id=' (field('id')) '" title="Delete the whole node" onclick="return confirm(\'Are you sure you want to DELETE THIS RECORD and all its CHILDREN underneath it?\')"><img src="/public/images/hr_delete_node.png" alt="image"width="16" height="16" align="absmiddle" border="0" /></a>';
  123 + ' <a class="action_node" href="?do=addChild&amp;id=' (field('id')) '#' loop_count '" title="Add a Child, this will add a new area with depth equal to this one plus one from the document root">Sub Page <img src="/public/images/hr_add_child.png" alt="image" width="16" height="16" align="absmiddle" border="0" /></a> |\r';
  124 + ' <a class="action_node" href="?do=addSibling&amp;id=' (field('id')) '#' loop_count '" title="Add a Sibling, this will add a new area with depth equal to this one from the document root">New Page <img src="/public/images/hr_dupe.png" alt="image"width="16" height="16" align="absmiddle" border="0" /></a> |\r';
  125 + ' <a class="action_node" href="?do=moveNode&amp;id=' (field('id')) '" title="Move the Node, this will move this node and all its children up one level in the current hierachy, it will be the same distance from the document root." onclick="return confirm(\'Are you sure you want to MOVE THIS RECORD and all of the CHILDREN underneath it UP ONE ROW?\')">Move this Area Up 1 Node <img src="/public/images/hr_switch_nodes.png" alt="image"width="16" height="16" align="absmiddle" border="0" /></a> |';
  126 + ' <a class="action_node" href="?do=deleteNode&amp;id=' (field('id')) '" title="Delete the whole node" onclick="return confirm(\'Are you sure you want to DELETE THIS RECORD and all its CHILDREN underneath it?\')"><img src="/public/images/hr_delete_node.png" alt="image"width="16" height="16" align="absmiddle" border="0" /></a>';
127 127 '</div>\r';
128 128
129 129

0 comments on commit 1d16fdb

Please sign in to comment.
Something went wrong with that request. Please try again.