If you don't already have Eclipse PDT already go to eclipse.org/pdt and find a Stable build.
In Eclipse go to the Help > Software Updates > Find and Install
Select "Search for new features to install" and Click "New Remote Site"
Fill in the dialog with: Name: Subclipse URL: http://subclipse.tigris.org/update_1.4.x
"Subclipse" should be checked, Click Finish
Select the features to install:
Drop down the arrow next to "Subclipse 1.4.x" to expand the packages contents. Only check the following items: Subclipse SVNkit Adapter (Important, the default JavaHL adapter doesn't support SSH and public key authentication... easily)
Accept the agreements and then click finish. When the packages are done downloading, click "Install All". Eclipse will ask you to restart eclipse, click yes.
Quick usage guide:
Your first checkout: Right click in explorer > New > Project
SVN folder > Checkout projects from SVN > Next > Create a new repository location
Enter the location of the project you’re checking out e.g. svn+ssh://example.com/my_repo/
Press Next
An Enter SSH credentials dialog will appear
Username: (your username)
Select "use private key authentication"
Choose the Private key authentication file
Click okay
Enter your first and last name, and check "Save author name"
Select the folder that you need to check out from the repository
Click next and then finish.
After First Checkout:
Right click (Eclipse Explorer) > New > Project > SVN > Checkout Projects from SVN
Click next choose the previously created repository location, Next
Choose what project you want to checkout, Next
If you want to import the project as a specific type (PHP project) select "Check out as a project configured using the New Project Wizard"
Well been pretty busy with writing the CMS, heres a small code snippet refering to the previous post. I've written up a full templating class but I will show that off layer.
<code> <?php if($content['type'] == 'logical'){ // Gathers the executed php file's output into a variable ob_start(); if(@eval('?>'.$content['body']) === FALSE){ echo"There was a problem parsing the logical content: " . $content['path'].':'.$content['id']; exit; } $content_data = ob_get_clean();
} elseif($content['type'] == 'simple'){ // Gathers the content text and runs it as a HEREDOC variable. if(@eval("\$content_data = <<<TEMPLATE\n".$content['body']."\nTEMPLATE;\n") === FALSE){ echo"There was a problem parsing the simple content: " . $content['path'].':'.$content['id']; exit; } } ?> </code>
I love listening to developers talk about the philosophical issues of web
development. Such as separation of style, structure, code, design,
business-logic, presentation and WHATEVER ELSE. I believe everybody thinks its
ideal and nice... but the difference comes in actually implementing it. It can
become a task of its own. Some people don't think its worth the trouble. I think
the worst solution is solutions like smarty where they basically create a new
language for templating... when PHP is a templating language in its self. I do
see some benifits of smarty but I just think it makes sense.
This is my break down of what I think is makes sense.
Website Templates:
Most of the time developers give designers less credit than they deserve.
I believe a designer can modify a template with some PHP foreach loops and
insert variables accordingly with out destroying an application. They don't have
to create the foreach loops... that's why its called a TEMPLATE the developer
should create all of the logic before hand.
The Logical Site Template
(for developers and designers!)
Functionality
This template will simply be a PHP file. Maybe a file maybe named
my_template.tpl.php or something.
It should only contain variables <?=$my_variable?> or <?php echo
$my_variable; ?>
and simple base logic and variables. <?php foreach($menu as $page_name
=> $page_url){ ?> <!-- Insert html here --> <?php } ?> or
something along those lines... whatever you prefer. Just make sure you limit
your self to very basic page display logic.
Absolutely no functions or crazy stuff in here.
Reasoning
Why?
Your designer and developer are comfortable with the designer editing inside
of a php file (In my opinion no big deal, no excuse to not know the very basics
of PHP if your a web designer)
More flexibility
LESS TEMPLATE FILES (You don't have to create a template for every foreach
block
Why Not?
Not TRUE separation of logic and design.
May start to get ugly if theres too much logic going on
No real physical constraints on what can be used and what cannot
The Simple Site Template
(for developers and designers!)
Functionality
This will container absolutely no logic. It will only be able to use php
variables. Works exactly like a like a php HEREDOC. Example would be. <b>$my_variable</b> or
accessing array values with {$my_array['foo']}
I think <!--$my_variable--> or /*$my_variable*/ should be available as
well to work just the same for validation and editor purposes. Obviously the
extra tag content will be stripped away by the variable value.
This type of template is REALLY php... just can only access
variables.
Why?
You think your designer has absolutely not concept of PHP
You want to keep absolute separation of logic and presentation
Why Not?
You can not use loops in the file, loops will be done through a separate
template file. (this can become daunting)
Choosing Between the two
Choosing which template to use should be up to the developers philosophy,
time, and designers knowledge, and both of your patience.
If your a really hard core logic/design segregationist. Then use the "simple
site template" it is also very simple for the designer.
Use simple site template If you realize that your designer isn't retarded,
and can work with a simple php file. As well as If you have discipline to work
with the php file without introducing tones of logic and can keep functions
out.
Content Templates
(for end users)
Functionality
This should be used for end user variables. THIS IS NOT BB CODE. The end user
should be able to use whitelisted HTML which is pre validated (best solution by far). I
choose to use brackets because it doesn't require the shift key
which means its quickly accessible and simple. Its also aesthetically pleasing
and a clear separator.
P.S.
Working on a very small templating/tag system that goes with this philosophy.
Hopefully I can finish it up and post the code this weekend!
Well things have been well. My wonderful cousin has been very nice to me and has allowed me to stay at her place for a while till I get settled in California. I've been here for a while doing the whole job search thing trying to get something in my field instead of flipping burgers or something silly like that.
I'm currently an intern at a web development company in Irvine and awaiting to see if I get the full time permanent position that would be perfect for me. I find out in exactly one month if I'm going to be a permanent employee. If that is the case I will probably be moving to Irvine. Depending on how the full time pay goes and I figure out my finances.
The employees there are very bright, and it has been a really humbling experience for me. I had a project on my first day It was to build some special administration modules for the companies CMS. The modules where to perform CRUD operations on XML files that where used by flash embedded on the front page of the web site. It was challenging because the companies CMS was totally new, weirdly written and bulky. It was really confusing to learn but I got the hang of it. I've also been working on writing some XHTML valid code along with working with some YUI animation stuff.
I'm no longer with my "ex-girlfriend" Leah, but we are still friends. Which is really cool because I don't know many people from around here... except for Avalynn and Dannie. Avalynn is pansy because she didn't sneak out of her house to hang out with me last night! However, I went out with Dannie today she was really nice and fun to talk to. It was good that I actually got away from my computer this weekend.
I'm no longer in the Marine Corps. I was officially released May 12th 2008! It has been a long road, Four years, of my life spent in the world of the Marines. Some great times, alot rough times, and a hell of alot of bullshit. But I'm proud of my self, and glad I did it and I'm ready to move on with my life. I just hope that those four years won't be anything to what I accomplish in the future.
Well Its been a while since I've posted mostly due to a bug in my posting system that kept on appearing every time I tried to make a post. I was too busy and haven't had enough time to fix something so small. Well its fixed now!
I'm very happy to say the least, I'm back to my old ways. Sitting in front of my computer and tinkering, developing, learning and experimenting with web development technologies!
So far I have been playing alot with regular expressions to parse through a database from hell. Extracting addresses and correcting the ill formed ones with Google Maps API. Through geocode, its a very exciting piece of the Map's API. I love it.
Also have been just doing alot of general web surfing, reading web design articles, watching YUI videos, and just doing some surfing in general.
The culprit? UTF-8 with BOM! This drove me crazy...
1:<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/ ... .php:1) in <b>/home/ ... .php</b> on line <b>366</b><br/>
I started school a couple of day's that's making my life a hell of a lot more busy and I love it! I love being busy. Its great having something that needs to be done at all times.
I'm taking History 102 which is U.S. History from 1890's to modern times. It's an 8 week course so its pretty compact. My teacher (Dr. Bagnall) is great. The class is easy but I always learn alot from him.
I'm also taking Physical Geography, I haven't had the teacher before but from my 1st day I know I'll have a bit of a challenge, which is good. But I hope it doesn't end up like my Economics challenge which ended up in a D.
Also lately I have been really busy with work. we have been very busy packing a lot of parachutes. Last night, I had to drive from Camp Pendleton to 29 palms yesterday to drop off some parachutes for 3rd Recon. I drove this huge ass truck which was kind of fun. But it wasn't worth coming home late... Afterwards I was beat, I guess I didn't have enough sleep the night before. I walked in my room and fell asleep after trying to take off my first boot. So I slept in my uniform with one boot missing which was kind of funny because my buddy Cano walked in and was like "What the hell happened to you?" or something along those lines.
OH, and I'm SO happy that I finally got a P.O box because the military mail is incredibly slow and unreliable. So much so that last years income tax that I filed and was supposed to receive through the mail was lost. I had to call them up and deal with that.
It's not technically a P.O Box because its a residential address and not an official USPS location, its privately owned. The service there was great, I walked filled out some basic information and a signature and he handed me my key and a card with all my information and address.
So my new address is:
Daniel Lopez 603 SEAGAZE DR # 112 Oceanside, CA 92054
As I was creating this monstrosity I already knew it was probably going to be really confusing and possibly pointless. Well, the objective was to have a PHP file find its base directory. Even when its included in another file in another directory. Using a relative URL's to its base... and I couldn't find other solutions for that. So this is what I have... am I crazy or is there a easier way to come up with this same solution? I don't know.
<?php $rel_dir = "../"; // Symbolic Path to base directory
$sys_dir = str_replace("\\","/",realpath(str_replace("\\","/",dirname(__FILE__))."/".$rel_dir)); // System path to base directory
$url_dir = "http://{$_SERVER['HTTP_HOST']}".str_replace(str_replace("\\","/",realpath($_SERVER['DOCUMENT_ROOT'])),"",$sys_dir); // URL to base directory
Uhhh this could be the best web application I have ever seen. Between its amazing interface and brilliant concept this thing is #1 on my list.
Basically it's a quicken money manager type web application that's totally free. I guess they get their money from refering you to ways you can save money. Which is pretty legitimate i guess.
I can't believe i was thinking of actually changing my bank because quicken wouldn't work with it. I spent so much time fiddling with quicken and it took me like 5 seconds to setup mint.
I don’t like using content management systems, I like creating them! I tried to deny the awesomeness of joomla at first, but it didn’t last long after hearing it mentioned a couple of times at a web technologies group meeting. I decided to give it a try and check out some demo videos and such from google tech talks.
Its great, its everything I could imagine and wanted to create with my small CMS. Even a desktop interface that i was thinking about creating for my CMS in adobe air was done for joomla in java. I had some trouble connecting with SITEMan though, i will figure it out tomorrow, the weekend is coming finally!.