Your web-browser is very outdated, and as such, this website may not display properly. Please consider upgrading to a modern, faster and more secure browser. Click here to do so.
In your repo navigate to /project/Build.scala
Under your appDependencies add
Navigate to conf/application.conf and add
Create a new lib file in /app/lib/ call it something like ScalateIntegration.scala and copy the follow code into it
To use the templating system now you can reference scalte in your controller like this:
1) The lib file states that your layout file will be location in /views/layouts/default (template_type_extension)
2) Within your template if you dont want to load the layout you can pass an empty string into the layout attribute
ssp: <% attributes(“layout”) = “” %>
3) Within your layout the view file data is passed in a html type variable called content
ssp declaration: @(content: Html)
My current version setup are as follows
build.properties : sbt.version=0.12.2
plugins.sbt: addSbtPlugin(“play” % “sbt-plugin” % “2.1.1”)
"scalate-core_2.10" % "1.6.1"
So recently I had a couple of friends tell me that “All bootstrap sites look the same”. I wanted to write this article to explain that your doing it wrong.
Bootstrap by twitter is a great tool for helping you prototype and get started styling your application quickly and easily. It is meant to give you the foundational CSS that will get you going to create cross browser - responsive designed websites.
So I think the problem why the “incorrect usage” is happening is the bootstrap website. The website shows you the documentation of the core features of bootstrap, which is great. But the download and customize section is what throws off a new comer.
The best way to use Bootstrap is to not get it from their website.
The first thing to do to get started with bootstrap is to decide what kind of CSS compiler you want to use for your project. The two popular options are LESS and SASS.
Why use a compiler you might ask? Well you’ll have to keep reading for that answer. Compilers are amazing tools to help you write better and more organized CSS. They bring you programming logic into css by giving you variables and functions that help create css.
If your into node grab the LESS version of bootstrap files right from
Now if your using any other language outside of node, my recommendation is to use the SASS (ruby) version.
Once you have the source files in your project, you get the same customization options that they give you on the twitter bootstrap website customize page. Just use the variables file.
Bootstrap’s website relies on a 1000 line style sheet on top of Bootstrap.
If you don’t like how something looks and works, now you have the true source of these files to make your changes.
You don’t like the blue that bootstrap uses, change the variable for blue in one place and see the entire stylesheets blue change.
Bootstrap comes with amazing mix-ins (functions) that do all the heavy lifting for you. If you need a clear-fix that will work cross browser, why re-invent the wheel? Just use for SCSS “@include clearfix()”.
If you need rounded corners and need it to be cross browser, why memorize moz-kit and webkit syntax when you can just use “@include border-radius(5px)”, which will generate all the cross browser syntax for you.
Use bootstrap for what it is, a CSS foundation tool to build beautiful cross browser responsive websites, and never have any of your websites look like the default bootstrap styles again.
Hi I am new to CI, I am facing a funny issue. I have a form where I can Add / Edit & Delete Records. I want to have a duplicate check at the time of updating. I tried using several ways, but I am failing ... please help
please gist me your code so i can have a look at what your doing, please also provide me with any errors that your seeing. What not happening thats supposed to happen?
How much do you charge for projects?
Depends on the project, the time it will take, so many factors, thats like asking how much would you pay for a car, depends on the car. I have a lot of people in line and only choose projects that I really believe in.
So today I got the honor of working with the Fedex php api. After hours of hunt no one has built anything better. After reviewing it, i could probably consolidate these 80 Files, about 1000 Lines each page of code into 1 file under 2000 lines.. I think thats what ill just have to do.. Let me know if anyone has any other solutions.
Fedex.. a big boooo to you.. At least your documentation pdf isn’t so bad.. but couldn’t you have made the method names a little bit easier to get.
NEW UPDATE : https://github.com/chonthu/PHPFedexClass
WHERE WOULD YOU MOST LIKE TO VISIT ON YOUR PLANET?
Australia, cant wait to go on the safari. Hopefully next year ill be able to go!
Coming from netbeans, I love the way it did code formatting, one of the biggest things I missed when I made the switch to Sublime Text 2. But then I found a repo that implemented PhpTidy and formatted the code for Wordpress.
So I thought why not just make this amazing and add in a feature set to support codeigniter style guide as well.
Currently Ive added some styling, but its still in progress, the repo didn’t come with menu action or setting page, so I added the menu and setting pages for Sublime will be out in the coming week, if anyone has any “wishes” for the repo let me know.
Currently on the wish list is:
1. In the setting section allow for user to select from available styleguides for popular php frameworks.
2. Allow in settings to turn on and off options such of short php tags and new line brackets.
Check out the original blog post at
These guys are on fire!
To see how it all works
So your using MYSQL for your new codeigniter app and you get to a point in the app where you need to do this.
So as show above, you check if a record exists, if it does you update, if not you insert. This is fast and easy correct? But what if you doing thousand of records and you need some help in performance. Well in Mysqli you have the ability to insert on duplicate all in one query.
Ok thats great, but how can we make this amazingly awesome in codeigniter?? Well its a pain in the ass. But its possible.
$db[‘default’][‘dbdriver’] = ‘mysqli’;
First since codeigniter doesnt allow up to extend the active record class you have to add this section to replace the exisiting section in /database.DB.php
Then once this is done, inside of your application core, youll need to add 3 files.
and finally MY_Loader.php
And then you can use this like this
So what is a CMS? CMS stands for content management system. When thinking about creating a website, choosing a CMS is very important. Not everyone is a software engineer and knows how to code up websites. There are a lot of tools on the internet which engineers have built to allow users to write information, this information is then turned into “website code” and then a website is created from that generated code. This tool is referred to as the CMS.
There are a lot of prebuilt CMS solutions out there, or you can have an engineer build you a custom CMS, molded to fit your needs. This is a very hard decision to make, choosing between a custom and prebuilt CMS. This decision should be made with the sole purpose for creating your website. If your going to choose a prebuilt CMS you need to fit into the following buckets.
1. Content (Blogs, News, Text based data)
2. E-commerce (Online stores, Auctions)
3. A little bit of both of the above with slight more flexibility.
Highlight’s of a CMS: Efficiency, Community, Upkeep
Some Popular CMS solutions for your bucket:
( Note that these suggestion are all written in PHP, a popular server programming language, which is one of the most commonly used in the world next to java)
If your in the Content bucket, then you’ll fit perfectly into Wordpress. Wordpress is a out of the box solution, that is free to download and install on top which ever server you will be hosting your website from. Wordpress usually comes with free out of the box themes and you can be up and running within seconds. Most of the time these themes are not as great so you might end up either paying for a theme or have a engineer develop a custom one for you. Wordpress is the most commonly used CMS in the world. If you can use Microsoft word, you will be able to use Wordpress. The learning curve is very small for Wordpress and it contributes to the reason why its at the top spot.
If you’re in the E-commerce bucket, then you’ll fit perfectly with Magento. Magento offers great tools for managing your products and your inventory. It is the best tool on the market for managing an online store. But most of the time, just managing a store isn’t enough, you need to be able to manage content and build custom features on top of the way the store works.
If your in the third bucket, you’ll fit perfectly with Expression Engine. Expression engine is a paid CMS. Expression engine comes with both content and e-commerce solution plugins bundled in. With a prebuilt CMS you are bound to what the CMS does. Most of the time it is very hard for developers to build on top of these products. Most state of the art CMS solution like the ones above, give a feature called (plugins) this allows for the community members to build extensions to the CMS to added additional functionality. This additional function however is still limited to the general audience and might not have every feature you wish to have.
Prebuilt CMS are usually “open source”, which basically means the code to make the CMS is released to the public, this allows for the community of developers to upgrade and built better feature and keep improving and building on top of the CMS.
So wow, you might be saying, why would I ever need a Custom CMS if there are already so many solution for my needs already made. Most of the time that’s all you need is a prebuilt CMS. All of the CMS solutions one can have an engineer try to build on top of, but because they where initially made for the “general” audience, most of the time the plugins is not as efficient or as custom as it could have been.
Custom CMS solution’s is for project out of the box that doesn’t really fit into the general use case of a prebuilt CMS. A custom CMS is used when one wants his/her website to be very defined to their organization. It is created for just what you need and not built with a million and one features.
With a custom CMS, it is usually mush more expensive than a prebuilt solution. Also because there isn’t a community for a custom CMS like a prebuilt, a lot for the feature cant simply just be added within seconds like a prebuilt CMS. Also because of this your CMS is not open source you have no community updating your CMS feature sets like a prebuilt CMS.
Most of the top fortune 500 companies use a custom CMS, they don’t want to “look like the rest”. Custom CMS allows for “custom” feature sets, defined to your needs. If you not in the top buckets, you cant use a prebuilt CMS. Your needs at that point are far greater.
So to paint a clear picture, lets use two use case study members and see why prebuilt or custom was their pick.
User 1 - John:
John is a well-established writer. He needs a website to be able to share his thoughts about his books and reach out to his readers and hear what they have to say.
John best bet, based on our buckets would be Wordpress. John pays an engineer for a custom designed and implements the site. He creates a blog and start receiving comments from his readers. John saved a lot of time and money and was up in about a week with everything he wanted to do online.
User 2 - Sara:
Sara is also a brand new writer. She needs a website like john to be able to share her thoughts about her book and reach out to her audience. Sara is a little bit more tech savvy than john and started creating digital eBooks which she wants to sell online and also allow her users to download right from her website. Sara also decides to use Wordpress. Sara pays johns designer friend to create her website and her website gets created within 2 weeks. Sara website however doesn’t have an online store yet and no downloadable feature. Sara decided to look for any community plugins to accomplish this with Wordpress. She finds a plugin to create a online store, it doesn’t look the way she wants it, and doesn’t function the exact way she intended. This custom secure downloadable book that allows for security locking on any file she uploads doesn’t have a plugin, she has to think about getting a engineer to build that custom, so she contacts a engineer and the engineer wont be able to build this because of the way files are stored in the Wordpress database the way she intended to have done. If this were a custom CMS project, this feature would have been built without any issues.
Usually speed and optimization is a huge factor when considering a custom solutions. Most wordpress sites reply heavily and alternative-caching mechanism to speed up website because of the amount of feature sets it needed to have to handle “every general situation”.
As stated above, the decision between choosing custom CMS and prebuilt CMS is really based on your website needs.
Page 1 of 2