- Clone o repositório: https://github.com/Kooboo/CMS.git
- Execute o arquivo CMS\Kooboo.CMS\Publish\publish.bat para que ele gere o projeto do website para o visual studio.
- O projeto estará na pasta CMS\Kooboo.CMS\Publish\Web. Copie todo o conteúdo desta pasta. Este será o seu projeto a partir de agora. Neste ponto já é possível rodar�, customizar o site, criar conteúdo. O CMS está pronto para ser utilizado, mas todo o conteúdo está sendo armazenado em XML. Precisamos trocar o provider.
- Para trocar o provider, descompacte o arquivo que se encontra em: CMS\Kooboo.CMS\Publish\Released\Content_Providers.zip. Para utilizar SQL Server, copie os arquivos da pasta SQLServer\Kooboo.CMS.Content.Persistence.SQLServer.dll e SQLServer\SqlServer.config para a pasta Wev\bin do seu projeto, gerado nos passos 1 e 2.
- Configure a connection string do arquivo SqlServer.config (veja mais em http://wiki.kooboo.com/?wiki=Setup_database_provider#SQLServer)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| News.find_each(&:save) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected override void Seed(Inspire.Models.DBContext context) | |
| { | |
| WebSecurity.InitializeDatabaseConnection( | |
| "DefaultConnection", | |
| "UserProfile", | |
| "UserId", | |
| "UserName", autoCreateTables: true); | |
| if (!Roles.RoleExists("Administrator")) | |
| Roles.CreateRole("Administrator"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <root> | |
| <!-- | |
| Microsoft ResX Schema | |
| Version 2.0 | |
| The primary goals of this format is to allow a simple XML format | |
| that is mostly human readable. The generation and parsing of the | |
| various data types are done through the TypeConverter classes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ln -s /Applications/TextMate.app/Contents/Resources/mate /bin/mate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| declare @NewCollationName sysname | |
| set @NewCollationName = 'SQL_Latin1_General_CP1_CI_AI' | |
| select | |
| 'ALTER TABLE ' + QUOTENAME(SCHEMA_NAME(st.schema_id)) + '.' + QUOTENAME(st.name) + | |
| ' ALTER COLUMN ' + QUOTENAME(sc.name) + ' ' + styp.name + '(' + | |
| CASE WHEN sc.max_length = -1 THEN 'max' ELSE CONVERT(varchar(10),sc.max_length) END + | |
| ') collate ' + @NewCollationName + ' | |
| go | |
| ' | |
| from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var body = Regex.Replace(HttpUtility.HtmlDecode(item.Body), "<.*?>", string.Empty); | |
| var size = body.Length <= 200 ? body.Length - 1 : 200; | |
| <p>@Html.Raw(body.Substring(0, size))...</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| html_content = html_content.gsub(/<script.*?>[\s\S]*<\/script>/i, "") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="player-id"></div> | |
| <script> | |
| //Load iframe api | |
| var tag = document.createElement('script'); | |
| tag.src = "http://www.youtube.com/iframe_api"; | |
| var firstScriptTag = document.getElementsByTagName('script')[0]; | |
| firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); | |
| var pauseFlag = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RewriteEngine On | |
| RewriteBase / | |
| RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
| RewriteRule ^(.*)$ http://%1/$1 [R=301,L] |