Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 5

CurtisOdenericgillettefh111tc74 +1 guest

Version which displays videos and images

This discussion is related to the DiscussionExcerpt2 addon.

I have a modded version of this which displays videos and images. So basically everything appears exactly as it does in the discussion.

Comments

  • Nice!

    I'd like to try it. Could you post a link where we could download it?

  • Posts: 157 1 like

    DiscussionExcerpt3

    Note, no option to disable for announcements.

  • Posts: 16

    Hi clethrill, I tried your plugin and it's exactly what I was looking for! The only problem: it breaks down the mobile version of Vanilla, as you can see there:

    It also has problems with videos embed in mobile site:

    Is there a way to make the plugin don't work in mobile version, or to fix this?

    Thanks! :)

  • Posts: 157

    Oh dear, but sorry I have never worked with the mobile version before, and am unfamiliar with the inner workings of it all.

  • Posts: 133

    Wow this is so great that it works with images now!

    The displayed images don't seem to resize properly and are much larger, overflowing the blog. Any ideas?

  • Posts: 157

    You can simply go to your theme and add some css. I am not sure how your theme works exactly or how the plugin works exactly (been ages since I have done anything on here [which saddens me])

    CSS that I think might work

    div.Message > img {
       width: 90%;
       margin: 0 auto;
    }
    

    I say think as I can't get my localhost running at this moment but I want to answer you as quickly as possible.

  • Posts: 133

    Thanks for the quick message back, I'm using Vanlix theme from themes section. Not really sure how to fix it. Could you take a look when you get a chance?

  • Posts: 157

    I have not downloaded the vanlix theme because I am currently over my internet quota and my speed has been reduced considerably. However I have added a small css to the plugin which should hopefully fix this problem. I will upload the new plugin tomorrow when I have fast internet back.

  • Posts: 133

    My hero!

    Another thing this plugin could use is a "... Continue Reading" link at the end when text is truncated. Otherwise they have to click the heading and with images that can be a long way from the bottom.

  • Posts: 133

    If you would fix those two things for me, I would happily donate to you. This is the last thing stopping me from upgrading my site!

  • Posts: 157

    I will add it in, I was quite busy today as well as tomorrow, but I will definitely work on it for you

  • Posts: 157

    I did that quicker than I thought DiscussionExcerpt3

  • Posts: 133

    Continue Reading is Great! Videos now work and look great!

    Images don't appear anymore, maybe because of the next problem? It seems to have defaulted back to the 15 word excerpt with no way to change it.

  • Posts: 133

    Ok I played with it a bit, it will show images for newly created discussions, not discussions that are imported (which my whole forum is right now). The last version worked with everything but was the wrong size. This new version only displays images/videos for newly created discussions.

    It's so close I can taste it! Thanks for all your help!

  • Posts: 133

    Oh and somehow enabling this new version moves the formatting all around on the admin dashboard. (Puts left column on right side with formatting all weird.)

  • Posts: 157

    Mmm... could I get you to disable the plugin, delete it, go to /conf/config.php and delete any configuration to do with the plugin (should be something like $Configuration[DiscussionExcerpt2']['Number_of_words'] = ###; ) (I believe there might be two clashing configuration in there that caused the wrong number of words displayed)

    Then download this DiscussionExcerpt2.zip and install it.

    I was having the same issues with the theme I was using, I switched back to default theme and everything was fine, I think it was the name of my style sheet that through everything out for some reason, I downloaded vanlix and have got the plugin and theme working fine together.

    On the topic of the importing. The plugin works by make the excerpt displayed go through the same formatting process that usually happens when you post a discussion. So there must be something with the importation of it that skips this formatting step.

    EDIT: I found a bug hang on while I iron it out EDIT: Got the little bugger

    If there is anything else I am glad to assist

  • 422422
    Posts: 2,109 1 like

    Pmsl @ got the little bugger

    GOLD

    ♥ I love Vanilla. VanillaSkins | on Twitter | on Facebook | Available Freelance | Take the Vanilla Test | Free Downloads

  • Posts: 133

    This stuff imported from V1 has caused problems since the beginning and I've never been able to upgrade because of them. With your new updated plugin it displays no images at all on these imported discussions. :((

    This imported content is displayed differently than newly created V2 discussions.

  • Posts: 133

    After some fiddling I have it working with my imported content using your original plugin at the top. How easy would it be to add the "Continue Reading" to the original version.

  • Posts: 157

    Just fiddle around with the newer and older versions.

    in the new version lines 51-53

    $Body = substr($Body, 0, $end);
    $Last = strrpos($Body, " ");
    $NewBody = substr($Body, 0, $Last);
    

    remove any truncated words off the end.

    line 62

    echo " ...";
    

    add the ellipsis

    lines 67-77

        <?php if($end < $Length) { ?>
            < li>
                < a href="<?php echo Gdn::Request()->Url(ConcatSep("/", "discussion", $Discussion->DiscussionID, Gdn_Format::Url($Discussion->Name)))?>"class="More"><?php echo T("Continue Reading");?>
            < /li>
        <?php } else { ?>
            < li>
                < a href="<?php echo Gdn::Request()->Url(ConcatSep("/", "discussion", $Discussion->DiscussionID, Gdn_Format::Url($Discussion->Name)))?>"class="More"><?php echo "View rest of ".T("Discussion");?>
            </ li>
        <?php } ?>
    

    Deal with the continue reading section

Sign In or Register to comment.