Problems, need help? Have a tip or advice? Post it here.
20 posts Page 2 of 2
Thanks for letting us know, Sundance.
I am glad it worked :)
One more question regarding this topic came up just now.. (sorry :) )

The images placed within the js/php files are just the filenames, not full URLs.

Is it still possible to work with the editable/image tag somehow? It's doubtful wether my client will be able to upload a file via ftp and then copy/paste the filename into a textarea.. :D

Thanks again!

Have a good one

Sundance
Could you please post some example code of how it looks like in the JS file?
Sure,

the images variables are all set like this:

Code: Select all
var g22='fuctionalcourt5.jpg',g23='fuctionalcourt3.jpg',g28='fclogo.svg',g12='kursplan.png',g4='identifier_720p.mp4'


The images folder is defined like this:
Code: Select all
;var im='couch/uploads/image/'


Then later in the js/php file, the images are placed using the combination:

Code: Select all
{id:'fuctionalcourt5',t:g,r:['28px','226px','38.2%','325px','auto','auto'],o:'0',f:[x5,im+g22,'0px','0px']}
Thanks.

While it can be done with a bit of programming, seeing the complexity of the JS code I am beginning to wonder if it'd be a good idea to do so.

I'll be honest, chances are that very soon you'll run into complexities that you won't be able to handle all by yourself.

I suggest you drop this idea of manipulating the Adobe generated JS file using custom code before you venture too far into it.
@Sundance:

Could you please post the actual code and the related files here? I have experimented a lot with JavaScript and Injecting CouchCMS into it, and it has always worked like a charm for me. May be me or other in the forum might also be able to study the code and get the things working.

Regards,
Aashish Handa
Image
where innovation meets technology
Well, i'm afraid the Edge Animate files were not meant to be dealt with like this in the first place.

But - after all - changing text and altering the image file names is basically everything i want the customer to be able to do..

I will experiment some more and report back here when i am succesful! Thanks for your time and help, KK - much appreciated! :)

@genxcoders: Thank you for offering your help - what files or code bits do you need? The runtime code is very "messy", i could zip you the files though..

Sundance
This works great! Is it possible to create repeater tags in the coverted couch .js file? Seems to work fine until I place the repeater tag in it.

Heres my code. Thanks in advanced! :D

Code: Select all
<?php require_once( '../access/cms.php' ); ?>
<cms:content_type 'application/javascript' />

<cms:template title='Cluster Map' executable='0'>

var markers = [

<cms:repeatable name='cluster' label='Projects'>
  {
    "project":"<h7><cms:editable name='test' label='Test' type='text' width='500'></cms:editable></h7>",
    "citystate":"Raleigh, NC",
    "what":"Mixed-Use",
    "architect":"Mixed-Use",
    "url":"",
    "lat":35.7831850,
    "lng":-78.6457600
  }
</cms:repeatable> 

];

</cms:template>

<?php COUCH::invoke(); ?>
@cjcort, you are not using the repeatable region correctly.

It needs to be 'defined' first with <cms:template> block using <cms:repeatable> tag.
Then it can be 'used' in the body through <cms:show_repeatable> tag - please see http://docs.couchcms.com/concepts/repea ... gions.html for details.

I think your code should work if modified as follows -
Code: Select all
<?php require_once( '../access/cms.php' ); ?>
    <cms:content_type 'application/javascript' />

    <cms:template title='Cluster Map' executable='0'>
        <cms:repeatable name='cluster' label='Projects'>
            <cms:editable name='test' label='Test' type='text' width='500' />
        </cms:repeatable>
    </cms:template>
   
    var markers = [
        <cms:show_repeatable 'cluster' startcount='1'>
        {
        "project":"<h7><cms:show test /></h7>",
        "citystate":"Raleigh, NC",
        "what":"Mixed-Use",
        "architect":"Mixed-Use",
        "url":"",
        "lat":35.7831850,
        "lng":-78.6457600
        }<cms:if k_count lt k_total_records >,</cms:if>
        </cms:show_repeatable>
    ];

    <?php COUCH::invoke(); ?>

Hope it helps.
Worked like a charm, thank you!
20 posts Page 2 of 2