[Solved] Thumbnail problem in Company Directory module

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
cisco
Forum Members
Forum Members
Posts: 19
Joined: Sun Nov 25, 2007 8:16 pm
Location: Serbia

[Solved] Thumbnail problem in Company Directory module

Post by cisco »

Hi,

I am using CompanyDirectory module v. 1.1.1
http://www.epsilonconcepts.com/projects ... ut-us    (list on the right)

I have a problem, cant display thumbnail in summary listing.

Image appears normally on details page included with this default code:
{if $entry->picture_location ne ''}
picture_path}" />

{/if}

but when I use same code on summary listing page, iimages have error in the url...
uploads/companydirectory/id2/Brookfield-Zoo-2.jpg"

(it should be id3,
it puts in image path id number of the the category, and it should be id number of the article

how come this same variable  {$entry->picture_path}  outputs a good path on detais, but outputs a different one on summary listing?

I found this line in one of the config files of the module
  $onerow->picture_path = $config['root_url'] . '/uploads/companydirectory/id' . $row['id'] . '/' . $row['picture_location'];

and I think the problem is that $row['id'] has different number value - in summary listing its category ID, and in detailed page its company ID. So maybe I should make replacement to this line of code, or is there a way to add new line so that I have a different variable to use for the summary listing picutres ?

forgive my punny knowlidge of programing, I am just a designer.
This is why I love CMSMS !

please help,
Thanks Cisco
Last edited by cisco on Mon Dec 24, 2007 4:49 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: [Solved] Thumbnail problem in Company Directory module

Post by Dr.CSS »

How did you solve it?...
User avatar
cisco
Forum Members
Forum Members
Posts: 19
Joined: Sun Nov 25, 2007 8:16 pm
Location: Serbia

Re: [Solved] Thumbnail problem in Company Directory module

Post by cisco »

in
action.default.php

In this line:
  $onerow->picture_path = $config['root_url'] . '/uploads/companydirectory/id' . $row['id'] . '/' . $row['picture_location'];

I just replaced
$row['id']

with this
$row['company_id'] 

so now its like this
  $onerow->picture_path = $config['root_url'] . '/uploads/companydirectory/id' . $row['company_id'] . '/' . $row['picture_location'];

so now it displays thumnails in summary listing
Post Reply

Return to “CMSMS Core”