Foren / Cotonti / Support / fancybox

ruben
#1 6. Januar 2013, 18:51

 

hello,

I'm trying to get the plugin fancybox u submitted to work but it won't work
when i upload the files it says in the admin plugin page: Warning: No tags found in ./plugins/fancybox/fancybox.setup.php

how can i get this plugin to work?

Twiebie
#2 6. Januar 2013, 18:58

Have a look at this small guide: http://www.cotonti.com/docs/help/fancybox_integration

ruben
#3 6. Januar 2013, 19:04

i did but i have no folder named themes, but skins...so i didnt know what to do with this guide either...

Twiebie
#4 6. Januar 2013, 19:25

Ah, you are still using Genoa.

You could try to drop the files in your skins folder instead then.

I'm not sure cot_rc_add_file() will work on Genoa though, so you might have to include those files into your theme yourself.

ruben
#5 6. Januar 2013, 19:28

ok i'll give it a try

what do i do with 1.4?

 

1.4. Initialize the plugin in themes/nemesis/js/js.js:

?
1
$(".fancybox").fancybox();

 

Twiebie
#6 6. Januar 2013, 19:31

You could put that in your header.tpl or footer.tpl file yourself aswell.

Something like:

JavaScript
1
2
3
4
5
<script type="text/javascript">
$().ready(function() {
    $(".fancybox").fancybox();
});
</script>

 

ruben
#7 6. Januar 2013, 19:36

not working, it just opens the img in the same window

Twiebie
#8 6. Januar 2013, 19:40

Can you paste the code as you have it now, the stuff you included, etc?

ruben
#9 6. Januar 2013, 19:42

i put the files in the skins/skinname folder
also tried skins/skinname/js/fancybox and skins/skinname/fancybox

also added class="fancybox" to the img url
this i added in header.tpl

XML/XHTML
1
2
3
4
5
6
7
<link href="skins/{PHP.skin}/jquery.fancybox.css" type="text/css" rel="stylesheet" / >
<script type="text/javascript" src="skins/{PHP.skin}/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
$().ready(function() {
    $(".fancybox").fancybox();
});
</script>

 

Twiebie
#10 6. Januar 2013, 19:58

Try this:

Add the fancybox files to skins/yourskin/fancybox

Include the necessary files in your header.tpl like this:

XML/XHTML
1
2
3
4
5
6
7
8
<link href="skins/{PHP.skin}/fancybox/jquery.fancybox.css" type="text/css" rel="stylesheet" / >
<script type="text/javascript" src="skins/{PHP.skin}/fancybox/jquery.fancybox.pack.js"></script>
 
<script type="text/javascript">
$().ready(function() {
    $(".fancybox").fancybox();
});
</script>

You also need to add the fancybox class to the img bb code, try it out first with simply adding an image like this somewhere in your theme to see if it works:

XML/XHTML
1
<a class="fancybox" href="linktoimage.png"><img src="linktoimage.png" alt=""/></a>
ruben
#11 6. Januar 2013, 20:08

still no luck

Twiebie
#12 6. Januar 2013, 20:26

Join the Cotonti chat channel here: http://www.cotonti.com/chat and I'll try to help you out if you want.

ruben
#13 6. Januar 2013, 21:26

solved! smiley