⚠ 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 forum is read-only and soon will be archived. ⚠

image_crud add get image URL button

image_crud add feature url how

  • Please log in to reply
2 replies to this topic

#1 Гэрэлт-Од Гоцбаяр

Гэрэлт-Од Гоцбаяр


  • Members
  • PipPip
  • 18 posts

Posted 29 April 2013 - 01:57 PM

I'm using Grocery_CRUD and Image_CRUD on my backend code. When I'm using Grocery_CRUD with TinyMCE texteditor there isn't any image upload feature. For example if admin want image in middle of text, he can't upload image. So I used Image_CRUD and created new link for it. But now problem is how can Admin get upload Image URL and put it TinyMCE's Image input URL field?




#2 victor


    grocery CRUD Hero

  • Advanced Member
  • PipPipPip
  • 967 posts

Posted 01 May 2013 - 06:14 AM

Try to look for file-uploader for the TinyMCE. 

there is http://www.moxiemanager.com/ for example.

#3 jrowe



  • Members
  • PipPip
  • 23 posts

Posted 01 May 2013 - 12:39 PM

I have added a custom link to the image crud view where you upload/rearrange/add title to pictures..all it does is add a link to the direct URL of the image..


It is located in the list.php file under \assets\image_crud\views


	<ul class='photos-crud'>
	<?php foreach($photos as $photo_num => $photo){?>
			<li id="photos_<?php echo $photo->$primary_key; ?>">
				<div class='photo-box'>
					<a href='<?php echo $photo->image_url?>' <?php if (isset($photo->title)) {echo 'title="'.str_replace('"',"&quot;",$photo->title).'" ';}?>target='_blank' class="color-box" rel="color-box" tabindex="-1"><img src='<?php echo $photo->thumbnail_url?>' width='90' height='60' class='basic-image' /></a>
					<?php if($title_field !== null){ ?>
					<textarea class="ic-title-field" data-id="<?php echo $photo->$primary_key; ?>" autocomplete="off" ><?php echo $photo->$title_field; ?></textarea>
					<div class="clear"></div><?php }?>
					<?php if($has_priority_field){?><div class="move-box"></div><?php }?>
					<?php if(!$unset_delete){?><div class='delete-box'>
						<a href='<?php echo $photo->delete_url?>' class='delete-anchor' tabindex="-1"><?php echo $this->l('list_delete');?></a>
					</div><?php }?>
<!-- This part I added -->
<div class="clear"></div>

<a href="<?php echo $photo->image_url; ?>"> URL </a>

<!-- end of part I added -->
					<div class="clear"></div>
	<?php }?>

The part I added to have a direct link to the image and its direct URL..you could also use $photo->image_url to put in a textbox so they can easilly copy it to be pasted in your textarea

Also tagged with one or more of these keywords: image_crud, add, feature, url, how

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users