Results 1 to 4 of 4

Thread: jQuery "Tonic Gallery" XML - Need help making it work in PHP

Hybrid View

  1. #1
    Join Date
    Jun 2012

    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: http://codecanyon.net/item/tonic-gal...gallery/120710

    LincHospitality.com: http://linchospitality.com/

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

    HTML Code:
    <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">
    		// init the portfolio functionality
    		$('#portfolio_wavy').portfolioSetter({xmlSource:'portfolio.xml', wavyAnimation:true});
    I had then created the "portfolio.php" page with the required input from the plugin:

    PHP Code:
    <?php $page "portfolio";?>
    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"); ?>
    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".


    Any help is appreciated! Thanks!

  2. #2
    Join Date
    Jun 2012
    I'm really hoping someone can get back with me. I found a problematic source. The message given is

    $("#portfolio_wavy").portfolioSetter is not a function
    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?

  3. #3
    Join Date
    May 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!

    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

    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,
    Last edited by VBAssassin; 06-02-2012 at 06:43 PM.

  4. #4
    Join Date
    Jun 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!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center