diff --git a/Theme.cfc b/Theme.cfc index fcdf2ba..3ebfce1 100644 --- a/Theme.cfc +++ b/Theme.cfc @@ -1,100 +1,265 @@ /** -* ContentBox - A Modular Content Platform -* Copyright since 2012 by Ortus Solutions, Corp -* www.ortussolutions.com/products/contentbox -* --- -* A theme is composed of the following pieces -* -* /ThemeDirectory -* + Theme.cfc (The CFC that models your theme implementation) -* / layouts (The folder that contains layouts in your theme) -* + blog.cfm (Mandatory layout used for all blog views by convention) -* + pages.cfm (Mandatory layout used for all pages by convention) -* + maintenance.cfm (Optional used when in maintenance mode, else defaults to pages) -* + search.cfm (Optional used when doing searches, else defaults to pages) -* / views (The folder that contains views for rendering) -* + archives.cfm (MANDATORY: The view used to render out blog archives.) -* + entry.cfm (MANDATORY: The view used to render out a single blog entry with comments, etc.) -* + error.cfm (MANDATORY: The view used to display errors when they ocurr in your blog or pages) -* + index.cfm (MANDATORY: The view used to render out the home page where all blog entries are rendered) -* + notfound.cfm (The view used to display messages to users when a blog entry requested was not found in our system.) -* + page.cfm (MANDATORY: The view used to render out individual pages.) -* + maintenance.cfm (OPTIONAL: Used when in maintenance mode) -* / templates (The folder that contains optional templates for collection rendering that are used using the quick rendering methods in the CB Helper) -* + category.cfm (The template used to display an iteration of entry categories using coldbox collection rendering) -* + comment.cfm (The template used to display an iteration of entry or page comments using coldbox collection rendering) -* + entry.cfm (The template used to display an iteration of entries in the home page using coldbox collection rendering) -* / widgets (A folder that can contain layout specific widgets which override core ContentBox widgets) -* -* Templates -* Templates are a single cfm template that is used by ContentBox to iterate over a collection (usually entries or categories or comments) and -* render out all of them in uniformity. Please refer to ColdBox Collection Rendering for more information. Each template recevies -* the following: -* -* _counter (A variable created for you that tells you in which record we are currently looping on) -* _items (A variable created for you that tells you how many records exist in the collection) -* {templateName} The name of the object you will use to display: entry, comment, category -* -* Layout Local CallBack Functions: -* onActivation() -* onDelete() -* onDeactivation() -* -* Settings -* You can declare settings for your layouts that ContentBox will manage for you. -* -* this.settings = [ -* { name="Title", defaultValue="My Awesome Title", required="true", type="text", label="Title:" }, -* { name="Colors", defaultValue="blue", required="false", type="select", label="Color:", options="red,blue,orange,gray" } -* ]; -* -* The value is an array of structures with the following keys: -* -* - name : The name of the setting (required), the setting is saved as cb_layoutname_settingName -* - defaultValue : The default value of the setting (required) -* - required : Whether the setting is required or not. Defaults to false -* - type : The type of the HTMl control (text=default, textarea, boolean, select, color) -* - label : The HTML label of the control (defaults to name) -* - title : The HTML title of the control (defaults to empty string) -* - options : The select box options. Can be a list or array of values or an array of name-value pair structures -* - optionsUDF : The select box options. This points to a UDF that returns a list or array of values or an array of name-value pair structures. Example: getColors not getColors() -* - group : lets you group inputs under a Group name - settings should be in order for groupings to work as expected -* - groupIntro : Lets you add a description for a group of fields -* - fieldDescription : Lets you add a description for an individual field -* - fieldHelp : Lets you add a chunk of HTML for a Modal, openable by the User by clicking on question mark next to the field label. Recommended use is to readFiles from the ./includes/help directory, with a helper function, for example: loadHelpFile( 'cbBootswatchTheme.html' ); -*/ + * ContentBox - A Modular Content Platform + * Copyright since 2012 by Ortus Solutions, Corp + * www.ortussolutions.com/products/contentbox + * --- + * A theme is composed of the following pieces + * + * /ThemeDirectory + * + Theme.cfc (The CFC that models your theme implementation) + * / layouts (The folder that contains layouts in your theme) + * + blog.cfm (Mandatory layout used for all blog views by convention) + * + pages.cfm (Mandatory layout used for all pages by convention) + * + maintenance.cfm (Optional used when in maintenance mode, else defaults to pages) + * + search.cfm (Optional used when doing searches, else defaults to pages) + * / views (The folder that contains views for rendering) + * + archives.cfm (MANDATORY: The view used to render out blog archives.) + * + entry.cfm (MANDATORY: The view used to render out a single blog entry with comments, etc.) + * + error.cfm (MANDATORY: The view used to display errors when they ocurr in your blog or pages) + * + index.cfm (MANDATORY: The view used to render out the home page where all blog entries are rendered) + * + notfound.cfm (The view used to display messages to users when a blog entry requested was not found in our system.) + * + page.cfm (MANDATORY: The view used to render out individual pages.) + * + maintenance.cfm (OPTIONAL: Used when in maintenance mode) + * / templates (The folder that contains optional templates for collection rendering that are used using the quick rendering methods in the CB Helper) + * + category.cfm (The template used to display an iteration of entry categories using coldbox collection rendering) + * + comment.cfm (The template used to display an iteration of entry or page comments using coldbox collection rendering) + * + entry.cfm (The template used to display an iteration of entries in the home page using coldbox collection rendering) + * / widgets (A folder that can contain layout specific widgets which override core ContentBox widgets) + * + * Templates + * Templates are a single cfm template that is used by ContentBox to iterate over a collection (usually entries or categories or comments) and + * render out all of them in uniformity. Please refer to ColdBox Collection Rendering for more information. Each template recevies + * the following: + * + * _counter (A variable created for you that tells you in which record we are currently looping on) + * _items (A variable created for you that tells you how many records exist in the collection) + * {templateName} The name of the object you will use to display: entry, comment, category + * + * Layout Local CallBack Functions: + * onActivation() + * onDelete() + * onDeactivation() + * + * Settings + * You can declare settings for your layouts that ContentBox will manage for you. + * + * this.settings = [ + * { name="Title", defaultValue="My Awesome Title", required="true", type="text", label="Title:" }, + * { name="Colors", defaultValue="blue", required="false", type="select", label="Color:", options="red,blue,orange,gray" } + * ]; + * + * The value is an array of structures with the following keys: + * + * - name : The name of the setting (required), the setting is saved as cb_themeName_settingName + * - defaultValue : The default value of the setting (required) + * - required : Whether the setting is required or not. Defaults to false + * - type : The type of the HTMl control (text=default, textarea, boolean, select, color) + * - label : The HTML label of the control (defaults to name) + * - title : The HTML title of the control (defaults to empty string) + * - options : The select box options. Can be a list or array of values or an array of name-value pair structures + * - optionsUDF : The select box options. This points to a UDF that returns a list or array of values or an array of name-value pair structures. Example: getColors not getColors() + * - group : lets you group inputs under a Group name - settings should be in order for groupings to work as expected + * - groupIntro : Lets you add a description for a group of fields + * - fieldDescription : Lets you add a description for an individual field + * - fieldHelp : Lets you add a chunk of HTML for a Modal, openable by the User by clicking on question mark next to the field label. Recommended use is to readFiles from the ./includes/help directory, with a helper function, for example: loadHelpFile( 'cbBootswatchTheme.html' ); + */ component{ // Layout Variables this.name = "Skokov"; this.description = "Content box theme Skokov"; - this.version = "2.0"; + this.version = "3.0"; this.author = "Lucid Outsourcing Solutions Pvt. Ltd."; - this.authorURL = "https://lucidsolutions.in/"; + this.authorURL = "https://lucidoutsourcing.com/"; // Screenshot URL, can be absolute or locally in your layout package. this.screenShotURL = "screenshot.png"; // Layout Settings this.settings = [ - { name="headerLogo", group="Header", defaultValue="", type="text", label="Logo URL:", groupIntro="Customize the header section of your theme. You can change the logo and the search field.", fieldDescription="Enter a relative or full url for the website logo. This image is not scaled with html or css, so please size it accordingly. Resize the image to approximately 300x50." }, - // { name="shareLinks", group="Header", defaultValue="ra-59ddfdcc3948e67d", type="text", label="Shows Share Link"}, - { name="aboutUs", group="Footer", defaultValue="Coldfusion Development Company In Jodhpur, India - Lucid Outsourcing Solutions Pvt Ltd provides services like website development jodhpur India", type="textarea", label="About Us Text:", groupIntro="Customize the footer of your site." }, - { name="socialFB", group="Footer", defaultValue="https://lucidsolutions.in/", type="text", label="Facebook Link", groupIntro="Customize the footer of your site." }, - { name="socialg+", group="Footer", defaultValue="https://lucidsolutions.in/", type="text", label="Google+ Link", groupIntro="Customize the footer of your site." }, - { name="socialTwitter", group="Footer", defaultValue="https://lucidsolutions.in/", type="text", label="Twitter Link", groupIntro="Customize the footer of your site." }, - { name="socialLN", group="Footer", defaultValue="https://lucidsolutions.in/", type="text", label="Linkedin Link", groupIntro="Customize the footer of your site." }, - { name="socialYT", group="Footer", defaultValue="https://lucidsolutions.in/", type="text", label="Youtube Link", groupIntro="Customize the footer of your site." }, - { name="socialbloger", group="Footer", defaultValue="https://lucidsolutions.in/", type="text", label="Bloger Link", groupIntro="Customize the footer of your site." }, - { name="socialrss", group="Footer", defaultValue="https://lucidsolutions.in/", type="text", label="RSS Link", groupIntro="Customize the footer of your site." }, - { name="socialdribble", group="Footer", defaultValue="https://lucidsolutions.in/", type="text", label="Dribble Link", groupIntro="Customize the footer of your site." }, - { name="contactInfo", group="Footer", defaultValue="STPI, Plot No. CYB-I, Cyber Park ,RIICO Heavy Industrial Area, Near Saras Dairy, Jodhpur-342003", type="textarea",label="Contact Info", groupIntro="Customize the footer of your site." }, - { name="numberInfo", group="Footer", defaultValue="+15035935119 ,+91-291-3192333", type="textarea",label="Number Info", groupIntro="Customize the footer of your site." }, - { name="emailInfo", group="Footer", defaultValue="info@lucidsolutions.in", type="text", label="Email Info", groupIntro="Customize the footer of your site." }, - { name="entrySocialicons", group="Footer", defaultValue="true", type="boolean",label="Show Social options in single entry", required="false" }, - { name="showCategoriesBlogSide", group="Blog Sidebar Options", defaultValue="true", type="boolean", label="Show Categories in Blog Sidebar", required="false", groupIntro="By default, you have lots of widgets displayed in the Blog Sidebar. Enable or Disabled those items below." }, - { name="showRecentEntriesBlogSide", group="Blog Sidebar Options", defaultValue="true", type="boolean", label="Show Recent Enties in Blog Sidebar", required="false" }, - { name="showSiteUpdatesBlogSide", group="Blog Sidebar Options", defaultValue="true", type="boolean", label="Show Site Updates in Blog Sidebar", required="false" }, - { name="showEntryCommentsBlogSide", group="Blog Sidebar Options", defaultValue="true", type="boolean", label="Show Entry Comments in Blog Sidebar", required="false" }, - { name="showArchivesBlogSide", group="Blog Sidebar Options", defaultValue="true", type="boolean", label="Show Archives in Blog Sidebar", required="false" }, - { name="showEntriesSearchBlogSide", group="Blog Sidebar Options", defaultValue="true", type="boolean", label="Show Entries Search in Blog Sidebar", required="false" } + { + name : "cssStyleOverrides", + group : "Colors", + defaultValue : "", + type : "textarea", + label : "CSS Style Overrides:", + fieldDescription : "Enter CSS you would like added to your Theme to override the defaults from your Bootswatch" + }, + { + name : "headerLogo", + group : "Header", + defaultValue : "", + type : "text", + label : "Logo URL:", + groupIntro : "Customize the header section of your theme. You can change the logo and the search field.", + fieldDescription : "Enter a relative or full url for the website logo. This image is not scaled with html or css, so please size it accordingly. Resize the image to approximately 300x50." + }, + { + name : "showSiteSearch", + group : "Header", + defaultValue : "true", + type : "boolean", + label : "Show Search Form Field in Header", + required : "false" + }, + { + name : "aboutUs", + group : "Footer", + defaultValue : "Coldfusion Development Company In Jodhpur, India - Lucid Outsourcing Solutions Pvt Ltd provides services like website development jodhpur India", + type : "textarea", + label : "About Us Text:", + groupIntro : "Customize the footer of your site." + }, + { + name : "socialFB", + group : "Footer", + defaultValue : "https://lucidoutsourcing.com", + type : "text", + label : "Facebook Link", + groupIntro : "Customize the footer of your site." + }, + { + name : "socialg+", + group : "Footer", + defaultValue : "https://lucidoutsourcing.com", + type : "text", + label : "Google+ Link", + groupIntro : "Customize the footer of your site." + }, + { + name : "socialTwitter", + group : "Footer", + defaultValue : "https://lucidoutsourcing.com", + type : "text", + label : "Twitter Link", + groupIntro : "Customize the footer of your site." + }, + { + name : "socialLN", + group : "Footer", + defaultValue : "https://lucidoutsourcing.com", + type : "text", + label : "Linkedin Link", + groupIntro : "Customize the footer of your site." + }, + { + name : "socialYT", + group : "Footer", + defaultValue : "https://lucidoutsourcing.com", + type : "text", + label : "Youtube Link", + groupIntro : "Customize the footer of your site." + }, + { + name : "socialbloger", + group : "Footer", + defaultValue : "https://lucidoutsourcing.com", + type : "text", + label : "Bloger Link", + groupIntro : "Customize the footer of your site." + }, + { + name : "socialrss", + group : "Footer", + defaultValue : "https://lucidoutsourcing.com", + type : "text", + label : "RSS Link", + groupIntro : "Customize the footer of your site." + }, + { + name : "socialdribble", + group : "Footer", + defaultValue : "https://lucidoutsourcing.com", + type : "text", + label : "Dribble Link", + groupIntro : "Customize the footer of your site." + }, + { + name : "contactInfo", + group : "Footer", + defaultValue : "STPI, Plot No. CYB-I, Cyber Park ,RIICO Heavy Industrial Area, Near Saras Dairy, Jodhpur-342003", + type : "text", + label : "Contact Info", + groupIntro : "Customize the footer of your site." + }, + { + name : "numberInfo", + group : "Footer", + defaultValue : "+15035935119 ,+91-291-3192333", + type : "text", + label : "Number Info", + groupIntro : "Customize the footer of your site." + }, + { + name : "emailInfo", + group : "Footer", + defaultValue : "info@lucidsolutions.in", + type : "text", + label : "Email Info", + groupIntro : "Customize the footer of your site." + }, + { + name : "entrySocialicons", + group : "Footer", + defaultValue : "true", + type : "boolean", + label : "Show Social options in single entry", + required : "false" + }, + { + name : "rssDiscovery", + group : "Homepage", + defaultValue : "true", + type : "boolean", + label : "Active RSS Discovery Links", + required : "false" + }, + { + name : "showCategoriesBlogSide", + group : "Blog Sidebar Options", + defaultValue : "true", + type : "boolean", + label : "Show Categories in Blog Sidebar", + required : "false", + groupIntro : "By default, you have lots of widgets displayed in the Blog Sidebar. Enable or Disabled those items below." + }, + { + name : "showRecentEntriesBlogSide", + group : "Blog Sidebar Options", + defaultValue : "true", + type : "boolean", + label : "Show Recent Enties in Blog Sidebar", + required : "false" + }, + { + name : "showSiteUpdatesBlogSide", + group : "Blog Sidebar Options", + defaultValue : "true", + type : "boolean", + label : "Show Site Updates in Blog Sidebar", + required : "false" + }, + { + name : "showEntryCommentsBlogSide", + group : "Blog Sidebar Options", + defaultValue : "true", + type : "boolean", + label : "Show Entry Comments in Blog Sidebar", + required : "false" + }, + { + name : "showArchivesBlogSide", + group : "Blog Sidebar Options", + defaultValue : "true", + type : "boolean", + label : "Show Archives in Blog Sidebar", + required : "false" + }, + { + name : "showEntriesSearchBlogSide", + group : "Blog Sidebar Options", + defaultValue : "true", + type : "boolean", + label : "Show Entries Search in Blog Sidebar", + required : "false" + } ]; /** diff --git a/layouts/blog.cfm b/layouts/blog.cfm index 756ba64..8083b50 100644 --- a/layouts/blog.cfm +++ b/layouts/blog.cfm @@ -16,7 +16,7 @@ #cb.event( "cbui_afterBodyStart" )# - #cb.quickView( view='_header' )# + #cb.quickView( '_header' )# #cb.event( "cbui_beforeContent" )# diff --git a/views/_blogIncludes.cfm b/views/_blogIncludes.cfm index 8c8a3cc..5ec072b 100644 --- a/views/_blogIncludes.cfm +++ b/views/_blogIncludes.cfm @@ -26,6 +26,11 @@ + + + diff --git a/views/_footer.cfm b/views/_footer.cfm index 0569483..f54e9d9 100644 --- a/views/_footer.cfm +++ b/views/_footer.cfm @@ -71,8 +71,8 @@

-

Copyright © #cb.siteName()#. All rights reserved.

-

Powered by ContentBox v#cb.getContentBoxVersion()#

+
Theme Developed By
+

Lucid Outsourcing Solutions Pvt. Ltd.

'); writeOutput('
'); - writeOutput(''); + writeOutput(''); writeOutput(''); - writeOutput('
'); + writeOutput('
'); writeOutput(''); writeOutput('
'); // writeOutput('
'); diff --git a/widgets/RecentEntries.cfc b/widgets/RecentEntries.cfc index 394e502..efc42ff 100644 --- a/widgets/RecentEntries.cfc +++ b/widgets/RecentEntries.cfc @@ -44,16 +44,29 @@ component extends="contentbox.models.ui.BaseWidget" singleton{ var cbSettings = event.getValue( name="cbSettings", private=true ); // Determine Sort Order - switch( arguments.sortOrder ){ - case "Most Popular" : { arguments.sortOrder = "hits DESC";break; } - case "Most Commented" : { arguments.sortOrder = "numberOfComments DESC";break;} - default : { arguments.sortOrder = "publishedDate DESC"; } + // Determine Sort Order + switch ( arguments.sortOrder ) { + case "Most Popular": { + arguments.sortOrder = "hits DESC"; + break; + } + case "Most Commented": { + arguments.sortOrder = "numberOfComments DESC"; + break; + } + default: { + arguments.sortOrder = "publishedDate DESC"; + } } - var entryResults = entryService.findPublishedEntries( max=arguments.max, - category=arguments.category, - searchTerm=arguments.searchTerm, - sortOrder=arguments.sortOrder ); + var entryResults = variables.entryService.findPublishedContent( + max : arguments.max, + category : arguments.category, + searchTerm: arguments.searchTerm, + sortOrder : arguments.sortOrder, + siteID : getSite().getsiteID() + ); + var rString = ""; // iteration cap @@ -70,7 +83,7 @@ component extends="contentbox.models.ui.BaseWidget" singleton{ writeOutput('" ); @@ -83,7 +96,7 @@ component extends="contentbox.models.ui.BaseWidget" singleton{ * Get all the categories */ array function getAllCategories() cbIgnore{ - return categoryService.getAllNames(); + return variables.categoryService.getAllNames(); } }