Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter thinkluke

    (@thinkluke)

    I tried again and still not working..

    var subid = jQuery('.hsubscribe').find('form').attr('id'),
    		subid = subid.replace('gform_',''),
    		sb_subscribe = jQuery('.hsubscribe').find('form').attr('id'),
    		sb_subscribe = sb_subscribe.replace('gform_','');
    		
    	console.log(subid + sb_subscribe);
    	
    	jQuery(document).bind("gform_confirmation_loaded", function (e, form_id) {
    		if(form_id == subid || form_id == sb_subscribe) {
    			console.log('works now');
    			Cookies.set('subscribe', 'subscribed', { expires: 365 });
    			ga('send', 'event', 'subscribed', 'subscribed to newsletter');
    			setTimeout(function(){
    				jQuery('.hsubscribe').slideUp();
    				fbq('trackCustom', 'Newsletter', {
    					content_name: 'Newsletter Signup',
    					content_category: 'Audience'
    				});
    			}, 2000);
    		}
    	});	
    Thread Starter thinkluke

    (@thinkluke)

    no wait that doesnt work because all forms are now changed. argh

    Thread Starter thinkluke

    (@thinkluke)

    Ahhh. its very ugly but i fixed it.

    jQuery(document).bind("gform_confirmation_loaded", function (e, form_id) {
    if(form_id != 1 || form_id != 2 || form_id != 3 || form_id != 4 || form_id != 5 || form_id != 7) {
    Thread Starter thinkluke

    (@thinkluke)

    this blocks all payment methods and user is unable to checkout.

    Hi SendGrid – this is still a issue..

    Downlaoded the latest github version of https://github.com/sendgrid/sendgrid-php

    And recieve the following error:

    Fatal error: Class ‘Guzzle\Http\Client’ not found in /public_html/olyhomes/sendgrid-php-master/lib/sendgrid.php on line 85

    Thread Starter thinkluke

    (@thinkluke)

    Thanks mercime, yeah I had a look at the activity plus thing, its okay but no taxonimy options and clunky. Thats all good, I used drupal for the first time last night and it blew my mind, perfect cms for what I am doing.. for this project its leaving wordpress in the dark.
    Thanks again

    Thread Starter thinkluke

    (@thinkluke)

    also dude that is outside of the gravity forms support FFS. I paid some money at wpquestions.com and they cant even help

    Thread Starter thinkluke

    (@thinkluke)

    Thanks Mercime, no one seems to be able to help me out no on the bp_activity_add function works.. Anyways I just built the core functionality I wanted in Drupal last night in 6hrs. No need to worry about stupid buddypress and its poor documentation

    I have been trying to solve this problem for days but i can’t seem to find a solution… has anyone figured it out?

    Thread Starter thinkluke

    (@thinkluke)

    <?php
    // Amount of posts in the first query
    $qry[1] = 2;
    // Amount of posts in the second query
    $qry[2] = 3;
    // Total posts per page (sum of the 3 above values)
    $qry['total'] = array_sum($qry);
    // If paged is set then set the paged variable to that value, else it's 1 (the first page)
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $onum = ($qry['total'] * ($paged - 1)); // $paged is a mutliplier
    // If paged is more then 1 then set to the total of posts to show this page, else it's page one, so no offset
    $offset = ($paged > 1) ? ($onum) : 0;
    query_posts("posts_per_page=$qry[total]&paged=$paged&showposts=$qry[1]&offset=$offset");
    if (have_posts()) :
    	while (have_posts()) : the_post();?>
    
    <div class="post">
    <div class="date">
    <span class="day"><?php the_time('j') ?></span>
    <span class="month"><?php the_time('M') ?></span>
    <span class="year"><?php the_time('Y') ?></span>
    </div>
    <h2 class="blog-title"><a href="<?php the_permalink(); ?>"title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <div class="clear"></div>
    
    <?php $more = 0;the_content(''); ?>
    
    <div class="post-btm">
    <a href="<?php the_permalink(); ?>"title="<?php the_title(); ?>" class="blog-more">Read more</a>
    <div class="post-cat"><span>Category:</span> <?php the_category(', '); ?></div>
    </div>
    <div class="clear"></div>
    </div>
    
    	<?php endwhile; endif;
    // Reuse the offset variable (rather then creating a new one), setting to a new value (plus any additional offset)
    // Total in first query, plus any offset, if there is one
    $offset = $qry[1] + (($paged > 1) ? $onum : 0);
    query_posts("posts_per_page=$qry[total]&offset=$offset&showposts=$qry[2]");
    if (have_posts()) :
    	while (have_posts()) : the_post(); ?>
    
            <div class="post">
    
    <div class="date">
    <span class="day"><?php the_time('j') ?></span>
    <span class="month"><?php the_time('M') ?></span>
    <span class="year"><?php the_time('Y') ?></span>
    </div>
    <h2 class="blog-title"><a href="<?php the_permalink(); ?>"title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <div class="clear"></div>
    
    <?php the_excerpt(); ?>
    
    <div class="post-btm">
    <a href="<?php the_permalink(); ?>"title="<?php the_title(); ?>" class="blog-more">Read more</a>
    <div class="post-cat"><span>Category:</span> <?php the_category(', '); ?></div>
    </div>
    <div class="clear"></div>
    </div>
    	<?php endwhile; ?>
    
        <div id="navigation">
    <div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
    </div><!-- End navigation -->
    
    <?php endif; ?>
    Thread Starter thinkluke

    (@thinkluke)

    Hi vtxyzzy, thanks for your response, I have tried what you said above but i couldn’t get it to work. I think the code i was using is no good. I have new code which is easier for me to understand I just cant find a place to put the ‘if’ statement see below for new code:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    I am thinking something like this: like if not page 1 do this, if page 1 do something else, but also calculate posts for paging… it seems so simple! I wish i was better at this.

Viewing 11 replies - 1 through 11 (of 11 total)