Forum Replies Created

Viewing 15 replies - 46 through 60 (of 99 total)
  • Thread Starter noski2009

    (@noski2009)

    grrr

    function emm_paginate($args = null) {
    	$defaults = array(
    		'page' => null, 'pages' => null,
    		'range' => 3, 'gap' => 3, 'anchor' => 1,
    		'before' => '<div class="emm-paginate">', 'after' => '</div>',
    		'title' => __('Pages:'),
    		'nextpage' => __('&raquo;'), 'previouspage' => __('&laquo'),
    		'echo' => 1
    	);
    
    	$r = wp_parse_args($args, $defaults);
    	extract($r, EXTR_SKIP);
    
    	if (!$page && !$pages) {
    		global $wp_query;
    
    		$page = get_query_var('paged');
    		$page = !empty($page) ? intval($page) : 1;
    
    		$posts_per_page = intval(get_query_var('posts_per_page'));
    		$pages = intval(ceil($wp_query->found_posts / $posts_per_page));
    	}
    
    	$output = "";
    	if ($pages > 1) {
    		$output .= "$before<span class='emm-title'>$title</span>";
    		$ellipsis = "<span class='emm-gap'>...</span>";
    
    		if ($page > 1 && !empty($previouspage)) {
    			$output .= "<a href='" . get_pagenum_link($page - 1) . "' class='emm-prev'>$previouspage</a>";
    		}
    
    		$min_links = $range * 2 + 1;
    		$block_min = min($page - $range, $pages - $min_links);
    		$block_high = max($page + $range, $min_links);
    		$left_gap = (($block_min - $anchor - $gap) > 0) ? true : false;
    		$right_gap = (($block_high + $anchor + $gap) < $pages) ? true : false;
    
    		if ($left_gap && !$right_gap) {
    			$output .= sprintf('%s%s%s',
    				emm_paginate_loop(1, $anchor),
    				$ellipsis,
    				emm_paginate_loop($block_min, $pages, $page)
    			);
    		}
    		else if ($left_gap && $right_gap) {
    			$output .= sprintf('%s%s%s%s%s',
    				emm_paginate_loop(1, $anchor),
    				$ellipsis,
    				emm_paginate_loop($block_min, $block_high, $page),
    				$ellipsis,
    				emm_paginate_loop(($pages - $anchor + 1), $pages)
    			);
    		}
    		else if ($right_gap && !$left_gap) {
    			$output .= sprintf('%s%s%s',
    				emm_paginate_loop(1, $block_high, $page),
    				$ellipsis,
    				emm_paginate_loop(($pages - $anchor + 1), $pages)
    			);
    		}
    		else {
    			$output .= emm_paginate_loop(1, $pages, $page);
    		}
    
    		if ($page < $pages && !empty($nextpage)) {
    			$output .= "<a href='" . get_pagenum_link($page + 1) . "' class='emm-next'>$nextpage</a>";
    		}
    
    		$output .= $after;
    	}
    
    	if ($echo) {
    		echo $output;
    	}
    
    	return $output;
    }
    
    /**
     * Helper function for pagination which builds the page links.
     *
     * @access private
     * @param int $start The first link page.
     * @param int $max The last link page.
     * @return int $page Optional, default is 0. The current page.
     */
    function emm_paginate_loop($start, $max, $page = 0) {
    	$output = "";
    	for ($i = $start; $i <= $max; $i++) {
    		$output .= ($page === intval($i))
    			? "<span class='emm-page emm-current'>$i</span>"
    			: "<a href='" . get_pagenum_link($i) . "' class='emm-page'>$i</a>";
    	}
    	return $output;
    }
    
    function post_is_in_descendant_category( $cats, $_post = null )
    {
    	foreach ( (array) $cats as $cat ) {
    		// get_term_children() accepts integer ID only
    		$descendants = get_term_children( (int) $cat, 'category');
    		if ( $descendants && in_category( $descendants, $_post ) )
    			return true;
    	}
    	return false;
    }
    Thread Starter noski2009

    (@noski2009)

    Hmm only thing before the first line is a couple of divs? could it be the pagination set up in the functions file? i.e.

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

    Thanks

    Thread Starter noski2009

    (@noski2009)

    I thought that was happening with

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ???

    Forum: Plugins
    In reply to: cu3er
    Thread Starter noski2009

    (@noski2009)

    Solved, I had the shadow image in the html code, when moved in to css it works :]

    Forum: Plugins
    In reply to: cu3er
    Thread Starter noski2009

    (@noski2009)

    8 months ago, d’oh! I have placed it in css but the shadow still goes over the the slider, even when I use z-indexing?

    Thanks

    Thread Starter noski2009

    (@noski2009)

    Thread Starter noski2009

    (@noski2009)

    <?php wp_list_categories('taxonomy=services_rendered'); ?>

    Thread Starter noski2009

    (@noski2009)

    Thanks I’ll give it a go.

    Thread Starter noski2009

    (@noski2009)

    Sorry forgot to mention I’ve adapted said them so much it looks nothing like the original. I basically want to take adapted theme and make more adaptations offline. When I take it offline only the top quarter section of theme appears nothing else?

    Thread Starter noski2009

    (@noski2009)

    Ahhh, excellent thanks chinmoy.

    Thread Starter noski2009

    (@noski2009)

    Afraid not that wipes out the content of the box???

    Thread Starter noski2009

    (@noski2009)

    Thanks sribharath

    I tried that as well but it didn’t work either.

    This ought to do it.

    .entry img.alignleft {
    float:left;
    margin:10px;
    padding:4px 5px 5px;
    text-align:center;
    }
    layout.css (line 135)
    .entry img {
    margin:10px;
    padding:4px 5px 5px;
    text-align:center;
    }
    layout.css (line 288)
    .entry img {
    margin:10px;
    padding:4px 5px 5px;
    text-align:center;
    }

    I read somewhere on a drupal forum that the name change might work, thankfully it does.

    Thanks for your help dude.

    Hi Pozzad,

    I have it working (sort of) though it may not be the right thing to do? I renamed jquery.cookie-min.js to something else and then renamed the links in wp-super-popup.php and it works, though there seems to be very thin in lines appearing in the popup box, but I’ll see if I can sort that in css.

    Thanks for your help.

Viewing 15 replies - 46 through 60 (of 99 total)