How can i modify 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
webform
Power Poster
Power Poster
Posts: 524
Joined: Sat Nov 25, 2006 3:39 pm

How can i modify Company Directory Module?

Post by webform »

I've installed the Company Directory module but have some issue with it .

Number 1: There seems to be a bug where no check boxes is checked in edit mode on the Company Edit Page even thou I've checked either one or more categories - the same goes for custom fields.

I can see in the source code there is assigned a value to the check boxes - they are just missing the checked="checked".

What file should i edit to solve that as i can't seem to find the right place in the action.editcompany.php file?

Number 2: My host has Safe Mode On and this cause trouble for upload of pictures and logos as the Company Directory Module wants to create folders for each upload - I have solved the upload problem as i have manually created the companydirectory and tmp folders in uploads with the right permissions.

And then i edited the action.addcompany.php and action.editcompany.php not to include and create the id folder for each upload. I have also edited action.default.php and the lines containing "picture_path" and "logo_path" not to include the id folder in the path.

But the problem is front end still can't show picture and logo for a company as the output path still include the id folder! (img src="http://domain.dk/uploads/companydirectory/id62/img.jpg)

Where else should i edit the paths?

Number 3: This one is properly more difficult!

I want to change how company summary is displayed in front end;

I want 2 different summary pages in front end: One page show the companies sorted alphabetic but in 2 or more columns. Second page also show companies in 2 or more columns but are sorted and grouped by category.

How and where do i edit to make these changes?

I hope someone can point me in the right direction as i need to solve these problems.

TIA.

Finn
Last edited by webform on Sat Aug 25, 2007 9:02 pm, edited 1 time in total.
User avatar
webform
Power Poster
Power Poster
Posts: 524
Joined: Sat Nov 25, 2006 3:39 pm

Re: How can i modify Company Directory Module?

Post by webform »

OK! I've solved problem number 2 - I think i just was too tired when i asked  ::)

In action.default.php AND action.detail.php i've changed these lines:

Code: Select all

$onerow->picture_location = $row['picture_location'];
$onerow->picture_path = $config['root_url'] . '/uploads/companydirectory/id' . $row['id'] . '/' . $row['picture_location'];
$onerow->logo_location = $row['logo_location'];
$onerow->logo_path = $config['root_url'] . '/uploads/companydirectory/id' . $row['id'] . '/' . $row['logo_location'];
to:

Code: Select all

$onerow->picture_location = $row['picture_location'];
$onerow->picture_path = $config['root_url'] . '/uploads/companydirectory/' . $row['picture_location'];
$onerow->logo_location = $row['logo_location'];
$onerow->logo_path = $config['root_url'] . '/uploads/companydirectory/' . $row['logo_location'];
Problem number 3 have i somewhat solved using a workaround with User Defined Tags directly querying the Company Directory tables and echo the result here.

I still use the Company Directory module in admin to add and edit companies, but then use my UDT to show the result in front end. All thou i've still use the Company Directory module in frontend linking to the details template within my UDT.

Now if only i can solve problem number 1 where selected values in check boxes are not shown on the Edit Company page in admin  ;)

Finn
Post Reply

Return to “CMSMS Core”