NickM
Posts: 44
|
Posted: 07/04/2004, 4:14 AM |
|
Can you add php code snippets (found all over then net) to CCS without having to alter them to suit CCS ?
|
|
|
peterr
Posts: 5971
|
Posted: 07/04/2004, 11:22 AM |
|
Usually yes, depending on the snippet. If a snippet produces output then you may need to modify it so that all output is placed into a variable and then assigned to a label.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
NickM
Posts: 44
|
Posted: 07/04/2004, 4:32 PM |
|
Thanks Peterr,
What is the best method to do this:
1. Use CCS to "add code/action" to the .ccs file (the added code seems to need significant alteration to suit the CCS method of coding), or
2. add it to the CCS-generated .php file
|
|
|
peterr
Posts: 5971
|
Posted: 07/04/2004, 7:38 PM |
|
If you plan to re-use a function within multiple pages then it may be best to place your function at the end of Common.php, then call it within an event.
Otherwise it could be OK to place the whole code within an event, which is your option #1.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
Karsten(desperate)
|
Posted: 08/25/2004, 3:55 PM |
|
eeerm peterr
if i put a function on the end of the common.php to call it from
an event in xxx_events.php
if i press live view the CCS RAD tool deletes my added code, so the function is never there
(and yes i saved the common.php file before clicking on live view)
|
|
|
peterr
Posts: 5971
|
Posted: 08/25/2004, 4:02 PM |
|
Karsten,
I didn't experience such problems and I'm not sure what may be wrong without testing your project. You may want to contact our support at http://support.codecharge.com and later attach either the project, or just your modified Common.php file, so that our support could take a look at it.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
Karsten
|
Posted: 08/25/2004, 5:04 PM |
|
if i save the common.php then close the studio and reopen the project
BEFORE using live view my modifications not deleted and working correct... very strange.
btw: can i get support as a trialuser at support.codecharge.com?
|
|
|