Add .js (Page Peel Off Script) to album
fabiansfx
Joined: 2009-12-11
Posts: 6 |
![]() |
For a special website feature I need a page peel off effect which I found on this site: http://www.marcofolio.net/webdesign/create_a_peeling_corner_on_your_website.html I cannot find out on which page to embed the code so the peel off effect shows on all pages. Can someone please help me? Thanks! Fabian |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
Don't know which theme you're using. But if using Matrix or most standard themes, you'd probably need to add the code to /themes/YourTheme/templates/local/theme.tpl Be sure to wrap the javascript in {literal} tags: {literal} JAVASCRIPT HERE {/literal} I bolded the local directory above for you to take note that you should create that directory and copy the theme.tpl file into that directory and make your changes there. See this for more info: |
|
fabiansfx
Joined: 2009-12-11
Posts: 6 |
![]() |
ok!! I understand the Local part, but the placing of the script is not important within the theme.tpl? |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
Think of theme.tpl as your "normal" .html page. That's where the head and body of the html page is defined. So, I'd probably just follow the instructions on that other page. Honestly, I'd probably see if I could put the JS into a separate .js file and load that so you're not re-downloading all of that JS with every single page load. But if you do put the JS in the smarty based .tpl page you'll need to be sure to wrap it with {literal} tags. |
|
fabiansfx
Joined: 2009-12-11
Posts: 6 |
![]() |
Thanks I thought it was just simple copy paste, but those {literal} tags must be more like: {if $theme.pageType == 'album' || $theme.pageType == 'photo'} But I have to spend more time on this.. tis is completely new to me |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
See this for more info on the literal tag: |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
You don't need literal tags if youy are just adding: But in your above example for only adding the code the albums and photo pages then you need to close the if: Dave |
|
fabiansfx
Joined: 2009-12-11
Posts: 6 |
![]() |
hmmm.. I must be missing something. I cannot get this simple thing to work... |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
fabiansfx
Joined: 2009-12-11
Posts: 6 |
![]() |
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Edit the js file jaaspeel.ad_url = escape('http://www.marcofolio.net/other/bloggers_unite_-_blog_against_abuse.html'); jaaspeel.small_path = 'http://EXAMPLE.com/gallery2/peel/small.swf'; jaaspeel.small_image = escape('http://EXAMPLE.com/gallery2/peel/small.jpg'); jaaspeel.small_width = '100'; jaaspeel.small_height = '100'; jaaspeel.small_params = 'ico=' + jaaspeel.small_image; jaaspeel.big_path = 'http://EXAMPLE.com/gallery2/peel/large.swf'; jaaspeel.big_image = escape('http://EXAMPLE.com/gallery2/peel/large.jpg');
Dave |
|
fabiansfx
Joined: 2009-12-11
Posts: 6 |
![]() |
Thank you all!! It finally worked! Just to see what happenes, I tried the same thing on Safari in 'private mode / no cache' and it worked like a charm! Thank you all for helping me out! |
|