You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2005/07/06 02:04:06 UTC

svn commit: r209361 - in /incubator/roller/trunk: src/org/roller/config/RollerConfig.java web/WEB-INF/classes/rollerRuntimeConfigDefs.xml web/WEB-INF/velocity.properties

Author: agilliland
Date: Tue Jul  5 17:04:04 2005
New Revision: 209361

URL: http://svn.apache.org/viewcvs?rev=209361&view=rev
Log:
A few config changes for theme management.

RollerConfig now has a setRuntimeContext() method for setting the real path to the roller context to make it available to business classes.

Created new "Themes" section in Admin settings page and added new property "themes.customtheme.allowed"

Removed "preview" from velocity resource loader list

Modified:
    incubator/roller/trunk/src/org/roller/config/RollerConfig.java
    incubator/roller/trunk/web/WEB-INF/classes/rollerRuntimeConfigDefs.xml
    incubator/roller/trunk/web/WEB-INF/velocity.properties

Modified: incubator/roller/trunk/src/org/roller/config/RollerConfig.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/config/RollerConfig.java?rev=209361&r1=209360&r2=209361&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/config/RollerConfig.java (original)
+++ incubator/roller/trunk/src/org/roller/config/RollerConfig.java Tue Jul  5 17:04:04 2005
@@ -156,4 +156,19 @@
             mConfig.setProperty("uploads.dir", path);
     }
     
+    
+    /**
+     * Set the "context.realpath" property at runtime.
+     *
+     * Properties are meant to be read-only, but we make this one exception
+     * for now because there are some classes which rely on having filesystem
+     * access to files in the roller webapp context.
+     *
+     * This property is *not* persisted in any way.
+     */
+    public static void setContextPath(String path) {
+        
+        mConfig.setProperty("context.realpath", path);
+    }
+    
 }

Modified: incubator/roller/trunk/web/WEB-INF/classes/rollerRuntimeConfigDefs.xml
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/WEB-INF/classes/rollerRuntimeConfigDefs.xml?rev=209361&r1=209360&r2=209361&view=diff
==============================================================================
--- incubator/roller/trunk/web/WEB-INF/classes/rollerRuntimeConfigDefs.xml (original)
+++ incubator/roller/trunk/web/WEB-INF/classes/rollerRuntimeConfigDefs.xml Tue Jul  5 17:04:04 2005
@@ -61,10 +61,6 @@
          <type>boolean</type>
 	 <default-value>true</default-value>
       </property-def>
-      <property-def  name="users.themes.path"  key="configForm.newUserThemes">
-         <type>string</type>
-	 <default-value>/themes</default-value>
-      </property-def>
       <property-def  name="users.editor.pages"  key="configForm.editorPages">
          <type>text</type>
 	 <default-value>editor-ekit.jsp,editor-text.jsp,editor-dhtml.jsp,editor-text-js.jsp,editor-wiki-js.jsp,editor-rte.jsp</default-value>
@@ -111,6 +107,19 @@
       </property-def>
 
    </display-group >
+   
+   <display-group name="themeSettings" key="configForm.themeSettings">
+   
+      <property-def  name="users.themes.path"  key="configForm.newUserThemes">
+         <type>string</type>
+	 <default-value>/themes</default-value>
+      </property-def>
+      <property-def  name="themes.customtheme.allowed"  key="configForm.allowCustomTheme">
+         <type>boolean</type>
+	 <default-value>true</default-value>
+      </property-def>
+      
+   </display-group>
    
    <!-- Debugging Settings Group -->
    <!--

Modified: incubator/roller/trunk/web/WEB-INF/velocity.properties
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/WEB-INF/velocity.properties?rev=209361&r1=209360&r2=209361&view=diff
==============================================================================
--- incubator/roller/trunk/web/WEB-INF/velocity.properties (original)
+++ incubator/roller/trunk/web/WEB-INF/velocity.properties Tue Jul  5 17:04:04 2005
@@ -1,5 +1,12 @@
 # specify resource loaders to use
-resource.loader = webapp, preview, roller, class
+resource.loader = webapp, theme, roller, class
+
+# theme resource loader
+theme.resource.loader.public.name=theme
+theme.resource.loader.description=Roller Theme Resource Loader
+theme.resource.loader.class=org.roller.presentation.velocity.ThemeResourceLoader
+theme.resource.loader.cache=false
+theme.resource.loader.modificationCheckInterval=2
 
 # for the loader we call 'preview', use the PreviewResourceLoader
 preview.resource.loader.public.name=preview