cakephp url modification: remove action and add slug inflector

I’m trying to remove the action in the cakephp url and add a slug inflector, to be more clear this is my expected output:
from this: example.com/posts/view/81/This is a test post
to this: example.com/posts/This-is-a-test-post

This is my current code:
That gives me this output: example.com/posts/view/This is a test post

Controller:

public function view($title = null) {
        if (!$title) {
            throw new NotFoundException(__('Invalid post'));
        }
        $post = $this->Post->findByTitle($title);
        if (!$post) {
            throw new NotFoundException(__('Invalid post'));
        }
        $this->set('post', $post);
    }

view.ctp:

$this->Html->link($post['Post']['title'], array('action' => 'view', $post['Post']['title']));

I also tried this one,this link being my reference CakePHP: Use post title as the slug for view method :
Output: example.com/posts/view/21/This-is-a-test-post

Controller:

function view($id) {
        $this->Post->id = $id;
        $this->set('post', $this->Post->read());
    }

view.ctp

$this->Html->link($post['Post']['title'], array('action' => 'view', $post['Post']['id'], Inflector::slug($post['Post']['title'],'-')));

below are the other links that I tried but failed, I also tried the modifying the routes.php but can’t make the proper code to make it work

want to remove action name from url CakePHP
How to remove action name from url in cakephp?
Remove action name from Url in cakephp?

any help/suggestions is appreciated thanks.

Posted in Codes & Scripts | Tagged , , , , , | Leave a comment

How to use ‘this’

All,

I am trying to open one box at a time, the problem is that in my code I am opening all boxes. I have been looking at the use of ‘thi’s to focus on the box you are clicking on but so far have had no success modifying the following. Hoping someone can help:

PHP:
———
//The boxes:…

Posted in Codes & Scripts | Tagged | Leave a comment

Modify Google Earth Mapping Tool

There is a simple Google Earth mapping tool on many websites where a user finds his location on a map and submits his info into a form clicks submit and the form info goes to the website usually by email along with the map image… Required Skills: Programming, Script Installation, Web Design Development, Website Programming

Posted in Custom Requests | Tagged , , , , | Leave a comment

PyQt: Always on top – RDP

How can I make my local PyQt to stay still on top over the Remote Desktop?
I used QtCore.Qt.WindowStaysOnTopHint but this works just for other local applications.
Do you have any ideas?

Posted in Codes & Scripts | Tagged , | Leave a comment

Booking Calendar

I need to come up with a table like this

Attachment 13065 (http://www.codingforums.com/attachments/html-css/13065-booking-calendar-online_booking_calendar.png)

I have a few requirements
1. The pink bars are dragable to another row
2. The pink bars are clickable

my questions are:

Posted in Codes & Scripts | Tagged , | Leave a comment