free flash templates forum

free flash templates forum (http://forum.freenicetemplates.com/index.php)
-   Free flash templates (http://forum.freenicetemplates.com/forumdisplay.php?f=2)
-   -   Tips, tricks and additional source codes. (http://forum.freenicetemplates.com/showthread.php?t=64)

Anabass 06-10-2009 05:35 PM

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/

Anabass 06-10-2009 05:46 PM

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>

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:

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

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

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

freenicetemplates 07-10-2009 07:36 AM

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:

function myFlashGallery (_src,_width,_height,_bgcolor,_divID,gallery) { 
if (
window.document.getElementById(_divID)) {
if (
gallery == null){
gallery 'gallery.xml';
}
window.document.getElementById(_divID).innerHTML=AC_FL_RunContentDiv'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0','width',_width,'height',_height,'src',_src,'quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie',_src,'bgcolor',_bgcolor,'allowScriptAccess','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','true'); //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.xml');

- 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

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

by

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


jstnice 05-10-2010 06:08 AM

thanks for a sharing useful thread!!!

freenicetemplates 05-17-2010 02:01 PM

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>

crystal8es 11-12-2010 04:29 PM

Quote:

Originally Posted by jstnice (Post 932)
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

Anabass 11-20-2010 10:12 PM

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

Code:

<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.hitechweb.genezis.eu%2Fstealth4f.htm&amp;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 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-conte...ces-sprite.png

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


All times are GMT. The time now is 05:04 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.