Forum Replies Created

Viewing 15 replies - 31 through 45 (of 57 total)
  • +1 to this.

    I’ve attempted to add a custom function to my functions.php that adds the title into the img_caption_shortcode, but it just returns a blank, no title:

    function fb_img_caption_shortcode($attr, $content = null) {
        // Allow plugins/themes to override the default caption template.
        $output = apply_filters('img_caption_shortcode', '', $attr, $content);
        if ( $output != '' )
        return $output;
        extract(shortcode_atts(array(
        'id' => '',
        'align' => 'alignnone',
        'width' => '',
        'caption' => '',
        'title' => ''
        ), $attr));
        if ( 1 > (int) $width || empty($caption) )
        return $content;
        if ( $id ) $id = 'id="' . $id . '" ';
        return '<dl ' . $id . 'class="wp-caption ' . $align . '" style="width: ' . (10 + (int) $width) . 'px"><dt>' . do_shortcode( $content ) . '</dt><dd class="wp-caption-text"><em>' . $title . '</em>' . $caption . '</dd></dl>';
    }
    add_shortcode('wp_caption', 'fb_img_caption_shortcode');
    add_shortcode('caption', 'fb_img_caption_shortcode');

    Does anyone know how to grab the title out of the media library’s title field, and add it to the caption?

    Thread Starter Will

    (@wlanni)

    Hey thanks Unifiedac!

    Unfortunately, though your solution is very helpful in other circumstances (and actually resolves a similar question about some weird behavior I was seeing elsewhere), this doesn’t quite answer my initial question: I was finding that using the image crop functionality to chop an image down to smaller than my thumbnail setting size wound up with no thumbnail being created at all — I was winding up with no thumbnail image being created at all (I believe — it’s been a couple months and I think I worked around it).

    Anyway, thanks for your response, I seriously appreciate the contribution!!

    I’m not sure exactly what the answer is as far as the SSL option–I haven’t checked that, but I read the note–so here’s what I did to restore some stuff in a previous version of the plugin when I had an issue:

    I opened the database using phpMyAdmin and removed the BWPS tables. Then I opened my site using my ftp client, and manually deleted the plugin. Finally, I opened my .htaccess and removed the Better WP Security entries.

    Then I cleared my cache, etc. I was then able to get back into my back end.

    Hey Mantish,

    Are you reporting that Ninja Page Categories and Tags doesn’t work with 3.1? (I haven’t tried it yet, just was searching around to see if there are existing issues).

    Thanks,

    w

    Same problem. I haven’t used/edited the site, I’ve published a page, logged out, still shows me editing the page to other users. I’ve even changed the last edited version owner to another user and they continue to see this error.

    ?? Awesome ivar! There’s a lot of great solutions on the themeshaper forums for thematic development, I encourage you to bookmark their site and search there as well as here.

    anyway, cheers to that!

    Hey folks,

    I just found this on the themeshaper forums:

    https://themeshaper.com/forums/topic/thematic-the-events-calendar-problems
    add the following to your functions.php

    <?php global $spEvents;
    
    remove_action( 'template_redirect', array($spEvents, 'templateChooser'), 1 ); ?>

    Thread Starter Will

    (@wlanni)

    OK, here’s what I did to fix this:

    Opened up page.php and changed unserialized to maybe_unserialize on line 2.

    Did same in backgroundchanger.php, line 20

    Seems to have fixed it.

    OK, I just updated the plugin to truncate my customer quote. I didn’t add in all the fancy shmancy code like I wrote above in order to customize it, as apparently there is a new version of the plugin coming out very soon, and that would be a waste of time on my part.

    However, for anyone who wishes to make these updates, here’s what I did:

    • In the wp-admin, I clicked on the editor link under Plugins
    • I selected Collision Testimonials as the plugin from the drop down
    • I selected the first file: collision-testimonials/collision-testimonials.php
    • I added the following function at line 259, above the // Main Function Code, to be included on themes; MAKE SURE TO EDIT THE HREF TO YOUR SITE!!!:
      function shorten ($str, $len)
      {
          if (strlen($str) > $len)
          {
              return substr( $str, 0, strrpos( substr( $str, 0, $len), ' ' ) ) . '... <a href="https://www.yoursite.com/path/to/testimonials/">[read more]</a>';
          }
      	else
          {
              return $str;
          }
      }
    • I added code to shorten the $quote variable in two places. With the shorten function code added above, these were approximately lines 304 and 341. Look for the following code
      $quote = stripslashes($data['quote']);
      and add the following on a new line below:
      $quote= shorten($quote,600);
      — the 600 is the character limit after which the ‘…[read more]’ link appears. Set this to whatever you need it to be.
    • I think the widget will wind up grabbing the shortened quote, it looks like it runs that function. I don’t know, though, and I don’t plan on using the widget, so you’re on your own there.

    I would like this too — I’m interested in limiting down the characters similar to the wordpress excerpt() function — having a ‘read more’ appear, etc.

    However, I’m not using the widget, I’m coding this straight into a template. So having the functionality, something like:

    <?php collision_testimonials(excerpt="75",$id="4"); ?>

    That would be pretty cool.

    Thread Starter Will

    (@wlanni)

    OK, just wanted to update this.

    This is definitely a problem of the MySQL database not being able to write to the /tmp folder on the webhost.

    Here’s an entry from the error log off the server:
    [01-Feb-2011 02:07:05] WordPress database error Can't create/write to file '/tmp/#sql_ffc_0.MYI' (Errcode: 28) for query SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag') AND tr.object_id IN (60) ORDER BY t.name ASC made by require, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, update_post_caches, update_object_term_cache, wp_get_object_terms

    So the solution? I have no idea, as I’m no server guru. I’m in contact with my webhost support to see if there’s something we can do about having the database user having rights to write to that directory.

    However, having them clear out /tmp resolves the problem temporarily.

    So, if you run into this, get in contact with your webhost to make sure that the database can write to the /tmp folder.

    Thread Starter Will

    (@wlanni)

    Oh one other thing: I set the permalinks to default, and I’m finding that none of the urls are pointing correctly to the pages. They all wind up just showing the temp html home page I created while developing the site. That is really kinda odd too.

    I would like this as well.

    I hate to be a moron, but when you say that you “turned off pretty links under the options”, what options, and what are you specifically turning off? Do you mean you’re going into permalink settings under general settings and setting them to default? I’m looking at the calendar options and I’m not seeing anything there either.

    I used to the Page Links To plug in, and what I find is that the calendar isn’t being smart about grabbing whatever the current year/month is and displaying events. So we have january events, but they don’t show up until you go to the month selector, switch to february, then switch back to january.

    https://www.studioseven.us

    Kylene and Hhill: A lot of the image issues went away when I did this:

    I went through and resaved my permalinks settings (no idea why that would affect images)

    deactivated/reactivated plugins

    switched to twenty ten theme

    reset permissions on upload directory.

    Not sure which part of that did the job, as it looked like nothing was working, and then all of a sudden the images came back. so something may have been cached in there during the process and I missed which step fixed it.

Viewing 15 replies - 31 through 45 (of 57 total)