To be able to work fully on web sites development you obviously need a modern and convenient editor. There is a plenty of proprietary software for that, but we would like to emphasize software free absolutely which has powerful functionality and at the same time is easy and user friendly. This software is Codelobster PHP Edition.
Let’s review some important features and advantages of this application:
All code is highlighted by different colors depending on its type besides the mixed code is also supported so HTML code will be highlighted as HTML, PHP code as PHP, and JavaScript code as JavaScript in the same file. There is an ability to select a certain color schema including popular IDEs.
There is powerful HTML, PHP, CSS and JavaScript autocomplete including HTML 5 and CSS3. PHP project structure is recognized completely and a full list of methods drops down in appropriate places.
HTML/CSS inspector by type of FireBug allows easy correlating selected element of pages with code and proper style.
There are several special plugins for working with:
lexa-tools library is not as much a framework as a set of utililies (tools). You are free to organize the site as you’d like. No special folder structure is required. No need to declare any classes. No config files and no magic conventions. The library just arms you with a handy procedural API.
Most ideas were borrowed from Ruby on Rails when I was porting an application from Rails to PHP. If you have had experience with Rails then you would notice a lot of familiar concepts and names.
Visit the lexa-tools homepage
Hello,
I am writing a CakePHP 1.2 app. I have a list of people that I want the user to be able to filter on different fields. For each filterable field, I have a drop down list. Choose the filter combination, click filter, and the page shows only the records that match.
In people_controller, I have this bit of code:
$first_names = $this->Person->find('list', array( 'fields'=>'first_name', 'order'=>'Person.first_name ASC', 'conditions'=> array('Person.status'=>'1') )); $this->set('first_names', $first_names);
(Status = 1 because I am using a soft delete.)
That creates an ordered list of all first_names. But duplicates are in there.
Digging around in the Cookbook, I found an example using the DISTINCT keyword and modified my code to use it.
$first_names = $this->Person->find('list', array( 'fields'=>'DISTINCT first_name', 'order'=>'Person.first_name ASC', 'conditions'=> array('Person.status'=>'1') ));
This gives me an SQL error like this:
Query: SELECT `Person`.`id`, DISTINCT `Person`.` first_name` FROM `people` AS `Person` WHERE `Person`.`status` = 1 ORDER BY `Person`.`first_name` ASC
The problem is obvious. The framework is adding Person.id to the query. I suspect this comes from using 'list'.
I will use the selected filter to create an SQL statement when the filter button is clicked. I don't need the is field, but can't get rid of it.
Thank you, Frank Luke
I have a link on the main page that is only accessible if they are logged in. However, if this link is clicked, I want to show a custom error message on the login page (a custom 'Message.auth').
i.e. I want (pseudo code)
if (referer == '/users/reserve'){ Message.auth = 'Please log in to reserve tickets'; } else { Message.auth = 'Please log in to access that page'; }
Where would I put this bit of code?
I have an action (view for example) in a controller that is called from multiple other actions in other controllers. How is the best way to create a “Back” button that will take me back to the page that got me here?
I’ve used named parameters like “back_controller” and “back_action” and that works fairly well but they get awkward when the page has a form that gets submitted. I have to be sure to pass those parameters as hidden fields or in the form url and then look for them after the form has been processed.
Is there some kind of stack or other solution that anyone else has come up with that handles this situation better? I see this problem in a lot of my projects and I’ve yet to come up with a good solution.