from database to excel (Missing files in the bakery)

2009-07-02 Thread mrg

Sorry to bring this up again.  If anyone has the files for the bakery
article 
http://bakery.cakephp.org/articles/view/generate-excel-spreadsheets-from-your-database
I would be most appreciative.  Rather than re-inventing the wheel
again...  This link seems to be broken again: 
http://dev.eimermusic.com/cake_excel_writer/

cheers

matt
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Error when including prototype and scriptaculous in layout template

2009-01-22 Thread mrg

Turns out I had neglected to read the FAQ on scriptaculous requiring
all .js files to be available - or specify which ones you need!

Hope this helps someone.

matt

On Jan 21, 3:26 pm, mrg matthew.gill...@gmail.com wrote:
 On Oct 12 2008, 12:37 am, ORCC oskar...@gmail.com wrote:

 [..trimmed...]





  The page seems to load correctly, altough the Firefox's error console
  issues the following errors:

  Error: syntax error
  Source File:http://MY_DOMAIN/gmg/js/sound.js
  Línea: 1
  Código fuente:
  !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

  The code is a missing_controller page generate by cake in the
  scriptaculous loading, because the JS controller is missing. (This
  is the globlal object in scriptaculous that loads some scripts like
  sound, dragdrop and others)

  What is the solution for this trouble?

 I have exactly the same problem.

 In my view this generated the error:

 ?php echo $javascript-link('prototype',false);
    echo $javascript-link('scriptaculous',false); ?

 But this was OK:

 ?php echo $javascript-link('prototype');
    echo $javascript-link('scriptaculous'); ?

 Inline vs in header...

 I am using v1.2 of CakePHP.

 Does anyone have any ideas?  Not sure where it is gettingsound.js
 from
 But functionally the page works fine.

 matt

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Error when including prototype and scriptaculous in layout template

2009-01-21 Thread mrg

On Oct 12 2008, 12:37 am, ORCC oskar...@gmail.com wrote:

[..trimmed...]


 The page seems to load correctly, altough the Firefox's error console
 issues the following errors:

 Error: syntax error
 Source File:http://MY_DOMAIN/gmg/js/sound.js
 Línea: 1
 Código fuente:
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

 The code is a missing_controller page generate by cake in the
 scriptaculous loading, because the JS controller is missing. (This
 is the globlal object in scriptaculous that loads some scripts like
 sound, dragdrop and others)

 What is the solution for this trouble?


I have exactly the same problem.

In my view this generated the error:

?php echo $javascript-link('prototype',false);
   echo $javascript-link('scriptaculous',false); ?

But this was OK:

?php echo $javascript-link('prototype');
   echo $javascript-link('scriptaculous'); ?

Inline vs in header...

I am using v1.2 of CakePHP.

Does anyone have any ideas?  Not sure where it is getting sound.js
from
But functionally the page works fine.

matt

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Stop Users From Going Back After Logout

2007-12-17 Thread MrG

Hi Chris, I was looking for those two tutorials in your blog but can't
find none.

Regards

On Dec 4, 6:11 pm, Chris Hartjes [EMAIL PROTECTED] wrote:
 On Dec 4, 2007 12:49 PM, Joyce [EMAIL PROTECTED] wrote:



  Hi,

  I have question regarding how to prevent users from going back to the
  application after they have logout.

 I suggest you use the Auth component if you are using CakePHP 1.2.
 Since I'm a shameless self-promotor, there are two tutorials on using
 the Auth component on my blog.

 --
 Chris Hartjes

 My motto for 2007:  Just build it, damnit!

 @TheKeyboard -http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Oracle connectivity with CakePHP

2007-10-16 Thread MrG

This is very wrong but I didn't had the time to make this better.
Hopefully there will be someone that will correct me.. if not.. at
least, this works.

I dbo_oracle.php that you will find in the core libs I changed (my
head is going to roll) the connect function to this:

function connect() {
$config = $this-config;
$tns = 
(DESCRIPTION =

(ADDRESS_LIST =
  (ADDRESS 
= (PROTOCOL = TCP)(PORT = 123)(HOST = 1.2.3.4))
)

(CONNECT_DATA =
  (SID = 
MyBD)
)
  )
   ;

$this-connection = oci_pconnect($config['login'],
$config['password'], $tns, AL32UTF8);


if ($this-connection) {
$this-connected = true;
if (!empty($config['nls_sort'])) {
$this-execute('ALTER SESSION SET 
NLS_SORT='.$config['nls_sort']);
}

if (!empty($config['nls_comp'])) {
$this-execute('ALTER SESSION SET 
NLS_COMP='.$config['nls_comp']);
}
$this-execute(ALTER SESSION SET 
NLS_DATE_FORMAT='-MM-DD
HH24:MI:SS');
} else {
$this-connected = false;
}
return $this-connected;
}

I think I could have TNS working in the database configuration file..
or there is a better way.. I said I didn't had much time, so please
don't flame me :)

Btw my class configuration file:

class DATABASE_CONFIG {

var $default = array(
'driver' = 'oracle',
'persistent' = false,
'login' = 'user',
'password' = 'password',
'database' = 'scheme',
'prefix' = ''
);


}

Hope this will help you

On Oct 15, 10:29 pm, Kristopher [EMAIL PROTECTED] wrote:
 I was wondering if it might be smart to actually define the variables
 in some PHP file using:

   PutEnv(ORACLE_SID= ... );
   PutEnv(ORACLE_HOME= ... );
   PutEnv(TNS_ADMIN= ... );
   ...

 The problem is being a newbie to CakePHP, I'm not sure is this is a
 good idea (to actually try to solve my problem) and the other issue is
 that I am uncertain as to which PHP file I should place these
 statements in.

 Anyone care to comment?

 Thanks.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake Mysql UTF-8 :(

2007-09-01 Thread MrG

I solved my problems with UTF-8 by using this alter command after the
creation of my database:

ALTER DATABASE
CHARACTER SET utf8
DEFAULT CHARACTER SET utf8
COLLATE utf8_general_ci
DEFAULT COLLATE utf8_general_ci
;

And in cakephp database configuration:

var $default = array('driver' = 'mysql',
'connect' = 
'mysql_connect',
'host' = 
'host',
'login' = 
'login',
'password' = 
'password',
'database' = 
'database',
'prefix' = '',
'encoding' = 
'UTF8');

No need to change core classes.

Oh.. and every editor I use for working with php and ctp files are
using UTF-8 encoding too. And on the top of every web page I have
also:
meta content=text/html; charset=UTF-8 http-equiv=content-type /

Regards

Gonçalo Afonso


On Aug 31, 6:03 pm, Mech7 [EMAIL PROTECTED] wrote:
 Thanks this works great with me in 1.2 :) would be nice if this was
 added in database.default.php or atleast in the comments.

 On Aug 31, 6:44 pm, djiize [EMAIL PROTECTED] wrote:

  if you have Cake 1.2, add 'encoding' = 'utf8' in conf/database.php
  if you have Cake 1.1, call query(SET NAME 'UTF8' ) just after
  connexion (don't remember if in database.php or app_model.php)

  On 31 août, 18:36, Mech7 [EMAIL PROTECTED] wrote:

   Ah that is great google can't handle them either :D here is what it
   looks with me:

  http://img124.imageshack.us/img124/2272/characterhellko6.gif

   On Aug 31, 6:30 pm, Mech7 [EMAIL PROTECTED] wrote:

Does anybody know how to save utf8 charachters properly in Cake.. when
i save special characters they get saved very weird in mysql for
exmaple:   becomes 

The database table is set to utf8_general_ci and in the html it is set
to utf8 too.. meta http-equiv=Content-Type content=text/html;
charset=utf-8 /

The problem seems to come when saving to mysql, does anybody know how
i can fix this ?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---