Support Center

Knowledgebase
View categorized listing of all common frequently asked questions.
Video Tutorials
Create a Movie & TV Show review website.
Customize the jReviews themes.
Review user profiles with the Everywhere addon.
Forum
Community forum
Submit a Ticket
Use your client area email to access the ticket system.
Downloads
Guides, modules and more...
 
Welcome, Guest. Please login or register.
Did you miss your activation email?
January 08, 2009, 09:30:38 PM
22868 Posts in 5233 Topics by 2978 Members
Latest Member: mini_me
News: Do not post any jReviews files or large amounts of code in the forums please. Only template files and code are allowed.
 
jReviews Support Forum  |  jReviews 1.x  |  Tips & tricks  |  Add category image if no image « previous next »
Pages: [1]
Author Topic: Add category image if no image  (Read 1387 times)
Lionel
Newbie
*
Offline Offline

Posts: 18


« on: July 27, 2006, 06:45:29 PM »

[JREVIEWS NOTE: this was made part of the standard jReviews package.]

This will display a resized category image in content list if there are no images with item. It will not display anything if you don't have a category image.

in jreviews.html.php look for:

// Check if the image file exists or don't send anything to the template
$imagePath = HTML_jReviews::showResizedImage( $row->images, $row->id, $settings->list_image_resize);

below that add

Quote
if (!$imagePath){
global $database;
$imid=$row->catid;
$database->setQuery("SELECT image FROM #__categories WHERE id='$imid'");
$image = $database->loadResult();
if ($image!=''){
$imagePath = HTML_jReviews::showResizedImage( $image, $row->id, $settings->list_image_resize);
}
}

that's it.
« Last Edit: October 21, 2006, 01:57:12 PM by jReviews » Logged
Pages: [1]
« previous next »
    Jump to: