Forum Replies Created

Viewing 15 replies - 76 through 90 (of 102 total)
  • Thread Starter Rado

    (@jeriksson)

    is this the function that gets thumbnail from posts?

    function wp_rp_upload_attachment($url, $post_id) {
    	/* Parts copied from wp-admin/includes/media.php:media_sideload_image */
    
    	include_once(ABSPATH . 'wp-admin/includes/file.php');
    	include_once(ABSPATH . 'wp-admin/includes/media.php');
    	include_once(ABSPATH . 'wp-admin/includes/image.php');
    
    	$tmp = download_url($url);
    	preg_match( '/[^\?]+\.(jpe?g|jpe|gif|png)\b/i', $url, $matches);
    	$file_array['name'] = sanitize_file_name(urldecode(basename($matches[0])));
    
    	$file_array['tmp_name'] = $tmp;
    	if (is_wp_error($tmp)) {
    		@unlink($file_array['tmp_name']);
    		return false;
    	}

    I can’t find the call “the_post_thumbnail” anywhere in the code, i’m guessing it falls back on the built in code? is there any simple way to modify this to get the medium or large size thumbnail from post instead of the default one? i can do the css work for template easily, i just need help getting the code to grab the correct thumbnail.

    Thread Starter Rado

    (@jeriksson)

    Hi Donncha,

    Looks like you’re right! Thank you for the quick reply, as long as i can view modfied posts etc it’s fine, i’ll just disable the caching for known users.

    May i ask why caching for known users is recommended though?

    Thanks for the quick respsons!

    Thread Starter Rado

    (@jeriksson)

    Tested on my test server and it completely broke the page where i use the tagmap code, it won’t even render past the header and content div.

    Not sure why, i haven’t had time to play around with it just letting you know.

    Will try tommorrow on a site with less tags it might be my test server that has 400+ tags that is the problem.

    I saw one thing, excluding tag by their names seems shady, can i exclude tags by their id to? like “21,25,24,23,22” etc?

    Thanks for the hard work!

    Thread Starter Rado

    (@jeriksson)

    I’m unsure which version i had previous to yours, i think it was an earlier release then the current stable version.

    The way i fixed it was simply to download the latest release, swap out the plugin files, go into the settings, put it to “ON” then simply swap out the files.

    I’ve noticed other bugs with your latest release, example the “center” alignment for the image doesn’t work, neither does right or left, it’s always centered left for me, but that might be my theme’s css that overwrites this setting as i haven’t tested it with any other themes.

    Another thing to add would also be the ability to “not use an image”, i currently replaced the default image with a white pixel 1×1 square just to get rid of it, not a very nice way of doing things ??

    Anyways i do like the plugin, the infinte scroll is perfect for my site.

    Keep working on it, i love it!

    Thread Starter Rado

    (@jeriksson)

    Just solved it, had to reroll the old version, enable that one, then just switch the files out, and now it’s working with your build.

    Not very stable but working now again ?? Thank you, pathparse is gone once more!

    Thread Starter Rado

    (@jeriksson)

    Recently just upgraded to latest version 2.3.1 of wordpress and the release you gave me is broken for that version, for some reason it works perfectly for admin, but users won’t get the scrolling effect. I’m setting it to “ON” which means on for all, but something tells me all the switches are broken, cause when i set the plugin to OFF it still scrolls for admin.

    Just a FYI, downgraded to the latest working build.

    Any updates coming, i really want to get rid of that pathparse in my html source code.

    Thread Starter Rado

    (@jeriksson)

    Yes, google is following the link from the source.

    I updated to the version you recommended and indeed there is no link in the source of the page now and google should now crawl js files to find it i’m guessing.

    However this version breaks when using wp-minify on html code, i’m guessing it has something to do with the :

    <script type='text/javascript' src='https://mydomain/wp-content/plugins/infinite-scroll/infinitescroll.init.js.php?p=YToyOntpOjA7YTozOntpOjA7czoyNToiaHR0cDovL2JhYmVzb21nLmNvbS9wYWdlLyI7aT53dq51fI6IjkxMTM2NWE2MjdjNjMwNTU3NjQzMmY4ODJjYmI4Mjg4Ijt9'></script>

    Code that is being generated now and the html minication somehow breaks the script from working.

    I will work around it, i like this version better that doesn’t display the path in the source.

    And to answer everyones questions yes my robots modification above in my previous post worked to solve this issue, i wish i had seen it earlier, my page dropped rank but its getting up there again.

    Thread Starter Rado

    (@jeriksson)

    Hello again, would this perhaps stop search engines from attempting to reach /page/ yet reach /page/*/?

    Disallow: /tag/*/page/
    Allow: /tag/*/page/*/
    Disallow: /category/*/page/
    Allow: /category/*/page/*/

    Anyone got an idea? I’ve added this but i’m unsure if it actually works as i want it to.

    Thanks!

    Thread Starter Rado

    (@jeriksson)

    Very interesting, thank you exactly what i was looking for!

    Thread Starter Rado

    (@jeriksson)

    No matter, i didn’t see the tab “Browser Cache” cause of low resolution browser.

    I set header expire time, and now the GCI seems to be clearing the expired headers properly.

    Great plugin guys, very nice!

    Thread Starter Rado

    (@jeriksson)

    Seems like it puts a huge query on the database, cpu peaks to 100% when posting using this plugin on the sql server, and the wp test only has about 4 mb of database, so it’s doing something real bad.

    Thread Starter Rado

    (@jeriksson)

    I’ve never had any issues that i couldn’t solve my self after a little research, but i’ll give the WP support a shot.

    Thread Starter Rado

    (@jeriksson)

    Never mind i sucessfully added the code the edit-advanced in the admin folder, not sure if it’s the corret or nice way to do it, but it works fine ??

    It seems galleries created with [ ] / \ in their names will not work to be displayed, any solution for this?

    Thanks for the reply, however i just keep getting “[Gallery not found]” when i call ngg_excerpt(); in the loop. What could be wrong?

    Here’s the code i tried from my home.php to call the function…

    <?php get_header(); ?>
    
        <div id="content" class="narrowcolumn">
    
        <?php if (have_posts()) : ?>
    
            <?php 
    
            while(have_posts()) : the_post(); if(!($first_post == $post->ID) && !is_sticky()) : ?>    
    
                <div class="post lastfive" id="post-<?php the_ID(); ?>">
                <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'chaoticsoul'), get_the_title()); ?>"><?php the_title(); ?></a></h2>
                    &bull;<?php the_time(get_option("date_format")); ?>  &bull; <?php comments_popup_link(__('No Comments', 'chaoticsoul'), __('1 Comment', 'chaoticsoul'), __('% Comments', 'chaoticsoul')); ?> <?php edit_post_link(__('Edit', 'chaoticsoul'), '(', ')'); ?>
                    <div class="entry">
                        <?php ngg_excerpt(); ?>
                        <?php the_content("<span class=\"continue\">" . __('Continue reading', 'chaoticsoul') . " '" . the_title('', '', false) . "'</span>"); ?>
    
                        <p class="postmetadata"><?php printf(__('Posted in %s', 'chaoticsoul'), get_the_category_list(', ')); ?>
                            <?php the_tags('<br />' .  __( 'Tags' ) . ': ', ', ', '');  ?>
                        </p>
                    <div class="splitter">&nbsp;</div>
                    </div>
                </div>
    
            <?php endif; endwhile; ?>

    and in functions.php i added the function like this:

    function ngg_excerpt(){
    //get the post content
    $content_data = get_the_content();
    //extract shortcode from content
    preg_match("/\[ngg([^}]*)\]/", $content_data ,$matches);
    $results = $matches[1];
    //if shortcode exists in content
    if (!empty($results)){
    //extract gallery id from shortcode
    $gallery_id = preg_replace("/[^0-9]/", '', $matches[1]);
    //make sure that NextGen is loaded
    if (function_exists(nggShowGallery)){
    //output gallery, showing only 4 images
    echo nggShowGallery( $gallery_id, null , 4 );
    }
    }
    }

    Just keep getting [Gallery Not Found] :/

Viewing 15 replies - 76 through 90 (of 102 total)