Forum Replies Created

Viewing 15 replies - 1 through 15 (of 20 total)
  • So is there any resolution to this? I even tried loading the ads into objects and saving them as super globals to display on the ajax loaded page and the first one works, but none of the ones ajax loads.

    Thread Starter FurySting

    (@furysting)

    Sounds awesome. I really do appreciate your plugin. What I ended up doing to put use your plugin without the rest of the footer was this…

    function mobileweb_remove_from_footer() {
        global $post;
        $post_type = get_post_type();
    	$isArchive = is_post_type_archive();
        if ($post_type == 'mw' && !$isArchive) {
          global $wp_scripts;
          foreach( $wp_scripts->queue as $handle ) :
            wp_dequeue_script($handle);
          endforeach;
          wp_dequeue_style('dynamix-style');
    
          wp_enqueue_script('wp_slimstat');
       }
    }
    add_action( 'wp_footer', 'mobileweb_remove_from_footer',1 );

    In case someone else wants to do that too, I am removing all javascript from the footer when it’s my specific post type and then adding back in slimstat.

    I’m working on a way to tie the event clicks to the posts they are from easier as well. But everything I am doing is just a hack on top of your awesome code.

    Anyway, It’s working great and making it so I can tell someone how many times their post is hit and then how many times that say their song was played, or their twitter feed was accessed, etc.

    Thanks again for the great plugin.

    Thread Starter FurySting

    (@furysting)

    So do I just ask stupid questions? Am I rude? Or are they to hard to answer?

    I have not gotten a response from the author on any of my questions and have found a way to do each thing on my own but it would be awesome to at least get a response.

    If anyone would like to know an easy way to pull slimstat into a custom post type that doesn’t use the entirety of wp_footer and adds tracking of individual clicks without slowing down the page they are on just ask, I will respond.

    Can I automatically generate this without calling wp_footer? the rest of the code embeded into a page is pretty static.

    Thread Starter FurySting

    (@furysting)

    Ok answered half of this myself. I wasn’t formatting the call to your function properly. I needed to pass the click event as a var to it instead of some text.

    $('#someid').click(function(variable) {
       if(typeof SlimStat.ss_track == 'function')
         SlimStat.ss_track(variable, 5, 'Info on what was clicked');
       });

    Now it’s working…

    So are you tired of me asking question then figuring it out on my own? I’ll try to stop asking inane questions.

    Thread Starter FurySting

    (@furysting)

    Ok well I was wrong.. The above did the trick for WP and did add it to the listing in SlimStats and to the wp_slim_content_info table but it is not adding any content id’s and tracking anything. In looking at the slimstat code it looks like you are handling custom post types some how with cpt:$post_type but I can’t figure it out yet.

    Any help please?

    Thread Starter FurySting

    (@furysting)

    Ok answering my own question here…

    To add your custom post type to the category listing you need to add the ‘taxonomies’ => array(‘category’) to your register post type initially. Then create a post category you want to use for it. and assign that category on post creation.

    Then add a function to append the query that goes after categories to include your custom post type.

    function my_custom_type_in_categories( $query ) {
        if ( $query->is_main_query()
        && ( $query->is_category() || $query->is_tag() ) ) {
            $query->set( 'post_type', array( 'post', 'mw' ) );
        }
    }
    add_action( 'pre_get_posts', 'my_custom_type_in_categories' );

    So in this case I am adding an action whenever anything in WP goes after the get posts and category or tag is specified amd changing the query set to include both post which is the standard and my custom post type of ‘mw’. Doing this I now see this custom post type in the reporting on slimstats and the category filter works in all of WP as well. Add all your custom post types to this as members of the array.

    Happy Coding!

    Thread Starter FurySting

    (@furysting)

    I got it! You definitly put me on the right track, thanks so much!

    The issue was actually with a combination of the rotatingtweets div and the rtw_main paragraph element, for some reason it would not resize within the paragraph even after the div size was fixed.

    I set the target width to the width of the div wrapping the whole page #mainContainer then set the rotating tweets container to that size and the rtw_main paragraph to 100% so it still allows room for the retweet etc. Looks so far like it works the charm!

    `
    $(“#tweetButton.open”).click(function() {
    $(‘#tweetContainer’).show();
    $(‘img#tweetButton.open’).hide();
    $(‘img#tweetButton.close’).show();
    $(‘#containerSlide’).cycle(‘pause’);
    var targetwidth = $(‘#mainContainer’).width();
    $(‘#’ + tweetSlidesID).width(targetwidth);
    $(‘p.rtw_main’).width(‘100%’);
    $(‘#’ + tweetSlidesID).cycle(‘resume’);
    });

    John

    Thread Starter FurySting

    (@furysting)

    This works perfectly on the PC and even on a tablet running chrome but it only works sporatically on a phone running android with the default browser.

    Thread Starter FurySting

    (@furysting)

    Martin,

    Thanks for the super quick reply! By version 2 of the javascript do you mean cycle2? If so I tried cycle2 and it resized the rotatingtweet container down to just a couple of pixels wide. I am using the development version of your plugin however.

    Here is a link to a page with the tweets on it. I have debug turned on.

    I have two cycle instances running on this page one with the ID containerSlide and rotatingtweets in a parent div named tweets. I pause containerSlide when opening tweets so the two cycle instances don’t compete for resources on the mobile phones.

    Here is the code I am using to open and close my div’s etc.

    var tweetSlidesID = $("#tweets div:first-child").attr("id");
        $('#' + tweetSlidesID).cycle('pause');
        $("#tweetButton.open").click(function() {
           $('#tweetContainer').show();
           $('img#tweetButton.open').hide();
           $('img#tweetButton.close').show();
           $('#containerSlide').cycle('pause');
           $('#' + tweetSlidesID).cycle('resume');
           $(window).resize();
        });
        $("#tweetButton.close").click(function() {
           $('#' + tweetSlidesID).cycle('pause');
           $('#tweetContainer').hide();
           $('img#tweetButton.close').hide();
           $('img#tweetButton.open').show();
           $('#containerSlide').cycle('resume');
       });

    Thanks so much for looking at this!

    John

    hard to believe you’re the only person with this issue. I appreciate you sharing your work on it. I keep turning off CDN although I could really use it because some of my images are uploaded through external scripts and aren’t stored in the media library at all. It seems extremely hit and miss whether these images get pushed out to the cloud. Anyway hoping your solution will work for me as well, gotta dig in and see how you’re doing it. Anyway just wanted to let you know there’s lots of need for this and I appreciate your work.

    Are you inserting them in the email.php? Figured I would find that in the main php somewhere.

    Ok one last question then, as I have a deadline and I need to figure out a work around as the client is on WordPress 3.4.8 and is not wanting to upgrade due to a lot of prior mods to WP it’s self, before I came along…

    Where are you inserting the entries? I see where the form comes back after submission and goes to conformation but I am not seeing anywhere you actually populate the database with the entry.

    I own pro and several of the add-ons and would really appreciate if you could point me in the right direction.

    Thanks,
    John

    I have been having issues hooking to vfb_confirmation, and to vfb_after_notify_email. vfb_after_email works fine however.

    Any idea when the next version of pro is goign to ready for primetime?

    Thanks for a great plugin and support by the way!

    John

    In wordpress that’s more of a custom template for a standard post type or a custom post type all together.

    Is your goal to stay out of the dashboard with this form?

    If not the easiest way it to create category for your posts of this type and a template and use custom fields. Then enter them as usual selecting the template you created.

Viewing 15 replies - 1 through 15 (of 20 total)