• Resolved ibogo

    (@ibogo)


    Site: http://www.ibogo.club

    As you will see we have modified featured pages to show only 2. We would love to add a Chatango box between these 2 featured pages in the center.

    Here is the code:

    <script id="cid0020000081345060908" data-cfasync="false" async src="//st.chatango.com/js/gz/emb.js" style="width: 250px;height: 350px;">{"handle":"bogoclub","arch":"js","styles":{"a":"CC0000","b":100,"c":"FFFFFF","d":"FFFFFF","k":"CC0000","l":"CC0000","m":"CC0000","n":"FFFFFF","q":"CC0000","r":100,"allowpm":0,"cnrs":"0.35"}}</script>

    When pasted into functions.php, site goes down and (requiring FTP fix). Any idea how to add this script where we want it?

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • Remove the code to display just 2 fps, and add this to your child-theme functions.php:

    add_filter('tc_fp_single_display', 'show_chat', 10, 2);
    function show_chat($html, $fp_id){
        if ( $fp_id != 'two' )
            return $html;
    ?>
    <div class="span4 fp-two">
        <script id="cid0020000081345060908" data-cfasync="false" async src="//st.chatango.com/js/gz/emb.js" style="width: 250px;height: 350px;">{"handle":"bogoclub","arch":"js","styles":{"a":"CC0000","b":100,"c":"FFFFFF","d":"FFFFFF","k":"CC0000","l":"CC0000","m":"CC0000","n":"FFFFFF","q":"CC0000","r":100,"allowpm":0,"cnrs":"0.35"}}</script>
    </div>
    <?php
    }

    Hope this helps.

    Thread Starter ibogo

    (@ibogo)

    It makes the chat go where you currently see featured page 3 (Merchant) and fp3 was directly below the chat. We need the chat to go directly between the fps.

    With that said, it might have actually worked. Reason being the chat may be too wide and pushed 3rd fp to next row. We also have a custom width setting (47.15% between the fps) if that means anyting.

    Edit: Here is the result of the provided code: http://imgur.com/lOLd32G

    Edit: Actually it seems the CSS code for fp width changes the space between the pages so perhaps reducing this will work.

    Edit: Yes! It works. We changed the width from 47.15% to 30.5%.

    Thank you!

    I told you to remove the code you had for displaying just 2 fps.
    Glad you solved.
    Could you mark this topic as resolved?

    @ibogo
    Anyway I suggest you to remove also that 30.5%, remove that css rule, it’s useless.
    And replace the code I gave you above, with this one, which is more correct:

    add_filter('tc_fp_single_display', 'show_chat', 10, 2);
    function show_chat($html, $fp_id){
        if ( $fp_id != 'two' )
            return $html;
        ob_start();
    ?>
        <script id="cid0020000081345060908" data-cfasync="false" async src="//st.chatango.com/js/gz/emb.js" style="width: 250px;height: 350px;">{"handle":"bogoclub","arch":"js","styles":{"a":"CC0000","b":100,"c":"FFFFFF","d":"FFFFFF","k":"CC0000","l":"CC0000","m":"CC0000","n":"FFFFFF","q":"CC0000","r":100,"allowpm":0,"cnrs":"0.35"}}</script>
    <?php
        $html = ob_get_contents();
        ob_end_clean();
        return $html;
    }

    Thread Starter ibogo

    (@ibogo)

    After removing that CSS it actually went exactly how we wanted (it was a few pixels off-center before).

    Also to clarify that code to remove the fp was removed, only the code for width between was left but that is gone now too and as mentioned above it looks just how we wanted it to now.

    With that said is the above code still necessary?

    Thread Starter ibogo

    (@ibogo)

    Edit: See bottom for edit!

    Actually it should be mentioned it looks like this might have altered something with the slider and/or slider images. If you open the site on Internet Explorer, the images are full size and how they should be and in Chrome they are cut off.

    We had this problem (possibly the biggest obstacle we’ve yet faced in the design of this website) specifically getting the images to fit exactly how we wanted in the slider.

    Some of the issues we faced (sometimes one at a time, sometimes multiple at once):

    • first image noticeably cropping +/ shrinks +/ grows upon loading homepage (no longer doing this)
    • images being cut off at top and bottom (currently happening only on chrome but was happening on IE before too)
    • loading symbol doesn’t go away (just keeps saying loading when image is already loaded). We know the image was loaded because the slider height had been adjusted to 550 or 600 pixels (can’t remember) but either way the bottom of image was visible, just not the part the loading screen covers. We aren’t using this now anyways but there have been at least one other person with this issue.
    • when slider height is adjusted there becomes a space between the header and slider when screen size changes. You can see this on our site right now (just zoom browser to 110%+).

    Also right now the header has shrunk in size on Chrome (this was another thing that we had been having a hard time with) and on IE it is how it was before.

    Actually, we would like the header to be the same size as it currently is in Chrome (smaller) than IE – BUT we need the slider images to be like they are in IE (it looks like the Chrome slider might have even went back to the default 500px as it had been 550 or 600 before).

    For the record all of the images are set to either 1170×500 or 1200×500 or whatever the size is meant to be (as mentioned, they were perfect before today).

    *************************EDIT*************************

    Nevermind it was the zoom on the browser!

    However, those points about the slider are still relevant.

    Thanks again for the help!

    P.S. (now marked as resolved)

    Thread Starter ibogo

    (@ibogo)

    Hey actually there is an update to this:

    As you will see it seems that the right featured page is 2 or 3 pixels below the left one.

    Any idea how to shift this one up a couple of notches?

    Thanks

    Thread Starter ibogo

    (@ibogo)

    I had not pasted that in but now I did and it is the same.

    Am I just seeing things? It looks to me as though the right featured page is 2 or 3 pixels too low…

    Edit: Also, it looks like the right page has a few pixels extra space between the chat than the left page.

    Edit 2: If we can just move the text and button up that would be great we tried a CSS code but it didn’t work probably because it’s edited with php (the code works we’ve used it before).

    Thread Starter ibogo

    (@ibogo)

    Hey it’s alright it took me 2 days to notice lol probably no one else will thanks againnn for that code!

    Officially reresolved

    Edit: I’m an idiot they are perfectly level didn’t even think to check by scrolling -_- hahaha

    Thanks again

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Add something between two featured pages’ is closed to new replies.