/    Sign up×
Community /Pin to ProfileBookmark

jQuery "Tonic Gallery" XML – Need help making it work in PHP

I have just purchased “Tonic Gallery” which my client thinks it’s absolutely perfect for his website. The difficulty is that it works great with HTML but for “.php” it won’t even load.

To give you a better idea, here two links:

Tonic Gallery Link: [URL=”http://codecanyon.net/item/tonic-gallery-jquery-xml-portfolio-gallery/120710″]http://codecanyon.net/item/tonic-gallery-jquery-xml-portfolio-gallery/120710[/URL]

LincHospitality.com: [URL=”http://linchospitality.com/”]http://linchospitality.com/[/URL]

This is inputed into the “Portfolio” tab. As per instructions, I have entered the following into the “head” (header.php):

[code=html]<link rel=”stylesheet” type=”text/css” href=”styles/tonic_gallery.css”/>
<link rel=”stylesheet” type=”text/css” href=”styles/demo_styles.css”/>
<link rel=”stylesheet” type=”text/css” href=”styles/prettyPhoto.css”/>

<script type=”text/javascript” src=”script/jquery-1.4.js”></script>
<script type=”text/javascript” src=”script/jquery-easing.js”></script>
<script type=”text/javascript” src=”script/jquery.prettyPhoto.js”></script>
<script type=”text/javascript” src=”script/portfolio-setter.js”></script>
<script type=”text/javascript”>
$(function(){
// init the portfolio functionality
$(‘#portfolio_wavy’).portfolioSetter({xmlSource:’portfolio.xml’, wavyAnimation:true});

});
</script>[/code]

I had then created the “portfolio.php” page with the required input from the plugin:

[code=php]<?php $page = “portfolio”;?>
<?php include(“header.php”); ?>

<div role=”main”>
<div class=”wrapper” id=”subPagesWrap”>
<div id=”portfolio_wavy”></div>
</div><!– wrapper –>
</div> <!– end main –>

<?php include(“footer.php”); ?>[/code]

The functions are not activating and I need help around it. Here is a link to the “.html” files as to how it’s suppose to work. Same functions, same root folder just not working in “.php”.

[URL=”http://linchospitality.com/gallery.html”]http://linchospitality.com/gallery.html[/URL]

Any help is appreciated! Thanks!

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@dgPehrsonauthorJun 02.2012 — I'm really hoping someone can get back with me. I found a problematic source. The message given is

[CODE]$("#portfolio_wavy").portfolioSetter is not a function[/CODE]

This is just fine in a .html doc but in a .php this error shows. Is this the main problem? Is it an easy fix for the plugin to cooperate with .php?
Copy linkTweet thisAlerts:
@VBAssassinJun 02.2012 — PHP is a server side language, so the problem is likely to do with the data that is returned from PHP. It's not that the JavaScript isn't compatible with PHP, it's maybe that the data being returned is wrong! :p

You need to look at the dataset that the javascript function is working with and for starters make sure the "XML" is properly formed.

Then debug the javascript using firefox's addon, "firebug".

You've not given us enough to work with to help you with this :p

From what you have said with it working with other XML... it sounds like the data being returned by PHP is incorrect so you may want to check that part out and take it from there

Kind regards,

Scott
Copy linkTweet thisAlerts:
@dgPehrsonauthorJun 03.2012 — Thanks for the response Scott. I figured it out but took my day to do so. The previous developer before me loaded the jQuery in the footer instead of the header. I missed and attempted to load an additional JQuery command and they contradicted one with another. It took the removal of the footer to fix it. Just a small issue that took my hole day. ? Thanks again!
×

Success!

Help @dgPehrson spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...