Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Emebed issue with Version 2.1b2

12357

Comments

  • Options

    remove the js changes - to hard to explain.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited December 2013

    Yes remove the js changes and everything and simply change the embed url name of the page you made to forum1 or something other than forum.

    Please try that and see if it work and my hunch is right...

    The link within your site to it can still be called forum but the actual link should not be called forum .

  • Options
    peregrineperegrine MVP
    edited December 2013

    I have another idea, to try tomorrow, if it doesn't get solved. but we are running in two different directions.

    the correct use for webroot, i believe (appears to be on my localhost.

    is if my forum is at http://localhost/vanilla3

    $Configuration['Garden']['WebRoot'] = "http://localhost/vanilla3";

    if my forum is at http://localhost/vanilla3:8080

    $Configuration['Garden']['WebRoot'] = "http://localhost/vanilla3:8080";

    if my forum is at http://example.com/vanilla3

    $Configuration['Garden']['WebRoot'] = "http://example.com/vanilla3";

    my thought was the webroot could strip your 80's out of the links, if you hadn;t already corrected that.

    But we are doing so many things and I don't know where you are.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    meshugymeshugy Musician/Hacker ✭✭
    edited December 2013

    @vrijvlinder said:
    Yes remove the js changes and everything and simply change the embed url name of the page you made to forum1 or something other than forum.

    Please try that and see if it work and my hunch is right...

    The link within your site to it can still be called forum but the actual link should not be called forum .

    I made this link and used the embed code you had provided earlier and it works quite well!

    <iframe id="vanilla18803" name="vanilla18803" src="//www.djangobooks.com/forum/index.php?p=/&amp;remote=http%3A%2F%2Fshoppingcart.djangobooks.com%2Fforum&amp;locale=" scrolling="no" frameborder="0" width="100%" style="width: 100%; border: 0px; display: block; height: 2004px; " height="0"></iframe>
    

    http://www.shoppingcart.djangobooks.com/db-forum

    some skinning issues, but nothing too bad.

    For some reason I can't get the standard embed code to work:

    <script type="text/javascript" src="http://www.djangobooks.com/forum/js/embed.js"></script>
    
  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited December 2013

    AWESOME !! my hunch was right then.

    Not advisable to call the embed url forum if you don't want the links to open in a new page. B)

    For some reason I can't get the standard embed code to work:

    I prefer to just use the iframe , it is the same thing but sometimes it fails to unpack from the script. So I like it unpacked so I can also edit it easier.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    well the actual code for your embed is this one , not sure where you got the other

    <script type="text/javascript" src="http://www.djangobooks.com/forum/plugins/embedvanilla/remote.js"></script>

  • Options
    meshugymeshugy Musician/Hacker ✭✭
    edited December 2013

    @vrijvlinder said:
    I prefer to just use the iframe , it is the same thing but sometimes it fails to unpack from the script. So I like it unpacked so I can also edit it easier.

    Do you have any suggestions for adjusting the height of the iframe so it matches the current content?

    Thanks for your help!

  • Options
    meshugymeshugy Musician/Hacker ✭✭
    edited December 2013

    @vrijvlinder said:
    well the actual code for your embed is this one , not sure where you got the other

    <script type="text/javascript" src="http://www.djangobooks.com/forum/plugins/embedvanilla/remote.js"></script>

    Oh, that works! I got the other embed code directly from the embed section of the admin panel in Vanilla. Why is it giving me bad code? Anyway, glad I've got it working now.

    Thanks again, I'm so happy to have this working and couldn't have done it without you. Do you have a tip jar?

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    yes sure, you need to put the script inside a div so it looks like this to adjust that.

    <div id="skin_content">
    <h1 class="hidden">DB Forum</h1>
    <div class="vframe"><script type="text/javascript" src="http://www.djangobooks.com/forum/plugins/embedvanilla/remote.js"></script><iframe id="vanilla93616" name="vanilla93616" src="http://www.djangobooks.com/forum/index.php?p=/&amp;t=1386558237472&amp;remote=http%3A%2F%2Fwww.shoppingcart.djangobooks.com%2Fdb-forum&amp;locale=" scrolling="no" frameborder="0" border="0" width="100%" height="1200px" style="width: 100%; height: 1000px; border: 0; display: block;"></iframe></div>
    </div>
    
    then add this css to the style sheet of your site and play with the values. You can also add scrollbar . 
    
    div.vframe{
    width:100%;
    min-height:1200px;
    }
    
  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Awesome!! This one is for good lol

    Thanks again, I'm so happy to have this working and couldn't have done it without you. Do you have a tip jar?

    You are very welcome, please forward any tips you would like to give me, please give to peregrine. I would not be here if it were not for him. :)<3<3<3

  • Options

    right back at you V

    :wink::heart::heart::heart:

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited December 2013

    I got the other embed code directly from the embed section of the admin panel in Vanilla.

    Well that may be a bug worth reporting. It should not give the other code. I have the same code for embedding in 2.0 as in 2.1 . The remote.js is the file to be called not the embed.js

    That is why I thought your code looked weird to me.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Ok I figured out where you got that code. By using the Embed Forum settings instead of the embed plugin. Unviersal Forum Embed Code

    The Code I gave you can be found by Embed Vanilla Plugin .

    So the Universal Forum Embed Code does not work , but the Embed Vanilla Plugin code does work.

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    Do you know how to make the iframe resize automatically like the script does? Some of the comments are really long so I have to make the iframe pretty huge to accommodate every thread.

  • Options
    peregrineperegrine MVP
    edited December 2013

    @meshugy said:
    Do you know how to make the iframe resize automatically like the script does? Some of the comments are really long so I have to make the iframe pretty huge to accommodate every thread.

    If you can solve this one V - I will bow to you! and will bestow a new badge "solving the insoluble Badge"

    The remote.js always had a problem with resizing as well with large content within iframe and would truncate, unless you enlarged iframe and the resize window was alot to be desired. The only way I see around it is a scroll bar - but that is horrible,

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    You can allow scrollbar to contain the size. That is the best thing to do. Some browsers will only accept a certain amount of px for height of iframes

    Simply allow the iframe to scroll and remove the bottom scroll bar with css play with the values.

    <iframe id="vanilla18803" name="vanilla18803" src="//www.djangobooks.com/forum/index.php?p=/&amp;remote=http%3A%2F%2Fshoppingcart.djangobooks.com%2Fforum&amp;locale=" scrolling="yes" frameborder="0" width="100%" style="width: 100%; border: 0px; display: block; height: 2004px;overflow:auto;overflow-x:display:none; " height="2004"></iframe>

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited December 2013

    @peregrine said: a scroll bar - but that is horrible

    Yes , but embed is horrible to begin with. My suggestion would be to clone his theme for his site and make his forum identical to his site. Then have it stand alone.

    The thing with embedding is you also need to adjust the container of the forum. If you have a set value or no value for height then some time it gets taken as 0 .

    to successfully fit your forum you will need to mess with the style of where it is embedded as well. By adding a height of 100% where there is no height.

    #skin_content {
    margin: 0px;
    display: block;
    width: 878px;
    float: right;
    height: 100%;
    }
    
  • Options
    peregrineperegrine MVP
    edited December 2013

    @vrijvlinder said:
    Yes , but embed is horrible to begin with. My suggestion would be to clone his theme for his site and make his forum identical to his site. Then have it stand alone.

    You read my mind. I was going to say this to @meshugy "You are not going to like this to , but I would run as fast and as far away as possible from an embedded forum as I could. Css styling will be easier, absolute will work, jquery movement won't get screwed. more plugins will work correctly. etc - when not embedded.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Yes, and I also prefer using a php based theme to embed. His site would be easy to clone.

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    @peregrine said:
    You read my mind. I was going to say this to meshugy "You are not going to like this to , but I would run as fast and as far away as possible from an embedded forum as I could. Css styling will be easier, absolute will work, jquery movement won't get screwed. more plugins will work correctly. etc - when not embedded.

    Ha ha...I think you're probably right. The embedding function of Vanilla seemed like a real time saver but in the end I think it may just be too limiting.

Sign In or Register to comment.