Forums / Cotonti / Support / fancybox

ruben
#1 2013-01-06 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 2013-01-06 18:58

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

ruben
#3 2013-01-06 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 2013-01-06 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 2013-01-06 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 2013-01-06 19:31

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

Something like:

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

 

ruben
#7 2013-01-06 19:36

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

Twiebie
#8 2013-01-06 19:40

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

ruben
#9 2013-01-06 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

<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 2013-01-06 19:58

Try this:

Add the fancybox files to skins/yourskin/fancybox

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

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

<a class="fancybox" href="linktoimage.png"><img src="linktoimage.png" alt=""/></a>
ruben
#11 2013-01-06 20:08

still no luck

Twiebie
#12 2013-01-06 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 2013-01-06 21:26

solved! smiley