Contact List with Pictures

This forum is for general questions about extensions for Joomla! 2.5.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
hno2
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Oct 02, 2011 9:52 am

Contact List with Pictures

Postby hno2 » Sun Oct 02, 2011 2:44 pm

Hello,
how can I make this work in Joomla 1.6/1.7.
And how is it possible to list all Contacts, whether they are in the same category.


Hno2

darinh
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Tue Jun 30, 2009 10:25 pm

Re: Contact List with Pictures

Postby darinh » Mon Oct 03, 2011 9:28 pm

Is there a way to display all Contacts within a category instead of having to have only 20 listed?

sebastianhutter
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Oct 20, 2011 11:11 pm

Re: Contact List with Pictures

Postby sebastianhutter » Thu Oct 20, 2011 11:20 pm

@hno2:

I don't know about the javascript part but I could get the images displayed with some changes to the default_items.php file.

Assuming you want to display the picture before the name of the contact (first column)

Prior the lines 37-39

Code: Select all

<th class="item-title">
    <?php echo JHtml::_('grid.sort', 'COM_CONTACT_CONTACT_EMAIL_NAME_LABEL', 'a.name', $listDirn, $listOrder); ?>
</th>

insert the following code:

Code: Select all

<th class="item-picture">
   &nbsp;
</th>


Now prior the lines 98-101

Code: Select all

<td class="item-title">
      <a href="<?php echo JRoute::_(ContactHelperRoute::getContactRoute($item->slug, $item->catid)); ?>">
          <?php echo $item->name; ?></a>
</td>

insert the following code:

Code: Select all

<td class="item-picture">
   <?php if ($item->image) : ?>
      <a href="<?php echo JRoute::_(ContactHelperRoute::getContactRoute($item->slug, $item->catid)); ?>">
         <img alt="<?php echo $item->name; ?>" src="<?php echo $item->image; ?>" />
      </a>
   <?php endif; ?>   
</td>


I hope this helps you.


Return to “Extensions for Joomla! 2.5”

Who is online

Users browsing this forum: No registered users and 7 guests