Register | FAQ Search Today's Posts Mark Forums Read

View Poll Results: Should Joomla!Junkie include these features in a future release of SimpleContact?

Yes 1 100.00%
No 0 0%
Voters: 1. You may not vote on this poll

Reply

 

LinkBack Thread Tools Display Modes
Old 08-10-2010   #1 (permalink)
Ok, down to business
 
ketkoota's Avatar
[+] more user info
 
ketkoota is offline  
Join Date: Nov 2009
Posts: 2
Thanks: 0
Thanked 2 Times in 2 Posts
Unanswered: Proposed revision with new features, code attached

What is your live site URL? (localhost if none): http://stmarkboston.org
What browser does this happen in: Other
What version of Joomla: Joomla 1.5
What OS? (your computer, not your server): Mac
Joomla experience level: 7


I love the Simple contact module but wanted to propose a revision. I had a contractor modify the module to add two features:
  1. The ability to narrow the contact list by Contact Group ID
  2. The ability to display the contacts in a grid format instead of a list

I humbly submit the file to Joomla!Junkie for possible inclusion in a future release.

Details below, as included in the readme.txt file:
- Every modification are marked with token:
//dauthanhhai@gmail.com - start

//dathanhhai@gmail.com -end

I tried to make modifying code grouped. If you want to upgrade in future. Just copy those area to new files.

File modified:
- mod_simplecontact.xml: add more option area
- mod_simplecontact.php: add statement to choose layout file
- help.php : add more query based on options
- tmpl/grid.php: new file to switch layout; just copy this to new version.
Attached Files
File Type: zip mod_simplecontact-revised.zip (30.5 KB, 3 views)
  Reply With Quote
This is a Advertisement. Sign up to have these ads removed.
These users thanked ketkoota.
Old 08-11-2010   #2 (permalink)
Co-Pilot & Owner
 
Andy's Avatar
[+] more user info
 
Andy is offline  
Join Date: Jan 2007
Location: Cape Town
Posts: 955
Thanks: 19
Thanked 492 Times in 375 Posts


Hi There,

Thanks for submitting these updates :) its great when members give back!

I have gone through the changes and they are very sensible and having the ability to choose a tmpl file is a nice addition. The only thing that needs a rethink is the inline css being added to the page using the css variables.

Currently they are being added to the <dl> using the inline "style" attribute like so

Code:
<?php //dauthanhhai@gmail.com - start
	$contact_width = $params->get('contact_width', '160px');
	$contact_height = $params->get('contact_height', '160px');
	$contact_margin = $params->get('contact_margin', '0');
	$contact_padding = $params->get('contact_padding', '0');
	?>
	style="width:<?php echo $contact_width; ?>; height:<?php echo $contact_height;?>;margin:<?php echo $contact_margin;?>; padding:<?php echo $contact_padding;?>; float:left;"
	<?php
	//dauthanhhai@gmail.com - end
	?>
Its good practice to keep all styling separate from the html for a number of important reasons, most of which is maintenance, they are less accessible and to keep the html clean and code count as low as possible.

See a good basic article about this here:

Best Practices: Avoid CSS Inline Styles

This is why using a class with php generated CSS is better, so...

The cleaner approach is to add a class to the div and then output the css to the selector using "addStyleDeclaration"

.someClass {
width: $contact_width;
height:$contact_height;
margin: $contact_margin;
padding:$contact_padding;
}

I will play with this a little when I get some time and try implement this change.

Thanks again for sending the updates back to us :)

Cheers,

Andy
  Reply With Quote
Has your question been answered? Please mark the response as the best answer. This helps us give you faster support.

Are you happy with our support? Please make us smile by writing a short review on Best of Joomla

Do you also love Twitter? Follow us on prothemer | jMorph | joomlatips |andyjamesneale
This is a Advertisement. Sign up to have these ads removed.
These users thanked Andy.
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum by vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC1 Downloads powered by vBadvanced Dynamics v1.1.0.

Love Thy Favicon!

Click on a block to select it..