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.

"Recent topics" widget embedding?

5 posters

Page 1 of 2 1, 2  Next

Go down

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.
avatar
Fabricator
New Member

Posts : 17
Reputation : 1
Language : English

Back to top Go down

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?
AngelaHolmes
AngelaHolmes
Forumember

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

https://help.forumotion.com

Back to top Go down

Solved Re: "Recent topics" widget embedding?

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

Yes, to my shopify website.
avatar
Fabricator
New Member

Posts : 17
Reputation : 1
Language : English

Back to top Go down

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.
AngelaHolmes
AngelaHolmes
Forumember

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

https://help.forumotion.com

Back to top Go down

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

Back to top Go down

Solved Re: "Recent topics" widget embedding?

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

Sorry phpBB2
avatar
Fabricator
New Member

Posts : 17
Reputation : 1
Language : English

Back to top Go down

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!
TheCrow
TheCrow
Manager
Manager

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

https://www.inforumgr.com

Back to top Go down

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 :-)
avatar
Fabricator
New Member

Posts : 17
Reputation : 1
Language : English

Back to top Go down

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!
TheCrow
TheCrow
Manager
Manager

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

https://www.inforumgr.com

Back to top Go down

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?
avatar
Fabricator
New Member

Posts : 17
Reputation : 1
Language : English

Back to top Go down

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.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51596
Reputation : 3527
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

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
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

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.
avatar
Fabricator
New Member

Posts : 17
Reputation : 1
Language : English

Back to top Go down

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
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

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.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51596
Reputation : 3527
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

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.
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

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.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51596
Reputation : 3527
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

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';
  }
})});
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

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
avatar
Fabricator
New Member

Posts : 17
Reputation : 1
Language : English

Back to top Go down

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';
  }
})});
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

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
avatar
Fabricator
New Member

Posts : 17
Reputation : 1
Language : English

Back to top Go down

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
TheCrow
TheCrow
Manager
Manager

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

https://www.inforumgr.com

Back to top Go down

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 :-)
avatar
Fabricator
New Member

Posts : 17
Reputation : 1
Language : English

Back to top Go down

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
TheCrow
TheCrow
Manager
Manager

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

https://www.inforumgr.com

Back to top Go down

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

Back to top Go down

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
avatar
Fabricator
New Member

Posts : 17
Reputation : 1
Language : English

Back to top Go down

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.
TheCrow
TheCrow
Manager
Manager

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

https://www.inforumgr.com

Back to top Go down

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...
avatar
Fabricator
New Member

Posts : 17
Reputation : 1
Language : English

Back to top Go down

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!
TheCrow
TheCrow
Manager
Manager

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

https://www.inforumgr.com

Back to top Go down

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.
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

Page 1 of 2 1, 2  Next

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum