I wrote jQuery script for fading all pages before open and include jQuery in "header.tpl" in template.
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
And I use "lightbox" plugin. It include jQuery too and this causes a conflict. As a result, the plugin does not work.
How I can include jQuery with piwigo functions?
Last edited by EvilKant (2012-05-28 19:14:04)
Offline
Hello
http://piwigo.org/doc/doku.php?id=dev:c … own_script
edit
update link
Last edited by ddtddt (2012-05-28 19:19:41)
Offline
have you test [extension by ddtddt] Add < head > Element
Offline
ddtddt wrote:
have you test [extension by ddtddt] Add < head > Element
It did not help.
Offline
flop25 wrote:
Hello
http://piwigo.org/doc/doku.php?id=dev:c … own_script
edit
update link
thx!
{combine_script id='jquery' path='themes/default/js/jquery.min.js'} working
Offline
Strange behavior of picture.tpl.
jQuery included, but my script still does not work. And it don't show {$menubar}. Rather, menubar is showing, but menubar-array is empty.
Offline
post your code :)
Offline
header.tpl
{combine_script id='jquery' path='themes/default/js/jquery.min.js'}
<script type="text/javascript">{literal}
$(document).ready(function() {
$('#content_wrap').hide();
$('#content_wrap').fadeIn(1000);
});
{/literal}
</script>
picture.tpl used from default template.
Div "content_wrap" starting after header in header.tpl and ending in footer.tpl. But it isnot in my script - I was test with simple "alert" function and it don't work too.
Offline
Problem is solved. I combine my script too and now it is work everywhere.
Offline
Script is working, but in footer I see that:
Warning: filemtime() [function.filemtime]: stat failed for ./themes/default/js/ui/minified/jquery.ui.01.min.js in F:\AppServ\www\picmun\include\template.class.php on line 1240
Offline
because this file doesn't exist, use jquery.effects.fade (it's the effect you need isn't it ?)
Offline
And again...
jQuery included:
{combine_script id='jquery' load='async' path='themes/default/js/jquery.min.js'}
but... on picture.tpl jQuery don't working...
It is my last step in socialnet button creation :)
Offline
ok can you post your whole code because here it's hard
Offline
header.tpl
...
{combine_script id='jquery' load='footer' path='themes/default/js/jquery.min.js'}
</head>
<body id="{$BODY_ID}" onLoad="vkButton('{$ROOT_URL}', '{$current.thumbnail}')">
<div class="vkBut"></div><!-- it is here just for test-->
...
footer.tpl
{combine_script id="vk_share" load='async' path="http://vkontakte.ru/js/api/share.js"}
{footer_script}{literal}
function vkButton(rootURL, imageSRC)
{
$('.vkBut').html(VK.Share.button({
url: document.location.href,
title: "Picture Munchkin",
description: "Супергероини в трико и без",
image: rootURL+imageSRC
}));
}
{/literal}
{/footer_script}
I see my button at main page, at any page, exept page with big picture(picture.tpl). I found that at this page does not work exactly jQuery. If I write something like $('.vkBut').html('bla bla bla') , this don't work too.
Last edited by EvilKant (2012-06-05 21:50:46)
Offline
I found it!
At my computer I have old, but updated last version of piwigo. And jQuery didn't work on pictur.tpl.
At my notebook I have installed last version of piwigo. And all works!
At past I had problems with translations too. Updated version don't have all words in translate. I was copy it from notebook.
Offline