Well I have been trying to get my Virtual server running on Virtualbox and hit across the problem of "sockets not connecting" whenever trying to run an email method.

My custom CMS uses gmail to route mail through, so I really should have seen the problem straight away, but for those that also use a gmail setup to send email from their scripts, "Could not connect to socket" actually means.

"You dont have OpenSSL installed dummy!"

So I installed OpenSSL and its all running nicely.
Well, this has been an ongoing thing for me of late.
I love SPAW Editor, but I have had trouble integrating it into my CodeIgniter CMS.
In particular, the quicklinks to link to my database pages.

After much deliberation, it seems, Ive been going around it the wrong way.
First off I used this fellows custom integration, which seemed to work well out of the box, but for the life of me couldn't figure out how to integrate the quicklinks.

Easy solution:

After loading the library in your 'Controller', call it like this

//    Load up Spaw Editor
$config = array(
'name'    => 'content_data[body]',
'caption' => 'Images',
'content' => $data['content_data']->body
);

$this->load->library('spaw', $config);
           
$quicklinks = $this->admin_content_model->get_quicklinks();
$this->spaw->setConfigItem("quick_links", $quicklinks, SPAW_CFG_TRANSFER_SECURE);

Obviously you will have to create a function in "admin_content_model" model to pull the links from your database.

Basically just 2 lines of code in the Controller passing the Spaw instance back to the view.

Worked a treat!

 

Categories

Latest Posts

RSS