Saturday, January 3, 2009
Moving Blog
In an effort to consolidate domains I will be moving the content of this blog over to FrankKumro.com. This move will take place over the next few days, and I will update the blog posts with their new URL so you can update your bookmarks.
| Reactions: |
Thursday, November 13, 2008
Setting up Syntax Highlighter for Blogger
If you have a Blogger account and wish to use the nifty javascript Syntax Highlighter functions follow the instructions below.
Download Syntax Highlighter
Once you are editing the html find the < head > tag and insert the following on the lines below it.
Make sure to correctly insert the path to the files for the location that you uploaded them to.
Turn on Syntax Highlighting
find the < /body > tag and insert the following above it.
Once again update the path to the clipboard.swf file. Save the layout and then you can start using the syntax highlighter.
Notes:
You must add the links to the source files for which languages you want to highlight. This example only includes the xml,php,java highlighting links.
Download Syntax Highlighter
- You can download the files needed from the google code project page download list
- Uncompress the rar file and upload to the server of your choice ( mine was syncoder.com ).
- Write down the path to these files for later use
Once you are editing the html find the < head > tag and insert the following on the lines below it.
< link href='http://example.com/css/SyntaxHighlighter.css' rel='stylesheet' type='text/css'/> <script language='javascript' src='http://example.com/js/shCore.js'/> <script language='javascript' src='http://example.com/js/shBrushPhp.js'/> <script language='javascript' src='http://example.com/js/shBrushXml.js'/> <script language='javascript' src='http://example.com/js/shBrushJava.js'/>
Make sure to correctly insert the path to the files for the location that you uploaded them to.
Turn on Syntax Highlighting
find the < /body > tag and insert the following above it.
<script language='javascript'>
dp.SyntaxHighlighter.ClipboardSwf = 'http://example/css/clipboard.swf';
dp.SyntaxHighlighter.HighlightAll('code');
</script>
Once again update the path to the clipboard.swf file. Save the layout and then you can start using the syntax highlighter.
Notes:
You must add the links to the source files for which languages you want to highlight. This example only includes the xml,php,java highlighting links.
| Reactions: |
Tuesday, November 11, 2008
Post to test syntax highlighting
This post is only to test if syntax highlighting works, and probably will be deleted.
class Foo {
function __construct()
{
// empty
}
}
| Reactions: |
Saturday, September 6, 2008
CodeIgniter: Model loading and non object error
I was playing around with CI today and created a user folder in the model folder. Inside the user folder I have a Loginmodel.php file with the Loginmodel php class inside. I load the model with $this->load->model('loginmodel'); but then when I want to call a method on the Loginmodel object I get the following.
Fatal error: Call to a member function user_login() on a non-object in /home/username/public_html/example.com/public/ci/application/controllers/user/login.php on line 20
To fix this I specified the object name upon load, and I used the class name.
$this->load->model('loginmodel','Loginmodel');
This fixed all the issues, however it should have worked the first way. Any idea why it didnt?
Fatal error: Call to a member function user_login() on a non-object in /home/username/public_html/example.com/public/ci/application/controllers/user/login.php on line 20
To fix this I specified the object name upon load, and I used the class name.
$this->load->model('loginmodel','Loginmodel');
This fixed all the issues, however it should have worked the first way. Any idea why it didnt?
| Reactions: |
Thursday, September 4, 2008
Xcache Simple Test
On a simple install of CodeIgniter I tested the "Page Rendered" time as reported by Codeigniter with and without Xcache. My setup is Ubuntu 8.04, nginx 5.33, mysql 5, php5. Without Xcache the page rendered in ~.05 seconds and with Xcache the page rendered in ~.001 seconds. I will post more once I have a larger code base to test on.
| Reactions: |
Wednesday, September 3, 2008
CodeIgniter Textmate Bundle
If you plan on working with the CodeIgniter framework using Textmate this plugin is worth a look. So far it has proved very useful, be sure to check it out.
CodeIgniter Textmate Bundle
CodeIgniter Textmate Bundle
| Reactions: |
Monday, July 14, 2008
IDE's getting in the way - Eclipse
For some time I was all for a nice IDE, something with all my tools neatly organized in one package. After years of using them and then going back to a good text editor (like Textmate or Kate) and a shell I now really hate them. I have to use one at work, due to the packaged emulator, which is horrible. It's built on top of eclipse which is bloated, and provides no improvments over a text editor. So bundle that with a slow, unresponsive GUI and horrible emulator and you have a great enviroment to work in!
Note: I am not including Visual Studio in this rant
Anyone have good stories of IDE's ?
Note: I am not including Visual Studio in this rant
Anyone have good stories of IDE's ?
Subscribe to:
Posts (Atom)