Skip to content

Instantly share code, notes, and snippets.

View wastemobile's full-sized avatar

wastemobile wastemobile

View GitHub Profile
@wastemobile
wastemobile / A-Symphony-Workflow.markdown
Last active September 29, 2015 19:28 — forked from designermonkey/A-Symphony-Workflow.markdown
在安裝 Symphony CMS 之前,預先準備好三重主機(開發、測試、正式)的環境,主要是理解 Symphony 如何處理 Manifest 目錄的原理,就能順利規劃工作流程。但事情並不單純,若是安裝過程中移除了安裝檔(為了安全),後續的升級就會出現問題;資料庫的整合也不太容易。總而言之,Symphony CMS 在升級與部署這兩部分,還需要認真思考、並導入更便利的程序才行。

Symphony CMS 工作流程

原文是 John Porter 寫的《A Symphony Workflow》,參考了許多網路上的文章以及 O'Reilly's Version Control with git 一書的內容。

目的是建置一個 Symphony CMS 的開發與部屬環境,規範自己的工作方式,同時作為未來每一專案的開發基礎。

ps.Symphony CMS 確實只是個 PHP 的程式,而 PHP 的部署又遠比其他程序簡單,但 Symphony CMS 之所以部署起來複雜的原因,是因為使用了 git submodules 管理所有的外掛,外掛的安裝有可能會修改資料庫結構。Symphony CMS 的升級流程遠比想像中複雜難搞,這可能是未來的 Symphony CMS 必須審慎思考並重新架構的環節。

免責聲明

@wastemobile
wastemobile / hack.sh
Created March 31, 2012 13:12 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@wastemobile
wastemobile / EventTutorial.md
Created April 20, 2012 16:50 — forked from brendo/EventTutorial.md
Symphony Events: A Detailed Look

Forms have been an integral part of any interactive site since the dawn of time, they promote interactivity and are usually the most common way users interact with a site. It's commonplace that when a form is submitted, the website will take 'action' and do something with the data and then provide a user with the result. Symphony provides this logic layer via Events.

「輸入表單」一直以來都是動態網站的重要部分,表單也提供了最基本的互動功能。最常見的就是當使用者提交一個表單之後,網站會執行某種「動作」、做了某些事,接著將結果呈現在使用者眼前。Symphony CMS 透過「事件(Events)」提供這樣的邏輯層。

This tutorial assumes you have a basic understanding of how Events work in Symphony (if not, this may be a good introduction) and are semi comfortable writing some PHP code. I'll be showing you some of the lesser known features of Symphony Events, including event priority, event chaining and a brief demonstration of how to write a custom Event. The difficulty level progresses as we go through, but with any luck you'll be able to learn a thing or two :)

這份教學文章假設你已經對

@wastemobile
wastemobile / EventTutorial.md
Created August 18, 2012 06:31 — forked from brendo/EventTutorial.md
Symphony Events: A Detailed Look

表單(Forms)是網站互動最基本的元件,使用者填表後送出(submit),主機會進行一些動作(action),儲存了資料,並將結果呈現給使用者。 Symphony CMS 提供了事件(Events)這個功能來進行表單處理。

這份教學假設您已經熟悉 Symphony CMS 的使用 (萬一不是, 這裡有對 Symphony CMS 最基本的介紹) ,而且還要能夠寫一點 PHP 程式碼。教學中觸及 Symphony CMS Events 比較少被人談到的進階功能,包含了事件的優先權、事件的串接,也談到一點點如何寫一個自製的事件。

開始

劇本概觀

我們的客戶需要讓用戶提交他們剛買的新車,主要是提供新車的資料,但也需要紀錄從哪裡買到這輛車的資訊。因此這份表單必須一次更新 Symphony 的兩個內容表(Sections):車,與經銷商。

@wastemobile
wastemobile / prepareImportValue.md
Created August 18, 2012 09:05 — forked from brendo/prepareImportValue.md
Introducing the XML Importer's prepareImportValue function

Introducing the XML Importer's prepareImportValue function

The XML Importer extension is widely used to help users import XML content into their Symphony sections. Developers enter a URL that returns XML and then write XPath to map values to their corresponding fields, but sometimes this results in a field not receiving a value, an incorrect value, or the XML Importer failing to import anything.

While not always the case, sometimes the XPath could be wrong, namespaces weren't added or you've discovered a bug (log it, but it can also be because a Field doesn't know how take the value you've given it and save it. This short article will explain how you can ensure that your field is compatible with the XML Importer, thanks to the prepareImportValue function.

Why is it needed?

Fields in Symphony have two existing function's, checkPostFieldData and [processRawFieldData]

@wastemobile
wastemobile / MIT-LICENSE.txt
Created November 29, 2012 07:11 — forked from jgarber/MIT-LICENSE.txt
Responsive video
Copyright (c) 2011 ZURB, http://www.zurb.com/
@wastemobile
wastemobile / mountain-lion-brew-setup.markdown
Created December 10, 2012 15:31 — forked from myobie/mountain-lion-brew-setup.markdown
Get Mountain Lion and Homebrew to Be Happy

讓山獅(Mountain Lion)與 Homebrew 快樂並存

1) 安裝 XCode(目前版本 4.5.2)在 /Applications

從 Mac App Store 免費下載安裝。

2) 安裝命令列工具(Command Line Tools)

在 XCode 的 Preferences > Downloads 可以選擇安裝 command line tools。

  • Draft Number: 1
  • Date: 2013-04-14
  • Author: John Porter @designermonkey

Symphony Next

This is all still a little new to me, so forgive me if this sounds naive, or you all have already thought about this and it's obvious, but I've been thinking about how we actually build Next. (I like this as a project codename).

Proposing the Application

Susy Tutorial

For this tutorial I'm assuming you are already comfortable with CSS, Sass (I'll use the SCSS syntax) and Compass. Please get set up with each one of those before attempting to use Susy. Sass and Compass both have their own setup instructions and tutorials that you can use.

There is also reference documentation in the works.

What Susy Does

CSS Systems

@wastemobile
wastemobile / README.md
Created September 3, 2013 15:08 — forked from mhayes/README.md

Enabling noConflict mode

Using a default Foundation download you'll see some code like this:

<script>
document.write('<script src=' +
('__proto__' in {} ? 'js/vendor/zepto' : 'js/vendor/jquery') +
'.js><\/script>')