public
Description: Git mirror of the CMS Made Simple 2.0 rewrite
Homepage: http://cmsmadesimple.org
Clone URL: git://github.com/tedkulp/cmsmadesimple-2-0.git
Removed the use_hierarchy option.  It's on, baby!

Signed-off-by: Ted Kulp <ted@cmsmadesimple.org>


git-svn-id: http://svn.cmsmadesimple.org/svn/cmsmadesimple/trunk@4380 
3d254a34-79dc-0310-9e5f-be208747d8a0
tedkulp (author)
Fri Mar 07 11:28:43 -0800 2008
commit  33bca6f98dfd0ef6901f6a2c8f0b725c6a288528
tree    151e1ce1c03b63a3fc94ffeec0b02c7ac7af0077
parent  19a6d7159da286ce9fa7169c953286461160a962
...
129
130
131
132
133
134
135
...
332
333
334
335
336
337
338
339
340
341
...
129
130
131
 
132
133
134
...
331
332
333
 
 
 
 
334
335
336
0
@@ -129,7 +129,6 @@ class CmsConfig extends CmsObject implements ArrayAccess
0
     $config["debug"] = false;
0
     $config["assume_mod_rewrite"] = false;
0
     $config['internal_pretty_urls'] = false;
0
- $config['use_hierarchy'] = false;
0
     $config["auto_alias_content"] = true;
0
     $config["image_manipulation_prog"] = "GD";
0
     $config["image_transform_lib_path"] = "/usr/bin/ImageMagick/";
0
@@ -332,10 +331,6 @@ if(isset(\$_SERVER['HTTPS']) && \$_SERVER['HTTPS']=='on')
0
 #should be in all of your templates before enabling.
0
 \$config['internal_pretty_urls'] = ${$config['internal_pretty_urls']?'true':'false'};
0
 
0
-#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
0
-#show urls in their hierarchy? (ex. http://www.mysite.com/parent/parent/childpage)
0
-\$config['use_hierarchy'] = ${$config['use_hierarchy']?'true':'false'};
0
-
0
 #If using none of the above options, what should we be using for the query string
0
 #variable? (ex. http://www.mysite.com/index.php?page=somecontent)
0
 \$config['query_var'] = '{$config['query_var']}';
...
281
282
283
284
285
286
287
288
289
290
291
 
292
293
294
295
296
297
298
299
300
301
302
303
304
 
305
306
307
...
281
282
283
 
 
 
 
 
 
 
 
284
285
286
287
288
289
 
 
 
 
 
 
 
 
290
291
292
293
0
@@ -281,27 +281,13 @@ class CmsContentBase extends CmsObjectRelationalMapping
0
     $alias = ($this->alias != ''?$this->alias:$this->id);
0
     if ($config["assume_mod_rewrite"] && $rewrite == true)
0
     {
0
- if ($config['use_hierarchy'] == true)
0
- {
0
- $url = $config['root_url']. '/' . ($lang != '' ? "$lang/" : '') . $this->HierarchyPath() . (isset($config['page_extension'])?$config['page_extension']:'.html');
0
- }
0
- else
0
- {
0
- $url = $config['root_url']. '/' . ($lang != '' ? "$lang/" : '') . $alias . (isset($config['page_extension'])?$config['page_extension']:'.html');
0
- }
0
+ $url = $config['root_url']. '/' . ($lang != '' ? "$lang/" : '') . $this->HierarchyPath() . (isset($config['page_extension'])?$config['page_extension']:'.html');
0
     }
0
     else
0
     {
0
      if (isset($_SERVER['PHP_SELF']) && $config['internal_pretty_urls'] == true)
0
      {
0
- if ($config['use_hierarchy'] == true)
0
- {
0
- $url = $config['root_url'] . '/index.php/' . ($lang != '' ? "$lang/" : '') . $this->HierarchyPath() . (isset($config['page_extension'])?$config['page_extension']:'.html');
0
- }
0
- else
0
- {
0
- $url = $config['root_url'] . '/index.php/' . ($lang != '' ? "$lang/" : '') . $alias . (isset($config['page_extension'])?$config['page_extension']:'.html');
0
- }
0
+ $url = $config['root_url'] . '/index.php/' . ($lang != '' ? "$lang/" : '') . $this->HierarchyPath() . (isset($config['page_extension']) ? $config['page_extension'] : '.html');
0
      }
0
      else
0
      {
...
435
436
437
438
 
439
440
441
442
 
443
444
445
...
435
436
437
 
438
439
440
441
 
442
443
444
445
0
@@ -435,11 +435,11 @@ function cms_module_CreateLink(&$modinstance, $id, $action, $returnid='', $conte
0
 
0
   $class = (isset($params['class'])?cms_htmlentities($params['class']):'');
0
 
0
- if ($prettyurl != '' && $config['assume_mod_rewrite'] == true && $config['use_hierarchy'] == true)
0
+ if ($prettyurl != '' && $config['assume_mod_rewrite'] == true)
0
   {
0
     $text = $config['root_url'] . '/' . $prettyurl . $config['page_extension'];
0
   }
0
- else if ($prettyurl != '' && $config['internal_pretty_urls'] == true && $config['use_hierarchy'] == true)
0
+ else if ($prettyurl != '' && $config['internal_pretty_urls'] == true)
0
   {
0
     $text = $config['root_url'] . '/index.php/' . $prettyurl . $config['page_extension'];
0
   }
...
43
44
45
46
 
47
48
49
...
43
44
45
 
46
47
48
49
0
@@ -43,7 +43,7 @@ function smarty_cms_help_function_header() {
0
   <ul>
0
     <li><em>(optional)</em>name - Instead of getting all stylesheets for the given page, it will only get one spefically named one, whether it's attached to the current template or not.</li>
0
     <li><em>(optional)</em>media - If name is defined, this allows you set a different media type for that stylesheet.</li>
0
- <li><em>(optional)</em>showbase (true/false) - If set to false, the base tag will not be sent to the browser. Defaults to true if use_hierarchy is set to true in config.php.</li>
0
+ <li><em>(optional)</em>showbase (true/false) - If set to false, the base tag will not be sent to the browser. Defaults to true.</li>
0
     <li><em>(optional)</em>assign - Assign the output to a smarty variable named in assign instead of outputting it directly.</li>
0
   </ul>
0
   <?php
...
59
60
61
62
 
63
64
65
...
59
60
61
 
62
63
64
65
0
@@ -59,7 +59,7 @@ function smarty_cms_help_function_metadata() {
0
   <p>Just insert the tag into your template like: <code>{metadata}</code></p>
0
   <h3>What parameters does it take?</h3>
0
   <ul>
0
- <li><em>(optional)</em>showbase (true/false) - If set to false, the base tag will not be sent to the browser. Defaults to true if use_hierarchy is set to true in config.php.</li>
0
+ <li><em>(optional)</em>showbase (true/false) - If set to false, the base tag will not be sent to the browser. Defaults to true.</li>
0
     <li><em>(optional)</em>assign - Assign the output to a smarty variable named in assign instead of outputting it directly.</li>
0
   </ul>
0
   <?php
...
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
...
164
165
166
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
168
0
@@ -164,31 +164,5 @@ function cms_header_filter_plugin_function($params, &$smarty)
0
   }
0
 }
0
 
0
-function smarty_cms_help_outputfilter_header() {
0
- ?>
0
- <h3>What does this do?</h3>
0
- <p>Displays the stylesheet link and metadata for this page. Both global metdata from the global settings page and metadata for each page will be shown.</p>
0
- <h3>How do I use it?</h3>
0
- <p>Just insert the tag into your template like: <code>{header}</code></p>
0
- <h3>What parameters does it take?</h3>
0
- <ul>
0
- <li><em>(optional)</em>name - Instead of getting all stylesheets for the given page, it will only get one spefically named one, whether it's attached to the current template or not.</li>
0
- <li><em>(optional)</em>media - If name is defined, this allows you set a different media type for that stylesheet.</li>
0
- <li><em>(optional)</em>showbase (true/false) - If set to false, the base tag will not be sent to the browser. Defaults to true if use_hierarchy is set to true in config.php.</li>
0
- <li><em>(optional)</em>assign - Assign the output to a smarty variable named in assign instead of outputting it directly.</li>
0
- </ul>
0
- <?php
0
-}
0
-
0
-function smarty_cms_about_outputfilter_header() {
0
- ?>
0
- <p>Author: Ted Kulp&lt;ted@cmsmadesimple.org&gt;</p>
0
- <p>Version: 1.0</p>
0
- <p>
0
- Change History:<br/>
0
- None
0
- </p>
0
- <?php
0
-}
0
 # vim:ts=4 sw=4 noet
0
 ?>

Comments

    No one has commented yet.