free flash templates
free flash templates menu free css & photoshop templates menu free flash animation

PDA

View Full Version : Tips, tricks and additional source codes.


Anabass
06-10-2009, 05:35 PM
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/

Anabass
06-10-2009, 05:46 PM
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:


<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>

This is the code, that you import to your HTML file. Than you need to create independent file named "send.php", where you will write:

<?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");
?>

And it should look like this (of course I added also the text and the picture):

http://img197.imageshack.us/img197/4109/newsletter.jpg

mike athy
06-15-2009, 11:16 PM
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

freenicetemplates
07-10-2009, 07:36 AM
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:

function myFlashGallery (_src,_width,_height,_bgcolor,_divID,gallery) {
if (window.document.getElementById(_divID)) {
if (gallery == null){
gallery = 'gallery.xml';
}
window.document.getElementById(_divID).innerHTML=A C_FL_RunContentDiv( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0','width',_width,'heigh t',_height,'src',_src,'quality','high','pluginspag e','http://www.macromedia.com/go/getflashplayer','movie',_src,'bgcolor',_bgcolor,'a llowScriptAccess','sameDomain','allowFullScreen',' true','FlashVars','xmlFile='+gallery); //end AC code
AC_FL_RunContentDiv( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0','width','540','height ','418','src','flash/gallery/gallery','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','flash/gallery/gallery','bgcolor','#FFFFFF','allowFullScreen','tr ue'); //end AC code
} else {
alert("Div '"+_divID+"' not found ");
}
} - After, duplicate the _portfolio page where the second gallery will be added, for exemple call it _portfolio2.htm.

- In this new page _portfolio2.htm edit the content like this :
myFlashGallery('flash/gallery',540,418,'#000000','flash_id','gallery2.xm l');

- Duplicate gallery.xml file in 'gallery2.xml' and edit this file for the new gallery.

helgavalerie
12-26-2009, 09:35 AM
thanks for a useful thread, guys)))

freenicetemplates
01-12-2010, 09:53 AM
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 :

function showPage(pageURL,button_id) {
hideContent(pageURL);
if (selected_button!="" && button_id!=selected_button) {
sendToASUnselectButton('anim_'+selected_button);
}
selected_button = button_id;
}


by

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;
}

jstnice
05-10-2010, 06:08 AM
thanks for a sharing useful thread!!!

freenicetemplates
05-17-2010, 02:01 PM
You can add a link in the same page (like a button does) this way:
<a href="javascript:showPage('_mypage.htm');">mylink</a>

crystal8es
11-12-2010, 04:29 PM
thanks for a sharing useful thread!!!


I am a newbie here and just wanna say Hi to everyone. I am Crystal from Louisiana, US.


__________________
free photoshop tutorials (http://www.photoshop-garden.com)

Anabass
11-20-2010, 10:12 PM
I was searching for some minimal simple Facebook "like" button and this is it:

<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>

You can edit the width parameter or if you want other styles, you can do it here: http://developers.facebook.com/docs/reference/plugins/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:

<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.hitechweb.genezis.eu%2Fstealth 4f.htm&amp;t=Stealth%20technologies%20-%20British,%20Swedish%20and%20French%20aviation%20 programs%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 first part is the url of the myspace, where you will add the full URL of your own web page and after the "amp;t=" parameter you will write the title. Parameter "onclick" open the posting page on the new window and after "img" you should write the path for the icons. If you need some, you can cut them from here: http://www.parabolicarc.com/wp-content/plugins/sociable/images/services-sprite.png

The example of the result: http://www.hitechweb.genezis.eu/pi.htm

Anabass
11-20-2010, 10:29 PM
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:

<a href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.hitechweb.genezis.eu%2F stealth4f.htm&amp;partner=sociable" onclick="window.open(this.href); return false;"><img src="images/share/print.png" title="Print" alt="Print Hitechweb" class="standard"></a>

You again need to add your full url and the path for the icon.

Aigars
06-25-2013, 02:29 PM
Thanks. Useful tips. I am a beginner but I hope that you teach me:cool:

Aigars
06-25-2013, 02:30 PM
Thanks. Useful tips. lan online (http://www.laanpenge24.dk/) I am a beginner but I hope that you teach me:cool: