Impact factor for posts is a measurement of importance.

Impact factor for users reflect their authority, reputation and contribution on a particular topic.

Rating reflects the quality of posts.

Rating on Voofie is not a simple average of all ratings, but a weighted average of rating, weighted by the impact factor of users who rated.

Explore exciting communities of

How to pass dynamic values in filebrowser.params of a ckeditor file upload dialog?

Bookmark and Share
14 Nov 11

I have a big problem in my ckeditor plugin which i have developed to handle the image upload functionalty.

I have two drop down boxes whose values have to pass in the url of  the uploader script written in php.

Every thing work fine if i give a static value(hard coded) to the name value pairs for the filebrowser.params in plugin.js, but if i changes value from drop down it still preserve the original value. In fact it never takes the values from the drop down

here is the part of the code...

contents : [
                  {
                    id : 'Upload',
                    hidden : true,
                    filebrowser : 'uploadButton',
                    label : editor.lang.image.upload,
                    elements :
                    [
                        {
                            type : 'file',
                            id : 'upload',
                            label : 'If using Expanding Photos in this page, they must be uploaded here first<br/><br/>',
                            style: 'height:60px',
                            size : 38
                        },
                        {
                            type : 'select',
                            id : 'image_size',
                            label : 'Select Image Size<br/><br/>',
                            items : [ ["500 Pixels", "500"],["650 Pixels", "650"],["750 Pixels", "750"],["1000 Pixels", "1000"] ] ,
                            'default' : '500',
                            onChange : function()
                            {
                                ele = this.getDialog().getContentElement('Upload','uploadButton');
                                ele.filebrowser.params.imagesize = this.getValue();
                            },


                        },
                        {
                            type : 'select',
                            id : 'thumbnail_size',
                            label : 'Select Thumbnail Size<br/><br/>',
                            items : [ ["64 Pixels", "64"],["102 Pixels", "102"],["128 Pixels", "128"],["192 Pixels", "192"],["250 Pixels", "250"] ] ,
                            'default' : '102',
                            onChange : function()
                            {
                                ele = this.getDialog().getContentElement('Upload','uploadButton');
                                ele.filebrowser.params.thumbnailsize = this.getValue();
                            },

                        },

                        {
                            type : 'fileButton',
                            id : 'uploadButton',
                            filebrowser : 
                            {
                                action : 'QuickUpload',                                     

                                params : 
                                {   type : 'Images', 
                                    imagesize : '', 
                                    thumbnailsize : '', 
                                },
                            },
                            //filebrowser : 'info:txtUrl',
                            label : 'upload to server',
                            'for' : [ 'Upload', 'upload']
                        }
                    ]
                 }
           ]

here i want to set filebrowser.params.imagesize and filebrowser.params.thumbnailsize dynamically using the defined drop downs.

I searched a lot on internet and many forums but no luck this time so far....

please help me i am new in ckeditor handling.

Add comments >

Please login to post answer.

Page Info
1Impacts
0/0 rates
246
Your Rating: