Skip to content

Commit

Permalink
supported to content box 5
Browse files Browse the repository at this point in the history
  • Loading branch information
LucidSonal committed Dec 4, 2023
1 parent 0f9bf8e commit e346f03
Show file tree
Hide file tree
Showing 8 changed files with 290 additions and 107 deletions.
339 changes: 252 additions & 87 deletions Theme.cfc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion layouts/blog.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#cb.event( "cbui_afterBodyStart" )#

<!--- Header --->
#cb.quickView( view='_header' )#
#cb.quickView( '_header' )#

<!--- ContentBoxEvent --->
#cb.event( "cbui_beforeContent" )#
Expand Down
5 changes: 5 additions & 0 deletions views/_blogIncludes.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
<link href='http://fonts.googleapis.com/css?family=Karla' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

<cfif len( cb.themeSetting( 'cssStyleOverrides' ) )>
<style>
#cb.themeSetting( 'cssStyleOverrides' )#
</style>
</cfif>
<!--- ********************************************************************************* --->
<!--- JAVASCRIPT --->
<!--- ********************************************************************************* --->
Expand Down
6 changes: 3 additions & 3 deletions views/_footer.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
<div class="wrap">
<div class="copy">
<p class="copy">
<p>Copyright &copy; #cb.siteName()#. All rights reserved.</p>
<p>Powered by ContentBox v#cb.getContentBoxVersion()#</p>
<h6>Theme Developed By </h6>
<p><a href="https://lucidoutsourcing.com/">Lucid Outsourcing Solutions Pvt. Ltd.</a></p>
</p>
</div>
<div class="footer-nav">
Expand All @@ -98,7 +98,7 @@
</cfloop>

<!--- Blog Link, verify active --->
<cfif ( !prc.cbSettings.cb_site_disable_blog )>
<cfif ( !structKeyExists(prc.cbSettings, "cb_site_disable_blog") )>
<cfif cb.isBlogView()><li class="active"><cfelse><li></cfif>
<a href="#cb.linkBlog()#">Blog</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion views/_header.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</cfloop>

<!--- Blog Link, verify active --->
<cfif ( !prc.cbSettings.cb_site_disable_blog )>
<cfif ( !structKeyExists(prc.cbSettings, "cb_site_disable_blog") )>
<cfif cb.isBlogView()><li class="active"><cfelse><li></cfif>
<a href="#cb.linkBlog()#">Blog</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions views/index.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
<!--- Are we filtering by category? --->
<cfif len( rc.category )>
<p class="infoBar">
<span class="display-inline-block">Category Filtering: '#rc.category#'</span>
<span class="display-inline-block">Category Filtering: '#encodeForHTML( rc.category )#'</span>
<span class="display-inline-block"><a href="#cb.linkBlog()#" class="submit" title="Remove filter and view all entries">Remove Filter</a></span>
</p>
</cfif>
<!--- Are we searching --->
<cfif len( rc.q )>
<p>
<span class="display-inline-block">Searching by: '#rc.q#'</span>
<span class="display-inline-block">Searching by: '#encodeForHTML( rc.q )#'</span>
<span class="display-inline-block"><a class="submit" href="#cb.linkBlog()#" title="Clear search and view all entries">Clear Search</a></span>
</p>
</cfif>
Expand Down
6 changes: 3 additions & 3 deletions widgets/CommentForm.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ component extends="contentbox.models.ui.BaseWidget" singleton{
#cb.event( "cbui_preCommentForm" )#
#getModel( "messagebox@cbMessagebox" ).renderIt()#
#getInstance( "messagebox@cbMessagebox" ).renderIt()#
#html.hiddenField( name="contentID", value=arguments.content.getContentID() )#
#html.hiddenField( name="contentType", value=arguments.content.getContentType() )#');
Expand All @@ -50,9 +50,9 @@ component extends="contentbox.models.ui.BaseWidget" singleton{
// writeOutput('<input type="email" name = "authorEmail" placeholder="Email (required)" class="text" value="#event.getValue("authorEmail", oCurrentAuthor.getEmail())#" style="margin-left: 10px">');
// writeOutput('</div>');
writeOutput('<div class="to">');
writeOutput('<input type="text" name = "author" placeholder="Name (required)" class="text" value="#event.getValue("author",trim(oCurrentAuthor.getName()))#" required="required">');
writeOutput('<input type="text" name = "author" placeholder="Name (required)" class="text" value="#event.getValue("author",trim(oCurrentAuthor.getFirstName()))#" required="required">');
writeOutput('<input type="email" name = "authorEmail" placeholder="Email (required)" class="text" value="#event.getValue("authorEmail", oCurrentAuthor.getEmail())#" required="required" style="margin-left: 10px">');
writeOutput('<div class="text1"><input type="url" name="authorURL" required="required" placeholder="Website (required)" class="text" value="#event.getValue("author",trim(oCurrentAuthor.getName()))#" required="required">');
writeOutput('<div class="text1"><input type="url" name="authorURL" required="required" placeholder="Website (required)" class="text" value="#event.getValue("author",trim(oCurrentAuthor.getFirstName()))#" required="required">');
writeOutput('<textarea name="content" required="required" value="event.getValue( "content", "" ) required="required" placeholder="Comment (required)""></textarea>');
writeOutput('</div></div>');
// writeOutput('<div class="checkbox"><label><input type="checkbox" name="subscribe"> Notify me of follow-up comments by email.</label></div>');
Expand Down
33 changes: 23 additions & 10 deletions widgets/RecentEntries.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -70,7 +83,7 @@ component extends="contentbox.models.ui.BaseWidget" singleton{
writeOutput('<ul>');
// iterate and create
for(var x=1; x lte arguments.max; x++){
writeOutput('<li><img src="#cb.themeRoot()#/includes/images/arrow.png" alt=""><p><a href="#cb.linkEntry(entryResults.entries[ x ])#">#entryResults.entries[ x ].getTitle()#</a></p><div class="clear"></div></li>');
writeOutput('<li><img src="#cb.themeRoot()#/includes/images/arrow.png" alt=""><p><a href="#cb.linkEntry(entryResults.content[ x ])#">#entryResults.content[ x ].getTitle()#</a></p><div class="clear"></div></li>');
}
// close ul
writeOutput( "</ul>" );
Expand All @@ -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();
}

}

0 comments on commit e346f03

Please sign in to comment.