• Resolved waynmeyer

    (@waynmeyer)


    Hi Guys

    Im using BadgeOS in jquery mobile template, ive tried adding

    <?php echo do_shortcode('[badgeos_achievements_list]'); ?>

    However i think the ajax handler is causing issues

    // AJAX Container
    	$badges .= '<div id="badgeos-achievements-container"></div>';
    	// AJAX handler: achievements_list_load_more()

    Is there any solution to this error? My theme is very basic on this custom page template i used this code.

    <?php
    /*
    Template Name: page-useraccount
    */
    ?>
    
    <?php get_header(); ?>
    
    <?php echo do_shortcode('[badgeos_achievements_list]'); ?>
    
    <?php get_footer(); ?>

    MY HEADER:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    
    <head profile="http://gmpg.org/xfn/11">
    
    	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
            <meta name="viewport" content="width=device-width, initial-scale=1">
    
    	<?php if (is_search()) { ?>
    	   <meta name="robots" content="noindex, nofollow" />
    	<?php } ?>
    
    	<title>
    		   <?php
    		      if (function_exists('is_tag') && is_tag()) {
    		         single_tag_title("Tag Archive for &quot;"); echo '&quot; - '; }
    		      elseif (is_archive()) {
    		         wp_title(''); echo ' Archive - '; }
    		      elseif (is_search()) {
    		         echo 'Search for &quot;'.wp_specialchars($s).'&quot; - '; }
    		      elseif (!(is_404()) && (is_single()) || (is_page())) {
    		         wp_title(''); echo ' - '; }
    		      elseif (is_404()) {
    		         echo 'Not Found - '; }
    		      if (is_home()) {
    		         bloginfo('name'); echo ' - '; bloginfo('description'); }
    		      else {
    		          bloginfo('name'); }
    		      if ($paged>1) {
    		         echo ' - page '. $paged; }
    		   ?>
    	</title>
    
    	<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    	<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
    	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    	<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
    	<?php wp_head(); ?>
    
            <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
            <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" />
            <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
            <script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script>
    
    <script language="javascript">
    $(document).bind('pageinit', function() {
    	/**
    	* you can't use css to position the element
    	* because the window height is a variant,
    	* so we use this function to calculate
    	*/
    	$('#popupPanel').on({
    		popupbeforeposition: function() {
    			var h = $(window).height();
    			$('#popupPanel').css('height', h);
    		}
    	});
    });
    </script>
    
    <script language="javascript">
        $(‘#showMap’).on(‘shown’,function(event){
    alert (“resizing”);
    google.maps.event.trigger(mapp0.getMap(),‘resize’);
    });
    </script>
    
    <script language="javascript">
         $(document).ready(function() {
            $(".dropdown dt a").click(function(event) {
            event.preventDefault();
                $(".dropdown dd ul").toggle('slow');
            });
            $(".dropdown dd ul li a").click(function(event) {
            event.preventDefault();
                $(".dropdown dd ul").hide();
            });
        });
    </script>
    
    </head>
    
    <body>
    
            <body <?php body_class(); ?>>
        <div data-role="page" data-theme="b">
             <div data-role="header" id="header" data-theme="b">
                <a href="javascript:history.back()" data-icon="arrow-l" rel="external">Back</a>
                <h1><?php bloginfo('name'); ?></h1>
                <a href="http://my.exampleapp.co.za/" rel="external" data-icon="home">Home</a>
    	</div>
    
            <div data-role="content">

    MY FOOTER:

    </div><!-- data role content-->
    	<footer data-role="footer" data-position="fixed" style="height:65px">
        <div data-role="navbar" data-iconpos="top" data-grid="d">
            <ul>
                <li><a rel="external" href="http://my.exampleapp.co.za/businesses/"><img style="margin-top: 0px;" src="http://my.exampleapp.co.za/wp-content/themes/example-mobile-app/images/example-app-icon.png" width="60%" height="auto"><br/><p style="font-size: 12px; margin-left: -5px;">example</p></a></li>
                <li><a rel="external" href="http://my.exampleapp.co.za/shop-categories/"><img style="margin-top: 0px;" src="http://my.exampleapp.co.za/wp-content/themes/example-mobile-app/images/shop-app-icon.png" width="60%" height="auto"><br/><p style="font-size: 12px;">Shop</p></a></li>
                <li><a rel="external" href="http://my.exampleapp.co.za/promotions/"><img style="margin-top: 0p x;" src="http://my.exampleapp.co.za/wp-content/themes/example-mobile-app/images/promo-app-icon.png" width="60%" height="auto"><br/><p style="font-size: 12px;">Promo</p></a></li>
                <li><a rel="external" href="http://my.exampleapp.co.za/durban-maps/"><img style="margin-top: 0px;" src="http://my.exampleapp.co.za/wp-content/themes/example-mobile-app/images/maps-app-icon.png" width="60%" height="auto"><br/><p style="font-size: 12px;">Maps</p></a></li>
                <li><a rel="external"href="http://my.exampleapp.co.za/durban-maps/"><img style="margin-top: 0px;" src="http://my.exampleapp.co.za/wp-content/themes/example-mobile-app/images/about-app.png" width="57%" height="auto"><br/><p style="font-size: 12px;">About</p></a></li>
            </ul>
        </div><!-- /navbar -->
    </footer>
    		<?php wp_footer(); ?>
    	</div><!-- data role content-->
    
    <script type="text/javascript">
    
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-34310861-5']);
      _gaq.push(['_trackPageview']);
    
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
    
    </script>
    </body>
    
    </html>

    http://wordpress.org/extend/plugins/badgeos/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    What sort of issues are arising? You never really clarify that part. Is it on the side of the shortcode content display? or perhaps a js issue with the Ajax portion?

    Thread Starter waynmeyer

    (@waynmeyer)

    Hi Michael

    Thank you for the reply, the issue is the ajax portion i presume. Because im using jquery mobile ui, the script

    jQuery(document).ready(function($){

    LOCATED IN: badgeos-achievements.js

    This is believe is my problem, references

    http://forum.jquery.com/topic/jquery-mobile-equivalent-of-document-ready

    I really hope there is a work around, i really need this plugin 🙂 its amazing!!!

    Again thank you for the response.

    Thread Starter waynmeyer

    (@waynmeyer)

    Hi Michael

    Just and update, after installing the BadgeOS stack addon i found that everything works when using the stack addon posts included. Using the same header and footer with the php do shortcode works fine. However when creating my own achievement it does not work. Will look into this and see if i can find a fix shortly.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    If you need me to bounce this off the BadgeOS people or file an issue right now, let me know, otherwise, it sounds like you’re still kicking the tires and debugging yourself. I don’t have an answer personally as I’ve never done much with jQuery mobile.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hey waynmeyer, just wanted to check back in with you and see if you had anything to report. If you found a solution, it’d be great to hear what it is, in case someone else has the same in the future.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Jquery mobile achievements list not loading’ is closed to new replies.