free flash templates free css & photoshop templates free flash animation |
|
#1
|
|||
|
|||
Tips, tricks and additional source codes.
I decided to create this thread to post some tips or part of the source code, that can be usefull for the others. There is no place for the posts about your problems. When you have some, consider to make independent thread.
So for the beginning: Some of you are modifying the web with the WYSWYG editors, what is not a best choice, because they usually add to the source code unwanted parts. So it is better to do your web with some text editor. Yes, everybody can use the Notepad, but my recommendation is the PSPad editor. It is freeware, so you dont need to pay anything and it has a lot of very usefull functions. It is also allocated to many languages. It can be downloaded here: http://www.pspad.com/ |
#2
|
|||
|
|||
Simple Newsletter script
I need to have some newsletter form on my web, where you can subscribe it, so probably it will be usefull for the others. It is very simple and has two forms: first is the e-mail and I added additional, that is the category (of the newsletter). The source code is:
Code:
<form action="send.php" method="post" name="form2"> <input type="text" size="20" name="emailaddr" value="@"><br><br> <input type="text" size="20" name="category" value="vsetko"><br><br> <input type="submit" value="Odoslať/Submit"> </form> Code:
<?php $to = "youremail@youremail.eu"; $useremail = $_POST['emailaddr']; $category = $_POST['category']; $subject = "Subject of the email"; $message1 = "Email: ".$useremail; $message2 = "Kategória: ".$category; mail($to,$subject,$message1,$message2); header("Location: ./index.htm"); ?> |
#3
|
|||
|
|||
Favicon
Here is a basic description on adding a favicon.
Favicon is short for favourite icon, they are the little picture or design next to the address in the address bar. They are also stored in your favourites list next to the name of the site so finding sites is easier. Create or copy your image and reduce the size to 16x16 Save as favicon.ico Some programs do not recognise this file format so save as png and convert your file to ico by visiting sites like this http://www.convertico.com Upload the generated file ("favicon.ico") to your site. It must be stored in the same directory as the web page it is associated with. Verify it's there by typing http://???.com/favicon.ico in the browser's location, where "???.com" is your site's address. Paste this code into the head tag of your web pages <link rel="icon" href="favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> For more info check out these sites http://www.html-kit.com/favicon/ http://tools.dynamicdrive.com/favicon/ http://htmlkit.com/services/favicon/ all the bst Mike www.mikeathyroses.com |
#4
|
|||
|
|||
Add a new photo gallery page (portfolio) - templates 7,8,9
Here are the steps to follow to the letter to add a new flash portfolio page :
- Replace function myFlashGallery in file js/main.js : lines 61 to 68 by these ones: PHP Code:
- In this new page _portfolio2.htm edit the content like this : myFlashGallery('flash/gallery',540,418,'#000000','flash_id','gallery2.xml'); - Duplicate gallery.xml file in 'gallery2.xml' and edit this file for the new gallery.
__________________
We are always pleased to read you in our guestbook |
#5
|
|||
|
|||
thanks for a useful thread, guys)))
|
#6
|
|||
|
|||
Add an absolute URL or a link to an other website from a flash button
Here is the hack to allow absolute URL in flash buttons and open them in a new window.
If you want the link top open in the same window replace _blank by _self. Open the file js/main.js and replace at the end of the file function : Code:
function showPage(pageURL,button_id) { hideContent(pageURL); if (selected_button!="" && button_id!=selected_button) { sendToASUnselectButton('anim_'+selected_button); } selected_button = button_id; } Code:
function showPage(pageURL,button_id) { if (pageURL.substring(0,4).toLowerCase()=='http') { window.open(pageURL, '_blank'); return; }; hideContent(pageURL); if (selected_button!="" && button_id!=selected_button) { sendToASUnselectButton('anim_'+selected_button); } selected_button = button_id; }
__________________
We are always pleased to read you in our guestbook |
#7
|
|||
|
|||
thanks for a sharing useful thread!!!
|
#8
|
|||
|
|||
Add a text link like a flash button
You can add a link in the same page (like a button does) this way:
<a href="javascript:showPage('_mypage.htm');">mylink</a>
__________________
We are always pleased to read you in our guestbook |
#9
|
|||
|
|||
Social networks
I was searching for some minimal simple Facebook "like" button and this is it:
Code:
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="---your full url---" layout="button_count" width="80" font="arial"></fb:like> There are a lot of free services that will help you to share your pages on the social networks, but if you (as I) want for some reason to create the manual links that doesnt depend on external service and that doesnt add any advertisements, here is the source. The example is for Myspace: Code:
<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.hitechweb.genezis.eu%2Fstealth4f.htm&t=Stealth%20technologies%20-%20British,%20Swedish%20and%20French%20aviation%20programs%20and%20solutions" onclick="window.open(this.href); return false;"><img src="images/share/myspace.png" class="standard" title="MySpace" alt="Hitechweb at MySpace"></a> The example of the result: http://www.hitechweb.genezis.eu/pi.htm Last edited by Anabass; 11-20-2010 at 10:14 PM. |
#10
|
|||
|
|||
There is also interesting web service that will make your web page printer friendly and also has the ability to convert it to the PDF format: http://www.printfriendly.com/ You can use the same sort of source code to link it directly:
Code:
<a href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.hitechweb.genezis.eu%2Fstealth4f.htm&partner=sociable" onclick="window.open(this.href); return false;"><img src="images/share/print.png" title="Print" alt="Print Hitechweb" class="standard"></a> |
|
|