Instructions for getting an ELK stack set up quick on Mac. Paths are opinionated. You'll have to infer and change. Sorry mate. 🍰
Install Homebrew if not already. You probably have. If not, you should.
brew install elasticsearch nginx
<!--- | |
Author: Stephen J. Withington, Jr. | |
Notes: Place this under a temp directory within your Mura CMS root to test. | |
For example: http://yourdomain.com/temp/json-test.cfm | |
---> | |
<cfscript> | |
param name="form.endpoint" default="content/new"; | |
param name="form.method" default="GET"; | |
param name="form.context" default=""; | |
param name='session.siteid' default='default'; |
Instructions for getting an ELK stack set up quick on Mac. Paths are opinionated. You'll have to infer and change. Sorry mate. 🍰
Install Homebrew if not already. You probably have. If not, you should.
brew install elasticsearch nginx
<!--- Drop these methods in your Site or Theme contentRenderer.cfc, and get the status with $.getContentStatus() ---> | |
<cffunction name="getContentStatusID" output="false"> | |
<cfset var statusid = '' /> | |
<cfif $.content('active') gt 0 and $.content('approved') gt 0> | |
<!--- 2: Published ---> | |
<cfset statusid = 2> | |
<cfelseif len($.content('approvalstatus')) and $.content().requiresApproval()> | |
<!--- 1: Pending Approval ---> | |
<cfset statusid = 1 /> | |
<cfelseif $.content('approved') lt 1> |
<!--- insert this in navbar.cfm in the appropriate place inside the MuraBootstrap theme to see an Edit Profile or Logout link if a user is logged in. | |
This example also outputs the users name into the nav bar. ---> | |
<cfif $.currentuser().isLoggedIn()> | |
<div class="pull-right"> | |
#$.currentUser().getFname()# #$.currentUser().getLname()# | |
<a href="/?display=editprofile" class="btn btn-default">Edit Profile</a> | |
<a href="/?doaction=logout" class="btn btn-default">Logout</a> | |
</div> |
Restoring:
replace the file ~/Library/Preferences/com.googlecode.iterm2.plist with your backed up version.
run defaults read com.googlecode.iterm2
and killall cfprefsd
to apply the changes:
Editing:
Quit iTerm
Edit the plist
Run defaults read com.googlecode.iterm2
and killall cfprefsd
Open iTerm
<cfset itKids = $.content().getKidsIterator() /> | |
<cfif itKids.hasNext()> | |
<cfloop condition="itKids.hasNext()"> | |
<cfscript> | |
item = itKids.next(); | |
if ( item.getType() == 'Gallery' ) { | |
if(item.getURLTitle() == "#$.content('URLTitle')#-renderings"){ | |
WriteOutput('WOHOO! #item.getURLTitle()# Matches!<br/>'); | |
// Get the Images | |
request.imagesRendering = item.getKidsIterator(); |
<cfset itKids = $.content().getKidsIterator() /> | |
<cfif itKids.hasNext()> | |
<ul> | |
<cfloop condition="itKids.hasNext()"> | |
<li> | |
<cfscript> | |
item = itKids.next(); | |
fileid = item.getValue('fileid'); | |
if ( item.hasImage() ) { |
<cfscript> | |
public any function onAfterContentSave($) { | |
// reference the new bean that was created | |
var newBean = arguments.$.event('contentBean'); | |
// reference to the OLD bean | |
var oldBean = arguments.$.event('activeBean'); // can also use 'currentBean' to access the same bean | |
// you can now reference any of the attributes of the new bean ... | |
WriteDump(var=newBean.getAllValues(), abort=true); |