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.

Emebed issue with Version 2.1b2

24567

Comments

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited December 2013

    Sometimes the script gets blocked, I tried this and it shows. You need to use rewrite url true. The link of the source you had on there is wrong. Something is changing it and I suspect it has to do with the url.

    <div><iframe src="http://www.djangobooks.com/forum" style="width:100%; height:100%"></iframe>
    </div>
    

    You also need to add height to the container of the forum div

    #skin_content {
    margin: 0px;
    display: block;
    width: 878px;
    float: right;
    height: 100%;
    }
    
    hgtonight
  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Here is what it looks like using my method

    hgtonight
  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Seems to be working now.. Are you also embedding the comments? your code looks weird to me. But if it works that is all that matters. However the links still open new windows to the stand alone forum.

    hgtonight
  • meshugymeshugy Musician/Hacker ✭✭
    edited December 2013

    Thanks,

    Not sure what happened, I tried your code and got an embedded window with scroll bars (I hadn't added the css yet.) I then just went back and put in the code from the embed plugin:

     <script type="text/javascript" src="http://www.djangobooks.com:80/forum/js/embed.js"></script>
    

    Now it's embedding!

    However, I still have the problem of the discussion links opening in a new window. Any other ideas on how to fix that?

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    looking into it, I still see the target="_blank being added to the links as soon as you click them.

    hgtonight
  • meshugymeshugy Musician/Hacker ✭✭

    Yes, I see those but I don't know how to get rid of them. Any ideas?

  • meshugymeshugy Musician/Hacker ✭✭

    Also, there is some strange behavior on the links that do work. If you click on My Discussions it will take you there, but then moments later the screen will flash and you're back on the main page.

  • meshugymeshugy Musician/Hacker ✭✭

    I think you're correct that it is theme related. If I switch to this theme: http://www.vanillaskins.com/themes/response/

    Then all the embedded links open within the iframe. When I inspect the element, the response theme formats the links like this:

    <a href="/forum/discussion/12541/beginner-at-dij/#Item_8" class="Title">Beginner at DIJ</a>
    

    Whereas the embed friendly theme formats them as:

    <a href="http://www.djangobooks.com:80/forum/discussion/12541/beginner-at-dij#latest">Beginner at DIJ</a>
    

    The only problem is that otherwise the response theme isn't very embed friendly. I would use it if fit nicely in the embed window.

  • However, I still have the problem of the discussion links opening in a new window. Any other ideas on how to fix that?

    what links are you talking about?

    links within discussion. or the permalink.

    post a screenshot with what you are talking about.

    circle what works and what doesn't?

    also if you add a new discussion and post links in discussion. does it work and how are you adding link and what editor are you using.

    then go to the database and look at the body for the discussion link (link within discussion) and post the body as a text attachment on this forum.

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

    hgtonight
  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited December 2013

    You can fix that , getting it to work like you want is step one, if that theme works like you want, I can help you edit it so it fits.

    The key is to change all the widths to percentage values.

    For example,

    #Body{
    width:100%;
    }
    #Content{
    width:64%;
    }
    

    You can also change the width of the container to fit better.

    hgtonight
  • also it is a very bad idea to try to open links in your discussion topics within the embed iframe. Many external links will not allow their content to be viewable within an iframe on another site. And when you run into a site that prevents this type of behavior, your users will wonder why they get a blank and can't get to the the external link (and you now know why).

    http://vanillaforums.org/discussion/21554/github-1436-suggestion-to-make-links-consistent-when-using-buttonbar

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

    hgtonight
  • meshugymeshugy Musician/Hacker ✭✭
    edited December 2013

    The links that don't work correctly are the discussion and category links on the main page (marked with red arrows in my screen shot). When embedding, they open in a new window. Other links, like the profile or My Bookmarks open within the iframe (marked in yellow)

    I haven't tried adding a new discussion via the embedded forum yet. I'll try and see what happens.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    @peregrine

    Seems that something is adding target="_blank to all the links in the discussions index.

    Apparently even if you add jquery to target self. I looked at the embed.js and the remote.js from my forum and I do not have anything in there that would add target blank. But I could swear I saw it in one of those files somewhere. I can only look at my files atm.

    All my domains with WP and Vanilla were attacked (flooded) somehow and all my Data bases were disconnected . Arg!

    hgtonight
  • peregrineperegrine MVP
    edited December 2013

    I need a link to the embedded site where the problem occurs

    @vrijvlinder said:
    All my domains with WP and Vanilla were attacked (flooded) somehow and all my Data bases >were disconnected . Arg!

    ouch- sorry to hear about that.

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

    hgtonight
  • meshugymeshugy Musician/Hacker ✭✭

    @peregrine said:
    I need a link to the embedded site where the problem occurs

    ouch- sorry to hear about that.

    http://shoppingcart.djangobooks.com/forum

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Yea , glad I have seen it here before so I knew what was happening and called my Host. They will reset the stuff and change the passwords for me and add them to the configs. According to them too many requests made them timeout... Must have been an attack of some kind and since I have all the domains in one account they all were affected. All the ones that use a database. Now they want to sell me site lock service...

    hgtonightperegrine
  • peregrineperegrine MVP
    edited December 2013

    it's because you have port 80 appended to the url and it thinks it is a foreign link so it appends the blank.

    why do you have port 80 isn't that the default TCP port for http so why identify it?

    do you have that in your config.php?

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

    hgtonight
  • meshugymeshugy Musician/Hacker ✭✭

    @peregrine said:
    also it is a very bad idea to try to open links in your discussion topics within the embed iframe.

    I see. I was expecting to embed my forum similar to this one:

    http://www.azfibro.com/discussions/

    All interaction with the forum happens within the iframe so you remain on the host site. I want my customers to be able go back and forth between my store and forum seamlessly. Sending them to another window to read every discussion defeats the purpose of it.

    If I have to, I'll reskin Vanilla to match my store. But I was hoping the embed feature would work as that is so much simpler.

  • meshugymeshugy Musician/Hacker ✭✭

    @peregrine said:
    it's because you have port 80 appended to the url and it thinks it is a foreign link so it appends the blank.

    why do you have port 80.

    do you have that in your config.php?

    The embed plugin provided the link with the port 80 added on. I tried removing it but didn't make a difference. I'll try again now and also check the config file.

Sign In or Register to comment.