Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

PHP Code

Asked Modified Viewed 3,879 times
B
Bruno
B
Bruno 10
  • Junior Member, joined since
  • Contributed 48 posts on the community forums.
  • Started 13 threads in the forums
  • Started this discussions
asked
Junior Member

Hey can some one help me out I'm trying put this on my website but when it's in php code I get errors so can some help me out to make it work in php code

<script type="text/javascript">
$(document).ready(function() {
$("a.zoom").fancybox();

$("a.zoom1").fancybox({
'overlayOpacity'   :   0.7,
'overlayColor'      :   '#000000'
});

$("a.zoom2").fancybox({
'zoomSpeedIn'      :   500,
'zoomSpeedOut'      :   500
});
});
</script>
0 replies

7 posts

P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

In

includes/header_includes.php

Replace by this code

<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: header_includes.php
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/

//Add your custom include files for the header here

?>
<script type="text/javascript">
$(document).ready(function() {
$("a.zoom").fancybox();

$("a.zoom1").fancybox({
'overlayOpacity'   :   0.7,
'overlayColor'      :   '#000000'
});

$("a.zoom2").fancybox({
'zoomSpeedIn'      :   500,
'zoomSpeedOut'      :   500
});
});
</script>
0 replies
B
Bruno
B
Bruno 10
  • Junior Member, joined since
  • Contributed 48 posts on the community forums.
  • Started 13 threads in the forums
  • Started this discussions
answered
Junior Member

Quote

PolarFox wrote:
In

includes/header_includes.php

Replace by this code

<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: header_includes.php
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/

//Add your custom include files for the header here

?>
<script type="text/javascript">
$(document).ready(function() {
$("a.zoom").fancybox();

$("a.zoom1").fancybox({
'overlayOpacity'   :   0.7,
'overlayColor'      :   '#000000'
});

$("a.zoom2").fancybox({
'zoomSpeedIn'      :   500,
'zoomSpeedOut'      :   500
});
});
</script>


does it work I try I don't get errors but the script does it work thx for your help I'm try to use it on a .php file that I have made but I don't want to add this to every file I make so I was trying to put it on themes/templates/header.php but I get erros

edit got it to work I just made like ou said on top but on themes/templates/header.php
Edited by Bruno on 09-01-2010 22:53,
0 replies
P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

Then add YOUR (not my) code above/below the all code in header.php OR insert like this (in any place of code):

?>
your html code
<?php
0 replies
B
Bruno
B
Bruno 10
  • Junior Member, joined since
  • Contributed 48 posts on the community forums.
  • Started 13 threads in the forums
  • Started this discussions
answered
Junior Member

Quote

PolarFox wrote:
Then add YOUR (not my) code above/below the all code in header.php OR insert like this (in any place of code):

?>
your html code
<?php

yeah I did it like that thx for the help just one more thing if you can help me I want to change the the way you open the forum pictures that are large and put this code class'zoom2' on the link that open the imagens the attach I got it to work but not the ones with the bbcode [img][/img]
0 replies
P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

See includes/forum_include.php

More questions?
0 replies
B
Bruno
B
Bruno 10
  • Junior Member, joined since
  • Contributed 48 posts on the community forums.
  • Started 13 threads in the forums
  • Started this discussions
answered
Junior Member

Quote

PolarFox wrote:
See includes/forum_include.php

More questions?


      if(span.className != "forum-img-wrapper"){
         continue;
      }
      
      if(resized){ //Insert the link and make the span inline
         span.style.display = "inline";
         if(parent.tagName != "A"){
            [b]span.onclick = new Function("OpenWindow('"+image.src+"', "+(width+40)+", "+(height+40)+", true)");[/b]
            span.onmouseover = "this.style.cursor='pointer'";
         }
      }else{ //only make the span inline
         span.style.display = "inline";
      }
   }
   return true;
}



is there any way to add class'zoom2' on span.onclick so it open with my other script

span.onclick = new Function("OpenWindow('"+image.src+"', "+(width+40)+", "+(height+40)+", true)");
Edited by Bruno on 11-01-2010 16:17,
0 replies
M
marthanws
M
  • Newbie, joined since
  • Contributed 1 post on the community forums.
answered
Newbie

Quote

Bruno wrote:

Quote

PolarFox wrote:
In

includes/header_includes.php

Replace by this code

<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: header_includes.php
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/

//Add your custom include files for the header here

?>
<script type="text/javascript">
$(document).ready(function() {
$("a.zoom").fancybox();

$("a.zoom1").fancybox({
'overlayOpacity'   :   0.7,
'overlayColor'      :   '#000000'
});

$("a.zoom2").fancybox({
'zoomSpeedIn'      :   500,
'zoomSpeedOut'      :   500
});
});
</script>


does it work I try I don't get errors but the script does it work thx for your help I'm try to use it on a .php file that I have made but I don't want to add this to every file I make so I was trying to put it on themes/templates/header.php but I get erros

edit got it to work I just made like ou said on top but on themes/templates/header.php


Thank you for posting the code here. I had a similar issue like the OP and your code truly helped. :)
0 replies

Category Forum

General Discussion

Labels

None yet

Statistics

  • Views 0 views
  • Posts 7 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

B
B
Bruno 10
  • Junior Member, joined since
  • Contributed 48 posts on the community forums.
  • Started 13 threads in the forums
  • Started this discussions
P
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
M
M
  • Newbie, joined since
  • Contributed 1 post on the community forums.

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet