We help IT Professionals succeed at work.
Get Started

Joomla Category Image Selection - Defaut Blank Image Not Displaying

meraTechStuff
on
635 Views
Last Modified: 2013-12-12
Hello,

I'm using latest version of Joomla 1.5.18 with default Admin template. When I tried to create a Category, under the category image selection option, the default blank image is not displayed. instead it displays the alternative text which is "Preview".

The exact file is: /administrator/components/com_categories/admin.categories.html.php
The exact bit of code is provided in the attachment. You can look the code at the line 370

There is a problem in this line: document.write('<img src=' + jsimg + ' name="imagelib" width="80" height="80" border="2" alt="<?php echo JText::_( 'Preview', true ); ?>" />');

The image path is wrong! I fixed it several months ago by referring the web. But unfortunately the file is overridden by Joomla update. I don't have any backup.

I would appreciate if anyone let me know with the fix! Thanks.
<tr>
						<td>&nbsp;</td>
						<td>
						<script language="javascript" type="text/javascript">
						if (document.forms.adminForm.image.options.value!=''){
							jsimg='../<?php echo $cparams->get('image_path'); ?>/' + getSelectedValue( 'adminForm', 'image' );
						} else {
							jsimg='../images/M_images/blank.png';
						}
						document.write('<img src=' + jsimg + ' name="imagelib" width="80" height="80" border="2" alt="<?php echo JText::_( 'Preview', true ); ?>" />');
						</script>
						</td>
					</tr>

Open in new window

Comment
Watch Question
This problem has been solved!
Unlock 2 Answers and 7 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE