⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

image crud problem



maha
  • profile picture
  • Member

Posted 27 February 2013 - 09:03 AM

i used image crud and it works very well but,

when i use version 6 the photos don't uploaded it gives error, when i use earlier version the photos uploaded correctly but that version don't have title field option .. what can i do?

 

i have another question .

is $c->set_title_field('title') stored in database or it is for view only?

 


maha
  • profile picture
  • Member

Posted 28 February 2013 - 06:54 AM

solved:

 v6 wasn't work because the path in get state() function was taken   wrong.

second

$c->set_title_field('title') stored in database

 

thanks


maha
  • profile picture
  • Member

Posted 05 March 2013 - 07:21 AM

Now I have problem in "accept_file_types"

when i try to upload file with types ( .doc,.docx,pdf)

it gives error

 

" Year.rar has an invalid extension. Valid extension(s): jpeg, jpg, png, gif "

Although i make the file types in  image_crud config :

$config['image_crud_accept_file_types'] = 'gif|jpeg|jpg|png|tiff|doc|docx|txt|odt|xls|xlsx|pdf|ppt|pptx|pps|ppsx|mp3|m4a|ogg|wav|mp4|m4v|mov|wmv|flv|avi|mpg|ogv|3gp|3g2';

so can any one help?


maha
  • profile picture
  • Member

Posted 05 March 2013 - 10:13 AM

any help?


maha
  • profile picture
  • Member

Posted 05 March 2013 - 12:00 PM

refresh


maha
  • profile picture
  • Member

Posted 17 March 2013 - 10:30 AM

[solved]

 

put the extenstion you want in :

 

assets/image_crud/views/list.php

 

in the "creatUploader" function  like that:

 allowedExtensions: ['jpeg', 'jpg', 'png', 'gif','doc','zip','rar']

 

Now I have anew problem

i added a new textarea like "title field"

i made all the editing in liberary and list.php

but i can't follow the function that store the value in DB

 

the function in list.php is:

function saveTitle(data_id, data_title)
{
	  	$.ajax({
			url: '<?php echo $insert_title_url; ?>',
			type: 'post',
			data: {primary_key: data_id, value: data_title},
			beforeSend: function()
			{
				$('.file-upload-messages-container:first').show();
				$('.file-upload-message').html("<?php echo $this->l('saving_title');?>");
			},
			complete: function()
			{
				$('.file-upload-messages-container').hide();
				$('.file-upload-message').html('');
			}
			});
}

what i need is to know what "<?php echo $this->l('saving_title');?>" mean

and where is the implementation of "saving_title" function.


maha
  • profile picture
  • Member

Posted 18 March 2013 - 08:17 AM

i catch it  "<?php echo $this->l('saving_title');?>"

is just language file calling

 

but the problem still found

the new textarea don,t save in DB

this is printscreen from my modification

image.png

the second field doesn,t store in DB

I modify the liberary & list.php


maha
  • profile picture
  • Member

Posted 18 March 2013 - 14:19 PM

refresh


maha
  • profile picture
  • Member

Posted 01 April 2013 - 12:16 PM

I catch the problem

 the function that i make like "save_title"

function saveNew(data_id, data_new)
{
	  	$.ajax({
			url: '<?php echo $insert_new_url; ?>',
			type: 'post',
			data: {primary_key: data_id, value: data_new},
			beforeSend: function()
			{
				$('.file-upload-messages-container:first').show();
				$('.file-upload-message').html("<?php echo $this->l('saving_new');?>");
			},
			complete: function()
			{
				$('.file-upload-messages-container').hide();
				$('.file-upload-message').html('');
			}
			});
}

in assets/image_crud/views/list.php

the line

<?php echo $this->l('saving_new');?>

was the problem because "saving_new" didn't found in lang files


rahulg04
  • profile picture
  • Member

Posted 07 August 2013 - 10:25 AM

hi maha

 

please tell your code because i try but that is not working for me

so please show your full code

 

Thank in Advance !!!!!!!!!!!!!