Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] Image Picker - Image is not shown

[FIXED] Image Picker - Image is not shown 12 Mar 2012 15:47 #1573

  • jaspero
  • jaspero's Avatar
  • Offline
  • New Member
  • Posts: 8
  • Thank you received: 1
  • Karma: 1
I am having a problem with the image picker. I already noticed this problem, when using only the sandbox but I thought - after downloading the componenent and installation locally and on server - the problem would only exist in sandbox. But even locally and on server the image picker function doesnt work.

When clicking on "Image", the image folder will be opened and I'm able to select and insert an image. But then the yellow symbol (with the exclamation mark in it) appears. And looking after in my database the path is like this:

[IMAGES]images/image.jpg

Can anyone tell me how to fix the problem. I really dont want to use the upload-function, since I want to use already existing images.

Thank you in advance
Last Edit: 13 Mar 2012 13:06 by jaspero.
The administrator has disabled public write access.

Re: Image Picker - Image is not shown 13 Mar 2012 13:05 #1586

  • jaspero
  • jaspero's Avatar
  • Offline
  • New Member
  • Posts: 8
  • Thank you received: 1
  • Karma: 1
After I have downloaded my component, I have made the following changes in order to get the images being shown in the frontend as well as in the backend:

IN THE BACKEND:

1. Change in imagepicker.php

administrator -> components -> your_component -> dom -> html -> form -> input -> file -> imagepicker.php

In the function function jsPicker() delete the [images]-Tag and change the line from

$indirectUrl = JURI::base(true) . "/index.php?option=" . $this->getExtension() . "&task=file&path=[IMAGES]";

to

$indirectUrl = JURI::base(true) . "/index.php?option=" . $this->getExtension() . "&task=file&path=";


2. Change in insert.js

administrator -> components -> your_component -> dom -> assets -> imagepicker -> js -> insert.js

change the lines 9 AND 19 from

[Line 9 ] var src = fieldData.url + path;
[Line 19] $(field).value = '[IMAGES]' + path

to

[Line 9 ] var src = fieldData.url + '../' + path;
[Line 19] $(field).value = path

###############################################################

IN THE FRONTEND:

Either you make the changes in the core template files or (better) in the template override files, change the root-attribute and replace the [DIR_+++_+++] in the JDom->html.fly.file whereever you want the image to be displayed:

From for example:

JDom::_('html.fly.file', array(
'dataKey' => 'photo',
...
...
...
...
'root' => '[DIR_+++_+++]',
));

To:

JDom::_('html.fly.file', array(
'dataKey' => 'photo',
...
...
...
...
'root' => ''
));
Last Edit: 13 Mar 2012 13:08 by jaspero.
The administrator has disabled public write access.
The following user(s) said Thank You: edwardcox

Re: [FIXED] Image Picker - Image is not shown 06 Apr 2012 21:54 #1929

  • devil
  • devil's Avatar
  • Offline
  • New Member
  • Posts: 15
  • Thank you received: 2
  • Karma: 1
Hi,

same "Bug" here. Thanks for your Solution.


best regards,
Markus
The administrator has disabled public write access.

Re: [FIXED] Image Picker - Image is not shown 07 Apr 2012 20:45 #1934

  • devil
  • devil's Avatar
  • Offline
  • New Member
  • Posts: 15
  • Thank you received: 2
  • Karma: 1
Hi,

the solutions didn´t work for me. Should i open a new Ticket for this?
The administrator has disabled public write access.

Re: [FIXED] Image Picker - Image is not shown 08 Apr 2012 19:33 #1939

  • nas
  • nas's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Thank you received: 1
  • Karma: 0
Hi everyone,

I’m having the same issue and in my database table i can't see an image path its blank.and also it isn't working in sandbox .. :(
The administrator has disabled public write access.

Re: [FIXED] Image Picker - Image is not shown 09 Apr 2012 11:06 #1947

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 985
  • Karma: 140
Excuse me for beiing late on this.

I check this.

The tags [DIR_+++_+++] or [IMAGES] are shortcuts to hide the complete paths, and to be able to move your files easily.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: [FIXED] Image Picker - Image is not shown 15 Apr 2012 07:41 #1992

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 985
  • Karma: 140
Should be solved now.

There was some Notices in the code that generates image thumb.

So, if the error reporting is to lower level, you can see your images.
Now it is fixed, so you still can work with a high level of error reporting.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: [FIXED] Image Picker - Image is not shown 19 Apr 2012 08:37 #2054

  • nas
  • nas's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Thank you received: 1
  • Karma: 0
Yes! Brilliant it's working now :) Thank you Admin
The administrator has disabled public write access.
Time to create page: 0.207 seconds

Get Started