Change contact form

Discuss the development and implementation of Joomla! 1.0.x templates here.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Locked
swieks
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Wed Jan 11, 2006 9:49 am

Change contact form

Post by swieks » Fri Nov 07, 2008 10:13 am

Hi Dear Joomlers,

on the page http://gnosia.be/index.php?option=com_contact&Itemid=31 I would like to change 2 things.
1/I would like to change the font-size of Gnõsia to fe 18px.
2/I would like to change the order between the phone mobile number and the mailadres (so first the phone number, and then the mail-adress).

Here you can see the CSS

In attachement you can see the component/com_cantact-files

Code: Select all

body { margin:0px; padding:0px; scrollbar-base-color: #D6CFAB}



p { 

	margin:0px; 

	padding:0px;

 }



form { 

	margin:0px; 

	padding:0px; 

	text-align:left; 

	}



h1 { 

margin:0px; 

padding:0px; 

}



h2 { 

	margin:0px; 

	padding:0px; 

	}



h3 { 

	margin:0px;

	padding:0px;

	 }



div { 

	padding:0px; 

	margin:0px; 

	}



fieldset { border:0px; }



#main{ /*width:100%;*/ overflow:hidden; background:#FAF6DD; min-width:825px;} 



#header{ width:100%; background:#811719; height:63px;}



#image_back{ background:url(../images/image_back.jpg) repeat-x scroll 0% 0%;width:100%; overflow:hidden; height:150px;}



#img_padd{margin-top:22px;}



#top_img1{ background:url(../images/img_1.jpg) no-repeat scroll 0% 0%; height:103px; float:left ;width:20%; background-position:center; }



#top_img2{ background:url(../images/img_2.jpg) no-repeat scroll 0% 0%; height:103px ; float:left;width:20%;background-position:center;}



#top_img3{ background:url(../images/img_3.jpg) no-repeat scroll 0% 0%; height:103px ; float:left;width:20%; background-position:center;}



#top_img4{ background:url(../images/img_4.jpg) no-repeat scroll 0% 0%; height:103px ; float:left;width:20%; background-position:center;}



#top_img5{ background:url(../images/img_5.jpg) no-repeat scroll 0% 0%; height:103px ; float:right;width:19%; background-position:center;}



.mid_left{color:#634B41 ; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:14px; }



.mid_center{ color:#544138;padding-left:25px;padding-right:25px;overflow-y:auto;height:342px;text-align:justify;overflow-x:hidden;border:none; }



#first{font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px;}



.mid_right{font-family:verdana;font-size:12px; color:#634B41; font-style: italic;font-weight: bold;/*padding-top:22px;*/text-align:right;padding-right:43px; }



#r1{ background:url(../images/r1.png) no-repeat scroll 0% 100%; width:154px;height:117px;/* float:right;margin-right:25px; */margin-top:117px}



#r2{ background:url(../images/r2.png) no-repeat scroll 0% 0%; width:154px;/* float:right;*/height:117px;/* margin-right:25px;*/margin-top:10px;margin-bottom:10px; }



#r3{ background:url(../images/r3.png) no-repeat scroll 0% 0%; width:154px;/* float:right;*/height:117px;/*margin-right:25px; */ margin-bottom:55px; }



#botom_img{ background:url(../images/1024.jpg) no-repeat scroll 50% 55%;/* background-position:bottom; */  overflow:hidden ;  }



#botom_logo{/* background:url(../images/1024.jpg) no-repeat scroll 0% 0%; position:relative; float:left;*/ height:255px;/* margin-top:168px; */margin-left:12%; }



#footer_shd{ background: url(../images/bottom_img_rep.jpg) repeat-x scroll 0% 0%;background-position:bottom;height:560px;}



.mainlevel-nav{color:#FFFFFF;text-decoration:none;font-family:verdana;font-size:12px;}



#botom_logo table{margin-left:23%; margin-top:140px; /* position:absolute;*/}



.foot_text{color:#FFFFFF;/*padding-left:20% */;text-decoration:none;font-family:Arial;font-size:11px;padding-top:10px;padding-bottom:10px;}



.contentpaneopen{padding-left:10px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:13px; text-align: justify}



.contentpane{padding-left:10px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:13px}



.button{background:#DB9165; color:#ffffff;border:1px solid #000000;}



#active_menu-nav{padding-left:10px;}


Who can help me please?
Thx
You do not have the required permissions to view the files attached to this post.

swieks
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Wed Jan 11, 2006 9:49 am

Re: Change contact form

Post by swieks » Tue Nov 11, 2008 10:21 am

Can someone help me please?

User avatar
DeanMarshall
Joomla! Hero
Joomla! Hero
Posts: 2352
Joined: Fri Aug 19, 2005 2:26 am
Location: Lancaster, Lancashire, United Kingdom
Contact:

Re: Change contact form

Post by DeanMarshall » Fri Nov 14, 2008 1:28 pm

The Joomla contact component is quite basic and doesn't support changes to the order of the output of elements. You can only control what is, and is not, output.

Regarding your font size - on closer inspection it appears that the size has been hard-coded at some stage - did you (or someone working on your site) perhaps edit 'core' Joomla files to hardcode that particular element at 15 pixels?

It will not be possible to override that 'inline' style from a stylesheet - you will have to identify the edit and take care of it in the same place it is coming from - probably /components/com_contact/contact.html.php

Dean
Dean Marshall Consultancy - six Joomla experts - http://www.deanmarshall.co.uk/

Joomla Experts - Joomla Support http://www.deanmarshall.co.uk/joomla-se ... pport.html

swieks
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Wed Jan 11, 2006 9:49 am

Re: Change contact form

Post by swieks » Fri Nov 14, 2008 2:06 pm

thx for your answer,
so changing the order is not possible :(
it's me who changed the font size, so that's ok

User avatar
DeanMarshall
Joomla! Hero
Joomla! Hero
Posts: 2352
Joined: Fri Aug 19, 2005 2:26 am
Location: Lancaster, Lancashire, United Kingdom
Contact:

Re: Change contact form

Post by DeanMarshall » Fri Nov 14, 2008 2:38 pm

It isn't an option presented via the Joomla interface.
But as you have already 'hacked' the core file once I see no harm in editing it a bit more ;)

Just edit the php/html in the same file to change the order the values are output to the browser.

Dean
Dean Marshall Consultancy - six Joomla experts - http://www.deanmarshall.co.uk/

Joomla Experts - Joomla Support http://www.deanmarshall.co.uk/joomla-se ... pport.html

swieks
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Wed Jan 11, 2006 9:49 am

Re: Change contact form

Post by swieks » Fri Nov 14, 2008 3:00 pm

I would realy not know how to do that.
I changed the font size in the backend of joomla, via the content manager, by putting there html.
I would not know how to change the order in /components/com_contact/contact.html.php

Here is the codes of it

Code: Select all

<?php
/**
* @version $Id: contact.html.php 10002 2008-02-08 10:56:57Z willebil $
* @package Joomla
* @subpackage Contact
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );


/**
* @package Joomla
* @subpackage Contact
*/
class HTML_contact {


	function displaylist( &$categories, &$rows, $catid, $currentcat=NULL, &$params, $tabclass ) {
		global $Itemid, $mosConfig_live_site, $hide_js;

		if ( $params->get( 'page_title' ) ) {
			?>
			<div class="componentheading<?php echo $params->get( 'pageclass_sfx' ); ?>">
				<?php echo $currentcat->header; ?>
			</div>
			<?php
		}
		?>
		<form action="index.php" method="post" name="adminForm">

		<table width="100%" cellpadding="4" cellspacing="0" border="0" align="center" class="contentpane<?php echo $params->get( 'pageclass_sfx' ); ?>">
		<tr>
			<td width="60%" valign="top" class="contentdescription<?php echo $params->get( 'pageclass_sfx' ); ?>" colspan="2">
			<?php
			// show image
			if ( $currentcat->img ) {
				?>
				<img src="<?php echo $currentcat->img; ?>" align="<?php echo $currentcat->align; ?>" hspace="6" alt="<?php echo _WEBLINKS_TITLE; ?>" />
				<?php
			}
			echo $currentcat->descrip;
			?>
			</td>
		</tr>
		<tr>
			<td width="100%">
			<?php
			if ( count( $rows ) ) {
				HTML_contact::showTable( $params, $rows, $catid, $tabclass );
			}
			?>
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>
			<?php
			// Displays listing of Categories
			if ( ( $params->get( 'type' ) == 'category' ) && $params->get( 'other_cat' ) ) {
				HTML_contact::showCategories( $params, $categories, $catid );
			} else if ( ( $params->get( 'type' ) == 'section' ) && $params->get( 'other_cat_section' ) ) {
				HTML_contact::showCategories( $params, $categories, $catid );
			}
			?>
			</td>
		</tr>
		</table>
		</form>
		<?php
		// displays back button
		mosHTML::BackButton ( $params, $hide_js );
	}

	/**
	* Display Table of items
	*/
	function showTable( &$params, &$rows, $catid, $tabclass ) {
		global $mosConfig_live_site, $Itemid;
		?>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
		<?php
		if ( $params->get( 'headings' ) ) {
			?>
			<tr>
				<td height="20" class="sectiontableheader<?php echo $params->get( 'pageclass_sfx' ); ?>">
					<?php echo _CONTACT_HEADER_NAME; ?>
				</td>
				<?php
				if ( $params->get( 'position' ) ) {
					?>
					<td height="20" class="sectiontableheader<?php echo $params->get( 'pageclass_sfx' ); ?>">
						<?php echo _CONTACT_HEADER_POS; ?>
					</td>
					<?php
				}
				?>
				<?php
				if ( $params->get( 'email' ) ) {
					?>
					<td height="20" class="sectiontableheader<?php echo $params->get( 'pageclass_sfx' ); ?>">
						<?php echo _CONTACT_HEADER_EMAIL; ?>
					</td>
					<?php
				}
				?>
				<?php
				if ( $params->get( 'telephone' ) ) {
					?>
					<td height="20" class="sectiontableheader<?php echo $params->get( 'pageclass_sfx' ); ?>">
						<?php echo _CONTACT_HEADER_PHONE; ?>
					</td>
					<?php
				}
				?>
				<?php
				if ( $params->get( 'fax' ) ) {
					?>
					<td height="20" class="sectiontableheader<?php echo $params->get( 'pageclass_sfx' ); ?>">
						<?php echo _CONTACT_HEADER_FAX; ?>
					</td>
					<?php
				}
				?>
			</tr>
			<?php
		}

		$k = 0;
		foreach ($rows as $row) {
			$link = 'index.php?option=com_contact&task=view&contact_id='. $row->id .'&Itemid='. $Itemid;
			?>
			<tr>
				<td height="20" class="<?php echo $tabclass[$k]; ?>">
					<a href="<?php echo sefRelToAbs( $link ); ?>" class="category<?php echo $params->get( 'pageclass_sfx' ); ?>">
						<?php echo $row->name; ?></a>
				</td>
				<?php
				if ( $params->get( 'position' ) ) {
					?>
					<td width="25%" class="<?php echo $tabclass[$k]; ?>">
						<?php echo $row->con_position; ?>
					</td>
					<?php
				}
				?>
				<?php
				if ( $params->get( 'email' ) ) {
					if ( $row->email_to ) {
						$row->email_to = mosHTML::emailCloaking( $row->email_to, 1 );
					}
					?>
					<td width="20%" class="<?php echo $tabclass[$k]; ?>">
						<?php echo $row->email_to; ?>
					</td>
					<?php
				}
				?>
				<?php
				if ( $params->get( 'telephone' ) ) {
					?>
					<td width="15%" class="<?php echo $tabclass[$k]; ?>">
						<?php echo $row->telephone; ?>
					</td>
					<?php
				}
				?>
				<?php
				if ( $params->get( 'fax' ) ) {
					?>
					<td width="15%" class="<?php echo $tabclass[$k]; ?>">
						<?php echo $row->fax; ?>
					</td>
					<?php
				}
				?>
			</tr>
			<?php
			$k = 1 - $k;
		}
		?>
		</table>
		<?php
	}

	/**
	* Display links to categories
	*/
	function showCategories( &$params, &$categories, $catid ) {
		global $mosConfig_live_site, $Itemid;
		?>
		<ul>
		<?php
		foreach ( $categories as $cat ) {
			if ( $catid == $cat->catid ) {
				?>
				<li>
					<b>
					<?php echo $cat->title;?>
					</b>
					&nbsp;
					<span class="small<?php echo $params->get( 'pageclass_sfx' ); ?>">
					(<?php echo $cat->numlinks;?>)
					</span>
				</li>
				<?php
			} else {
				$link = 'index.php?option=com_contact&catid='. $cat->catid .'&Itemid='. $Itemid;
				?>
				<li>
					<a href="<?php echo sefRelToAbs( $link ); ?>" class="category<?php echo $params->get( 'pageclass_sfx' ); ?>">
						<?php echo $cat->title;?></a>
					<?php
					if ( $params->get( 'cat_items' ) ) {
						?>
						&nbsp;
						<span class="small<?php echo $params->get( 'pageclass_sfx' ); ?>">
							(<?php echo $cat->numlinks;?>)
						</span>
						<?php
					}
					?>
					<?php
					// Writes Category Description
					if ( $params->get( 'cat_description' ) ) {
						echo '<br />';
						echo $cat->description;
					}
					?>
				</li>
				<?php
			}
		}
		?>
		</ul>
		<?php
	}


	function viewcontact( &$contact, &$params, $count, &$list, &$menu_params ) {
		global $mosConfig_live_site;
		global $mainframe, $Itemid;

		$template 		= $mainframe->getTemplate();
		$sitename 		= $mainframe->getCfg( 'sitename' );
		$hide_js 		= intval( mosGetParam($_REQUEST,'hide_js', 0 ) );
				?>
		<script language="JavaScript" type="text/javascript">
		<!--
		function validate(){
			if ( ( document.emailForm.text.value == "" ) || ( document.emailForm.email.value.search("@") == -1 ) || ( document.emailForm.email.value.search("[.*]" ) == -1 ) ) {
				alert( "<?php echo addslashes( _CONTACT_FORM_NC ); ?>" );
			} else if ( ( document.emailForm.email.value.search(";") != -1 ) || ( document.emailForm.email.value.search(",") != -1 ) || ( document.emailForm.email.value.search(" ") != -1 ) ) {
				alert( "<?php echo addslashes( _CONTACT_ONE_EMAIL ); ?>" );
			} else {
				document.emailForm.action = "<?php echo sefRelToAbs("index.php?option=com_contact&Itemid=$Itemid"); ?>"
				document.emailForm.submit();
			}
		}
		//-->
		</script>
		<script type="text/javascript">
		<!--
		function ViewCrossReference( selSelectObject ){
			var links = new Array();
			<?php
			$n = count( $list );
			for ($i = 0; $i < $n; $i++) {
				echo "\nlinks[".$list[$i]->value."]='"
					. sefRelToAbs( 'index.php?option=com_contact&task=view&contact_id='. $list[$i]->value .'&Itemid='. $Itemid )
					. "';";
			}
			?>

			var sel = selSelectObject.options[selSelectObject.selectedIndex].value
			if (sel != "") {
				location.href = links[sel];
			}
		}
		//-->
		</script>
		<?php
		// For the pop window opened for print preview
		if ( $params->get( 'popup' ) ) {
			$mainframe->setPageTitle( $contact->name );
			$mainframe->addCustomHeadTag( '<link rel="stylesheet" href="templates/'. $template .'/css/template_css.css" type="text/css" />' );
		}
		if ( $menu_params->get( 'page_title' ) ) {
			?>
			<div class="componentheading<?php echo $menu_params->get( 'pageclass_sfx' ); ?>">
				<?php echo $menu_params->get( 'header' ); ?>
			</div>
			<?php
		}
		?>


swieks
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Wed Jan 11, 2006 9:49 am

Re: Change contact form

Post by swieks » Fri Nov 14, 2008 3:01 pm

The rest of it:

Code: Select all

		<table width="100%" cellpadding="0" cellspacing="0" border="0" class="contentpane<?php echo $menu_params->get( 'pageclass_sfx' ); ?>">
		<?php
		// displays Page Title
		HTML_contact::_writePageTitle( $params, $menu_params );

		// displays Contact Select box
		HTML_contact::_writeSelectContact( $contact, $params, $count );

		// displays Name & Positione
		HTML_contact::_writeContactName( $contact, $params, $menu_params );
		?>
		<tr>
			<td width="100%">
				<table width="100%">
				<tr>
					<td>
					<?php
					// displays Address
					HTML_contact::_writeContactAddress( $contact, $params );

					// displays Email & Telephone
					HTML_contact::_writeContactContact( $contact, $params );

					// displays Misc Info
					HTML_contact::_writeContactMisc( $contact, $params );
					?>
					</td>
					<td align="right" valign="top">
					<?php
					// displays Image
					HTML_contact::_writeImage( $contact, $params );
					?>
					</td>
				</tr>
				</table>
			</td>
			<td>&nbsp;</td>
		</tr>
		<?php
		// displays Email Form
		HTML_contact::_writeVcard( $contact, $params );
		// displays Email Form
		HTML_contact::_writeEmailForm( $contact, $params, $sitename, $menu_params );
		?>
		</table>
		<?php
		// display Close button in pop-up window
		mosHTML::CloseButton ( $params, $hide_js );

		// displays back button
		mosHTML::BackButton ( $params, $hide_js );
	}


	/**
	* Writes Page Title
	*/
	function _writePageTitle( &$params, &$menu_params ) {
		if ( $params->get( 'page_title' )  && !$params->get( 'popup' ) ) {
			?>
			<tr>
				<td width="100%" class="componentheading<?php echo $menu_params->get( 'pageclass_sfx' ); ?>">
					<?php echo $params->get( 'header' ); ?>
				</td>
			</tr>
			<?php
		}
	}

	/**
	* Writes Dropdown box to select contact
	*/
	function _writeSelectContact( &$contact, &$params, $count ) {
		if ( ( $count > 1 )  && !$params->get( 'popup' ) && $params->get( 'drop_down' ) ) {
			global $Itemid;
			?>
			<tr>
				<td align="center">
					<br />
					<form action="<?php echo sefRelToAbs( 'index.php?option=com_contact&Itemid='. $Itemid ); ?>" method="post" name="selectForm" target="_top" id="selectForm">
						<?php echo (_CONTACT_SEL); ?>
						<br />
						<?php echo $contact->select; ?>
					</form>
				</td>
			</tr>
			<?php
		}
	}

	/**
	* Writes Name & Position
	*/
	function _writeContactName( &$contact, &$params, &$menu_params ) {
		global $Itemid, $hide_js, $mosConfig_live_site;

		if ( $contact->name ||  $contact->con_position ) {
			if ( $contact->name && $params->get( 'name' ) ) {
				?>
				<tr>
					<td class="contentheading<?php echo $menu_params->get( 'pageclass_sfx' ); ?>" width="100%">
						<table width="100%">
						<tr>
							<td width="100%">
								<?php
								echo $contact->name;
								?>
							</td>
							<?php
							// displays Print Icon
							$print_link = $mosConfig_live_site .'/index2.php?option=com_contact&task=view&contact_id='. $contact->id .'&Itemid='. $Itemid .'&pop=1';
							mosHTML::PrintIcon( $contact, $params, $hide_js, $print_link );
							?>
						</tr>
						</table>
					</td>
				</tr>
				<?php
			}
			if ( $contact->con_position && $params->get( 'position' ) ) {
				?>
				<tr>
					<td width="100%">
					<?php
					echo $contact->con_position;
					?>
					<br /><br />
					</td>
				</tr>
				<?php
			}
		}
	}

	/*
	* Writes Image
	*/
	function _writeImage( &$contact, &$params ) {
		global $mosConfig_live_site;

		if ( $contact->image && $params->get( 'image' ) ) {
			?>
			<div style="float: right;">
			<img src="<?php echo $mosConfig_live_site;?>/images/stories/<?php echo $contact->image; ?>" align="middle" alt="<?php echo _CONTACT_TITLE; ?>" />
			</div>
			<?php
		}
	}

	/**
	* Writes Address
	*/
	function _writeContactAddress( &$contact, &$params ) {
		if ( ( $params->get( 'address_check' ) > 0 ) &&  ( $contact->address || $contact->suburb  || $contact->state || $contact->country || $contact->postcode ) ) {
			?>
			<table width="100%" cellpadding="0" cellspacing="0" border="0">
			<?php
			if ( $params->get( 'address_check' ) > 0 ) {
				?>
				<tr>
					<td rowspan="6" valign="top" width="<?php echo $params->get( 'column_width' ); ?>" align="left">
					<?php
					echo $params->get( 'marker_address' );
					?>
					</td>
				</tr>
				<?php
			}
			?>
			<?php
			if ( $contact->address && $params->get( 'street_address' ) ) {
				?>
				<tr>
					<td valign="top">
					<?php
					echo $contact->address;
					?>
					</td>
				</tr>
				<?php
			}
			if ( $contact->suburb && $params->get( 'suburb' ) ) {
				?>
				<tr>
					<td valign="top">
					<?php
					echo $contact->suburb;
					?>
					</td>
				</tr>
				<?php
			}
			if ( $contact->state && $params->get( 'state' ) ) {
				?>
				<tr>
					<td valign="top">
					<?php
					echo $contact->state;
					?>
					</td>
				</tr>
				<?php
			}
			if ( $contact->country && $params->get( 'country' ) ) {
				?>
				<tr>
					<td valign="top">
					<?php
					echo $contact->country;
					?>
					</td>
				</tr>
				<?php
			}
			if ( $contact->postcode && $params->get( 'postcode' ) ) {
				?>
				<tr>
					<td valign="top">
					<?php
					echo $contact->postcode;
					?>
					</td>
				</tr>
				<?php
			}
			?>
			</table>
			<br />
			<?php
		}
	}

	/**
	* Writes Contact Info
	*/
	function _writeContactContact( &$contact, &$params ) {
		if ( $contact->email_to || $contact->telephone  || $contact->fax ) {
			?>
			<table width="100%" cellpadding="0" cellspacing="0" border="0">
			<?php
			if ( $contact->email_to && $params->get( 'email' ) ) {
				?>
				<tr>
					<td width="<?php echo $params->get( 'column_width' ); ?>" align="left">
					<?php
					echo $params->get( 'marker_email' );
					?>
					</td>
					<td>
					<?php
					echo $contact->email;
					?>
					</td>
				</tr>
				<?php
			}
			if ( $contact->telephone && $params->get( 'telephone' ) ) {
				?>
				<tr>
					<td width="<?php echo $params->get( 'column_width' ); ?>" align="left">
					<?php
					echo $params->get( 'marker_telephone' );
					?>
					</td>
					<td>
					<?php
					echo $contact->telephone;
					?>
					</td>
				</tr>
				<?php
			}
			if ( $contact->fax && $params->get( 'fax' ) ) {
				?>
				<tr>
					<td width="<?php echo $params->get( 'column_width' ); ?>" align="left">
					<?php
					echo $params->get( 'marker_fax' );
					?>
					</td>
					<td>
					<?php
					echo $contact->fax;
					?>
					</td>
				</tr>
				<?php
			}
			?>
			</table>
			<br />
			<?php
		}
	}

	/**
	* Writes Misc Info
	*/
	function _writeContactMisc( &$contact, &$params ) {
		if ( $contact->misc && $params->get( 'misc' ) ) {
			?>
			<table width="100%" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td width="<?php echo $params->get( 'column_width' ); ?>" valign="top" align="left">
				<?php
				echo $params->get( 'marker_misc' );
				?>
				</td>
				<td>
				<?php
				echo $contact->misc;
				?>
				</td>
			</tr>
			</table>
			<br />
			<?php
		}
	}

	/**
	* Writes Email form
	*/
	function _writeVcard( &$contact, &$params ) {
		if ( $params->get( 'vcard' ) ) {
			?>
			<tr>
				<td colspan="2">
				<?php echo(_CONTACT_DOWNLOAD_AS);?>
				<a href="index2.php?option=com_contact&task=vcard&contact_id=<?php echo $contact->id; ?>&no_html=1">
				<?php echo(_VCARD);?>
				</a>
				</td>
			</tr>
			<?php
		}
	}

	/**
	* Writes Email form
	*/
	function _writeEmailForm( &$contact, &$params, $sitename, &$menu_params ) {
		global $Itemid;

		if ( $contact->email_to && !$params->get( 'popup' ) && $params->get( 'email_form' ) ) {
			// used for spoof hardening
			$validate = josSpoofValue();
			?>
			<tr>
				<td colspan="2">
				<br />
				<?php echo $params->get( 'email_description' ) ?>
				<br /><br />
				<form action="<?php echo sefRelToAbs( 'index.php?option=com_contact&Itemid='. $Itemid ); ?>" method="post" name="emailForm" target="_top" id="emailForm">
				<div class="contact_email<?php echo $menu_params->get( 'pageclass_sfx' ); ?>">
					<label for="contact_name">
						<?php echo(_NAME_PROMPT);?>
					</label>
					<br />
					<input type="text" name="name" id="contact_name" size="30" class="inputbox" value="" />
					<br />
					<label for="contact_email">
						<?php echo(_EMAIL_PROMPT);?>
					</label>
					<br />
					<input type="text" name="email" id="contact_email" size="30" class="inputbox" value="" />
					<br />
					<label for="contact_subject">
						<?php echo(_SUBJECT_PROMPT);?>
					</label>
					<br />
					<input type="text" name="subject" id="contact_subject" size="30" class="inputbox" value="" />
					<br /><br />
					<label for="contact_text">
						<?php echo(_MESSAGE_PROMPT);?>
					</label>
					<br />
					<textarea cols="50" rows="10" name="text" id="contact_text" class="inputbox"></textarea>
					<?php
					if ( $params->get( 'email_copy' ) ) {
						?>
						<br />
							<input type="checkbox" name="email_copy" id="contact_email_copy" value="1"  />
							<label for="contact_email_copy">
								<?php echo(_EMAIL_A_COPY); ?>
							</label>
						<?php
					}
					?>
					<br />
					<br />
					<input type="button" name="send" value="<?php echo(_SEND_BUTTON); ?>" class="button" onclick="validate()" />
				</div>
				<input type="hidden" name="option" value="com_contact" />
				<input type="hidden" name="con_id" value="<?php echo $contact->id; ?>" />
				<input type="hidden" name="sitename" value="<?php echo $sitename; ?>" />
				<input type="hidden" name="op" value="sendmail" />
				<input type="hidden" name="<?php echo $validate; ?>" value="1" />
				</form>
				<br />
				</td>
			</tr>
			<?php
		}
	}


	function nocontact( &$params ) {
		?>
		<br />
		<br />
			<?php echo _CONTACT_NONE;?>
		<br />
		<br />
		<?php
		// displays back button
		mosHTML::BackButton ( $params );
	}
}
?>

mrice9x
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Sat May 24, 2014 12:15 pm
Location: Ho Chi Minh city, VietNam

Re: Change contact form

Post by mrice9x » Tue May 27, 2014 7:53 am

I'm having the same problem.. Want to change the order but dont know how to do that... :(


Locked

Return to “Templates & CSS - 1.0.x”