"Recent topics" widget embedding? Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
5 posters

    "Recent topics" widget embedding?

    avatar
    Fabricator
    New Member


    Posts : 17
    Reputation : 1
    Language : English

    Solved "Recent topics" widget embedding?

    Post by Fabricator August 31st 2014, 10:01 am

    Hi guys,

    Is it possible to get some kind of embed code for the "Recent topics" widget of my forumotion forum so I can add it to my shopify site?
    I use PunBB template.

    Your good advice is highly appriciated.

    Best regards,
    Amir.
    AngelaHolmes
    AngelaHolmes
    Forumember


    Male Posts : 202
    Reputation : 8
    Language : English
    Location : England

    Solved Re: "Recent topics" widget embedding?

    Post by AngelaHolmes August 31st 2014, 10:12 am

    l Fabricator wrote:Hi guys,

    Is it possible to get some kind of embed code for the "Recent topics" widget of my forumotion forum so I can add it to my shopify site?
    I use PunBB template.

    Your good advice is highly appriciated.

    Best regards,
    Amir.

    Hello,

    are you wanting to add a Forumotion widget to a web site?
    avatar
    Fabricator
    New Member


    Posts : 17
    Reputation : 1
    Language : English

    Solved Re: "Recent topics" widget embedding?

    Post by Fabricator August 31st 2014, 11:55 am

    Yes, to my shopify website.
    AngelaHolmes
    AngelaHolmes
    Forumember


    Male Posts : 202
    Reputation : 8
    Language : English
    Location : England

    Solved Re: "Recent topics" widget embedding?

    Post by AngelaHolmes August 31st 2014, 12:01 pm

    Fabricator wrote:Yes, to my shopify website.

    I don't think that's possible forumotion widgets are only for forumotion.
    avatar
    Fabricator
    New Member


    Posts : 17
    Reputation : 1
    Language : English

    Solved Re: "Recent topics" widget embedding?

    Post by Fabricator August 31st 2014, 12:06 pm

    I saw its possible with Phobb2 template...
    avatar
    Fabricator
    New Member


    Posts : 17
    Reputation : 1
    Language : English

    Solved Re: "Recent topics" widget embedding?

    Post by Fabricator August 31st 2014, 12:08 pm

    Sorry phpBB2
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: "Recent topics" widget embedding?

    Post by TheCrow August 31st 2014, 12:09 pm

    Hello,

    You could copy the html code in the template for that and paste it in a html part on your site and then add the widget via the elements in the template.



    "Recent topics" widget embedding? Thecro10
    Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    avatar
    Fabricator
    New Member


    Posts : 17
    Reputation : 1
    Language : English

    Solved Re: "Recent topics" widget embedding?

    Post by Fabricator August 31st 2014, 12:27 pm

    Hi,
    Thanks for your prompt reply.
    Can you pls explain where i can find the HTML of the "recent topics"?
    Pasting the HTML in my site is the easy part for me :-)
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: "Recent topics" widget embedding?

    Post by TheCrow August 31st 2014, 12:41 pm

    Go to your forum:
    Admin Panel >> Display >> Templates >> Portal >> mod_recent_topics
    That is the hmtl code for the recent topics widget.



    "Recent topics" widget embedding? Thecro10
    Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    avatar
    Fabricator
    New Member


    Posts : 17
    Reputation : 1
    Language : English

    Solved Re: "Recent topics" widget embedding?

    Post by Fabricator August 31st 2014, 2:19 pm

    Ok, not a problem. Copy&paste done. Now how can I add the widget via the elements in the template?
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51505
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: "Recent topics" widget embedding?

    Post by SLGray August 31st 2014, 4:28 pm

    Can you create widgets on your other site?  If you can, add the code to the widget.



    "Recent topics" widget embedding? Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: "Recent topics" widget embedding?

    Post by Ange Tuteur August 31st 2014, 6:14 pm

    MrMind wrote:Go to your forum:
    Admin Panel >> Display >> Templates >> Portal >> mod_recent_topics
    That is the hmtl code for the recent topics widget.
    If this applied on another website, which is not Forumotion, most of the variables will not format.

    Fabricator,

    Could you please provide a link to your forum ? You can use a trick with iframes to display a certain element, however, I will need your forum URL.

    Thanks
    avatar
    Fabricator
    New Member


    Posts : 17
    Reputation : 1
    Language : English

    Solved Re: "Recent topics" widget embedding?

    Post by Fabricator August 31st 2014, 7:19 pm

    Hi Ange,
    Thanks for your reply.
    My forum adresss: http://fabricator.do-forum.com/forum

    Thank you!
    Amir.
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: "Recent topics" widget embedding?

    Post by Ange Tuteur August 31st 2014, 7:27 pm

    On your Forumotion forum go to Administration Panel > Modules > JavaScript codes management

    Make sure JavaScript code management is enabled(and save if it wasn't), then create a new script.

    Title : Your choice
    Placement : in the portal
    Paste the code below and submit :
    Code:
    $(function(){$(function(){
      if (location.hash == '#fatopics') {
        document.body.innerHTML = document.getElementById('comments_scroll_div').innerHTML;
        document.body.style.marginTop = 0;
        var a = document.getElementsByTagName('A');
        for (i=0;i<a.length;i++) a[i].target='_blank';
      }
    })});

    Then just paste this in a widget on your website :
    Code:
    <iframe style="width:346px;height:200px;border:none;overflow:hidden;" src="http://fabricator.do-forum.com/#fatopics"></iframe>

    You can adjust it's width/height as you wish from the style attribute.


    Last edited by Ange Tuteur on August 31st 2014, 7:56 pm; edited 2 times in total
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51505
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: "Recent topics" widget embedding?

    Post by SLGray August 31st 2014, 7:32 pm

    I believe he wants to place this on a site not hosted by Forumotion.



    "Recent topics" widget embedding? Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: "Recent topics" widget embedding?

    Post by Ange Tuteur August 31st 2014, 7:41 pm

    SLGray wrote:I believe he wants to place this on a site not hosted by Forumotion.
    That's what I'm attempting with the iframe.

    I'll use a hash in the window url (#fatopics) which will trigger a script on the forum to replace the body contents with only the widget. ( for example ) If done correctly it should work on other websites since it's a window to the forum.
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51505
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: "Recent topics" widget embedding?

    Post by SLGray August 31st 2014, 7:43 pm

    Oh sorry, I thought you misunderstood.



    "Recent topics" widget embedding? Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: "Recent topics" widget embedding?

    Post by Ange Tuteur August 31st 2014, 7:51 pm

    It's fine. ^^

    I did make a small mistake, if you clicked the links they would open in the iframe. I edited the script in my last post so they would open in a new tab, but I'll post it below also.

    Code:
    $(function(){$(function(){
      if (location.hash == '#fatopics') {
        document.body.innerHTML = document.getElementById('comments_scroll_div').innerHTML;
        document.body.style.marginTop = 0;
        var a = document.getElementsByTagName('A');
        for (i=0;i<a.length;i++) a[i].target='_blank';
      }
    })});
    avatar
    Fabricator
    New Member


    Posts : 17
    Reputation : 1
    Language : English

    Solved Re: "Recent topics" widget embedding?

    Post by Fabricator August 31st 2014, 8:03 pm

    OK, with your great support I am making a progress here
    Only thing is that instead of the last topics window i got a windows that opens the whole site...
    "Recent topics" widget embedding? Screen10
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: "Recent topics" widget embedding?

    Post by Ange Tuteur August 31st 2014, 8:23 pm

    Fabricator wrote:OK, with your great support I am making a progress here
    Only thing is that instead of the last topics window i got a windows that opens the whole site...
    "Recent topics" widget embedding? Screen10

    Have you followed this step ? I do not see any script sources on your forum from JS management.

    Ange Tuteur wrote:On your Forumotion forum go to Administration Panel > Modules > JavaScript codes management

    Make sure JavaScript code management is enabled(and save if it wasn't), then create a new script.

    Title : Your choice
    Placement : in the portal
    Paste the code below and submit :
    Code:
    $(function(){$(function(){
      if (location.hash == '#fatopics') {
        document.body.innerHTML = document.getElementById('comments_scroll_div').innerHTML;
        document.body.style.marginTop = 0;
        var a = document.getElementsByTagName('A');
        for (i=0;i<a.length;i++) a[i].target='_blank';
      }
    })});
    avatar
    Fabricator
    New Member


    Posts : 17
    Reputation : 1
    Language : English

    Solved Re: "Recent topics" widget embedding?

    Post by Fabricator August 31st 2014, 8:29 pm

    Hi Ange,
    As far as i understand I followed you step after step...
    "Recent topics" widget embedding? Screen11
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: "Recent topics" widget embedding?

    Post by TheCrow August 31st 2014, 8:32 pm

    Ange Tuteur wrote:On your Forumotion forum go to Administration Panel > Modules > JavaScript codes management

    Make sure JavaScript code management is enabled(and save if it wasn't), then create a new script.

    Title : Your choice
    Placement : in the portal
    Paste the code below and submit :
    Code:
    $(function(){$(function(){
      if (location.hash == '#fatopics') {
        document.body.innerHTML = document.getElementById('comments_scroll_div').innerHTML;
        document.body.style.marginTop = 0;
        var a = document.getElementsByTagName('A');
        for (i=0;i<a.length;i++) a[i].target='_blank';
      }
    })});
    In the portal is the placement my friend. You left it in the homepage
    avatar
    Fabricator
    New Member


    Posts : 17
    Reputation : 1
    Language : English

    Solved Re: "Recent topics" widget embedding?

    Post by Fabricator August 31st 2014, 8:35 pm

    Ange and Mr.Mind - Thanks a lot!!!
    it works like a dream :-)
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: "Recent topics" widget embedding?

    Post by TheCrow August 31st 2014, 8:40 pm

    Fabricator wrote:Ange and Mr.Mind - Thanks a lot!!!
    it works like a dream :-)
    All credits should go to Ange. I didn't do anything! Wink
    avatar
    Fabricator
    New Member


    Posts : 17
    Reputation : 1
    Language : English

    Solved Re: "Recent topics" widget embedding?

    Post by Fabricator August 31st 2014, 8:48 pm

    BTW... just another small question :-)
    How can I change the color of the Iframe window?
    avatar
    Fabricator
    New Member


    Posts : 17
    Reputation : 1
    Language : English

    Solved Re: "Recent topics" widget embedding?

    Post by Fabricator August 31st 2014, 8:51 pm

    I mean the background color of the Last topics Iframe like in this pic:
    "Recent topics" widget embedding? Screen12
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: "Recent topics" widget embedding?

    Post by TheCrow August 31st 2014, 8:56 pm

    Replace the code Ange gave you with this one:
    Code:
    <iframe style="width:346px;height:200px;border:none;overflow:hidden;background:#FFF;" src="http://fabricator.do-forum.com/#fatopics"></iframe>
    Then change the background:#FFF; with the color you want.
    avatar
    Fabricator
    New Member


    Posts : 17
    Reputation : 1
    Language : English

    Solved Re: "Recent topics" widget embedding?

    Post by Fabricator August 31st 2014, 9:23 pm

    Hi, just tried it..
    I changes the color for 1 second and then goes back to original color,light blue...
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: "Recent topics" widget embedding?

    Post by TheCrow August 31st 2014, 9:44 pm

    Try this instead:
    Code:
    <iframe style="width:346px;height:200px;border:none;overflow:hidden;background:#FFF!important;" src="http://fabricator.do-forum.com/#fatopics"></iframe>



    "Recent topics" widget embedding? Thecro10
    Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: "Recent topics" widget embedding?

    Post by Ange Tuteur August 31st 2014, 9:53 pm

    MrMind wrote:Try this instead:
    Code:
    <iframe style="width:346px;height:200px;border:none;overflow:hidden;background:#FFF!important;" src="http://fabricator.do-forum.com/#fatopics"></iframe>
    This will only change the background of the iframe, not the elements in the window. Once the window is loaded the background color is determined by the color of the body tag on the forum itself.

    I checked your forums sheet and didn't see this color. Try adding this rule to the stylesheet on your forumotion forum :
    Display > Colors > CSS stylesheet

    Code:
    body { background-color:#FFF; }

    Change #FFF to any color you want.