web design quote

Web Design Los Angeles

Non-Standard fonts on web site @font-face


You can use CSS to embed non-standard fonts in web-pages. Here is a sample:

<style type="text/css">
@font-face {
font-family: Coldsmith;
src: url(/fonts/Coldsmith/ttf/Coldsmith.ttf) format("truetype");
 }
</style>

and then just add

style="font-family: Coldsmith;"

to your <div> or <td> tag.


There's a good list of fonts you can embed in your web page for free here.

 

Show or hide div based on URL link


So I would like to show or hide div content based on URL link or page name. You can use this method to show/hide banners, navigation/menu, footer, header or whatever you want.

I would like to hide DIV with ID=divfooter when you hit page named "PageName.html".
NOTE: It doesn't have to be HTML page! Could be .htm, .php, .aspx etc. It look for the word 'PageName' anywhere in URL not for the actual HTML page. So link: 'http://www.yourwebsite.com/index.php?pagename/function=?welcome' would work as well since there is 'pagename' in it.

So first...you add this script to the <head> section of your page.
 

<script type = "text/javascript">

function showDiv() {
var url = window.location.href;
if (/(PageName)/i.test(url)) {
document.getElementById("divfooter").style.display="none";
}
else {
document.getElementById("divfooter").style.display="block";
}
}
</script>


Second...you add onload function to the <body> tag

<body onload = "showDiv()" >

DONE! Now every time you visit PageName.html your divfooter DIV will be hidden.

And here is how your HTML code should look like...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type = "text/javascript">

function showDiv() {
var url = window.location.href;
if (/(PageName)/i.test(url)) {
document.getElementById("divfooter").style.display="none";
}
else {
document.getElementById("divfooter").style.display="block";
}
}
</script>
</head>

<body onload = "showDiv()" >

<div id="divfooter">
Any content here...
</div>

</body>
</html>
 

 

Virtuemart Test Order with Authorize.net


How to test authorize.net payment module in VirtueMart and Joomla.

Use authorize.net in TEST mode and set the payment module in Virtuemart to test mode “Yes”.
Place an order on your website by selecting  MASTERCARD, Credit Card Number: 5424000000000015, any Name, any Expiration Date & any CCV Code.

Take authorize.net out of TEST mode when you are ready to go live.

 

CSS Image Rollover


The CSS method uses an image sprite to load all the rollover effects as a single image and then we use CSS to do the transition. To create the image sprite just create a single image containing image/button and rollover image/button right next to it (side by side).
Once you have your image sprite you just need the HTML and CSS code:

CSS Code:

a.rollover {
	display: block;
	width: 150px;
	height: 44px;
	text-decoration: none;
	background: url("image.jpg");
	}

a.rollover:hover {
	background-position: -150px 0;
	}


HTML Code:

<a href="#" class="rollover" title="Image rollover"></a>

 

 

Mailto Subject, Copy, Body...


Mailto parameter should be preceded by "?" for the first or only parameter and "&" for second and subsequent parameter.

Some MailTo Syntax examples included below:

Simple MailTo link:
<a href="mailto: This e-mail address is being protected from spambots. You need JavaScript enabled to view it ">

MailTo with Multiple Recipients:
<a href="mailto: This e-mail address is being protected from spambots. You need JavaScript enabled to view it , This e-mail address is being protected from spambots. You need JavaScript enabled to view it ">

MailTo with Subject:
<a href="mailto: This e-mail address is being protected from spambots. You need JavaScript enabled to view it ?subject=Comment from your website">

MailTo with a Copy:
<a href="mailto: This e-mail address is being protected from spambots. You need JavaScript enabled to view it ?cc= This e-mail address is being protected from spambots. You need JavaScript enabled to view it ">

MailTo with a Blind Copy:
<a href="mailto: This e-mail address is being protected from spambots. You need JavaScript enabled to view it ?bcc= This e-mail address is being protected from spambots. You need JavaScript enabled to view it ">

MailTo with Message Started in body:
<a href="mailto: This e-mail address is being protected from spambots. You need JavaScript enabled to view it ?body=I have a question about your services ">

MailTo with Subject, a Recipient, a Copy and a Blind Copy
<a href="mailto: This e-mail address is being protected from spambots. You need JavaScript enabled to view it ?subject=Comment from your website&cc= This e-mail address is being protected from spambots. You need JavaScript enabled to view it &bcc= This e-mail address is being protected from spambots. You need JavaScript enabled to view it ">
 

 

Remove jcomments footer link


To remove jcomments link from the footer just look in file tpl_index.php (located in components folder: components/com_jcomments/tpl/default/tpl_index.php)

Search for "comments-footer" (liine 56)

<div id="comments-footer" align="center"><?php echo $this->getVar('support'); ?></div>

and either delete that line or comment it out.

 

JFolder::create: Could not create directory


JFolder::create: Could not create directory
Warning! Failed to move file.

Happens when you move from one host to another. When we move a Joomla site from one server to another, the log & tmp functions present in the configuration.php file contains the directory path where you had previously installed Joomla on the old server.

The fix for this error is very simple. Just follow the steps below:

1. Using  any FTP client goto your root Joomla folder and open the configuration.php file.

2. Find var $log_path, it will contain the directory path of your old server.
Just replace the whole line with the code var $log_path = './logs';

3. Find var $tmp_path, it will also have the directory path of your old server.
Just replace the whole line with the code var $tmp_path = './tmp';

That’s it! Your problem is solved!