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.

HTML code similar to External Widget but for AD widget instead?

+2
SLGray
Mace Hathaway
6 posters

Go down

In progress HTML code similar to External Widget but for AD widget instead?

Post by Mace Hathaway January 29th 2024, 8:21 am

Technical Details


Forum version : #ModernBB
Position : Founder
Concerned browser(s) : Google Chrome
Who the problem concerns : Yourself
When the problem appeared : only recently
Forum link : caboodlz.forumotion.com/forum

Description of problem

Hello.
Thanks in advance for any help.
modernbb
Caboodlz.forumotion.com

I was hoping to locate the html code for my "AD WIDGET"
I would like to be able to embed that widget, just like the latest topics 'external' forumotion widget. I have the later embedded on my site, and I would love to embed my scrolling AD Widget in the same manner, on my home site ..off site from forumotion.
Ive searched the back side of my admin and have had no luck finding that code anywhere.
The fact that the ads kind of already 'post as topics', makes it seem like it should be fairly easy to use the other module in the same manner as the external widget, or maybe alter the code title{Latest+Discussion} to point at the AD widget instead of the latest topics widget?

Thanks for the info. I look forward to hearing your opinions.-Mace
Mace Hathaway
Mace Hathaway
Forumember

Posts : 30
Reputation : 1
Language : English

Back to top Go down

In progress Re: HTML code similar to External Widget but for AD widget instead?

Post by SLGray January 29th 2024, 8:26 am

Do you mean the top widget (classified ads) on the left side?


HTML code similar to External Widget but  for AD widget instead? 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 : 51493
Reputation : 3519
Language : English
Location : United States

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

Mace Hathaway likes this post

Back to top Go down

In progress Re: HTML code similar to External Widget but for AD widget instead?

Post by Mace Hathaway January 29th 2024, 9:12 am

SL GRAY..yes
Mace Hathaway
Mace Hathaway
Forumember

Posts : 30
Reputation : 1
Language : English

Back to top Go down

In progress Re: HTML code similar to External Widget but for AD widget instead?

Post by khanzain123 February 1st 2024, 11:57 am

Embedding an Active Directory (AD) widget in HTML involves using Microsoft Graph API. Here's a concise example:

Code:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AD Widget</title>
</head>
<body>
    <div id="ad-widget-container"></div>

    <script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
    <script>
        $(document).ready(function () {
            // Use Microsoft Graph API for AD integration
            // Authentication and API call logic here
            // Example: https://docs.microsoft.com/en-us/graph/tutorials/javascript
        });
    </script>
</body>
</html>

The actual code would depend on the specific requirements of the AD widget you're trying to embed. It's crucial to refer to the Microsoft Graph API documentation and the documentation of the specific widget or component you are working with.

This example assumes a simple scenario, and you might need additional configurations and considerations based on your specific use case. Ensure that your application complies with security best practices, especially when dealing with authentication and authorization.

Here are some best HTML online learning platforms:
1. W3School 2. Iqra Technology 3. JavatPoint




khanzain123
khanzain123
New Member

Posts : 1
Reputation : 1
Language : English

Mace Hathaway and khanzain123 like this post

Back to top Go down

In progress Re: HTML code similar to External Widget but for AD widget instead?

Post by Niko February 1st 2024, 12:14 pm

@khanzain123 as the user specified, AD is the classified ads widget by forumotion - not active directory as you intended Embarassed
Niko
Niko
Helper
Helper

Male Posts : 3108
Reputation : 245
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Mace Hathaway likes this post

Back to top Go down

In progress Re: HTML code similar to External Widget but for AD widget instead?

Post by skouliki February 9th 2024, 9:00 am

if your request is completed or answered, please mark it as Solved.
skouliki
skouliki
Manager
Manager

Female Posts : 15133
Reputation : 1696
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

In progress Re: HTML code similar to External Widget but for AD widget instead?

Post by Mace Hathaway February 12th 2024, 6:27 pm

It is not unfortunately....I have not had any replys with the info I'm looking for. I didn't want to repost to bump it, so I've just been waiting for someone to actually come up with a definitive yes, or no. Thanks.
Mace Hathaway
Mace Hathaway
Forumember

Posts : 30
Reputation : 1
Language : English

Back to top Go down

In progress Re: HTML code similar to External Widget but for AD widget instead?

Post by Niko February 14th 2024, 5:02 pm

@Mace Hathaway Sadly there isn't a direct option to integrate it as you would like to Embarassed

The only way to probably do what you'd like to do is to display the widget somewhere on your forum, and then "load it" from an external website. But the widget will always have to be visible somewhere on the forum, otherwise it cannot be retrieved.

Could this be an option?
Niko
Niko
Helper
Helper

Male Posts : 3108
Reputation : 245
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Back to top Go down

In progress Re: HTML code similar to External Widget but for AD widget instead?

Post by Mace Hathaway February 14th 2024, 8:23 pm

Thank you Niko....yes that would def be an option....I would love to figure out how to do that...please and thank you!
Mace Hathaway
Mace Hathaway
Forumember

Posts : 30
Reputation : 1
Language : English

Back to top Go down

In progress Re: HTML code similar to External Widget but for AD widget instead?

Post by Niko February 14th 2024, 9:11 pm

@Mace Hathaway can you add the widget on your forum, and give me the link to the page where it is?
Niko
Niko
Helper
Helper

Male Posts : 3108
Reputation : 245
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Back to top Go down

In progress Re: HTML code similar to External Widget but for AD widget instead?

Post by Mace Hathaway February 22nd 2024, 8:44 pm

Thank you Niko....yes I will
I'm a traveling musician, I'm away from my computer a ton, and I'm just returning home...I do have it on my site already, so I just need to get you the link
Thanks for your response, and sorry on my slow response.
Mace Hathaway
Mace Hathaway
Forumember

Posts : 30
Reputation : 1
Language : English

Back to top Go down

In progress Re: HTML code similar to External Widget but for AD widget instead?

Post by Mace Hathaway February 22nd 2024, 8:52 pm

The Widget is in a couple plces at my site, but the easiest it is on my home page actually....    caboodlz.com  which is just a redirect to the forumotion page    caboodlz.forumotion.com
Classified AD Widget in the top left corner.

I already use the forumotion external widget....on my home music website   mace-hathaway.com   and I'd love it If I could also use the Classified AD widget there as well.

Thanks for your help...lots of driving and shows in the next few days, so I likely will not get back to this thread until next week.

Mace
Mace Hathaway
Mace Hathaway
Forumember

Posts : 30
Reputation : 1
Language : English

Back to top Go down

In progress Re: HTML code similar to External Widget but for AD widget instead?

Post by Razor12345 February 27th 2024, 9:26 am

Good afternoon!

Ive searched the back side of my admin and have had no luck finding that code anywhere.

The Ads widget code is not available to forum administrators.

I already use the forumotion external widget....on my home music website

The widgets we're talking about in this topic have different implementations.
You insert a link to the topics widget in the iframe block and it works without problems, but the ads widget doesn't have a link and the widget can only be loaded via JS.
I think we may be running into a CORS security policy that prohibits sharing data between sites of different domains.

Try pasting this code on your site. This is a trial code that loads the first slide in the ad widget.

Code:

<div class="ads_section">
</div>
 <script>
 
window.addEventListener('load', function() {
const adsSection = document.querySelector('.ads_section');

      $.ajax({
        url: 'https://caboodlz.forumotion.com',
        method: "GET",
        data: 'topiclist',
        dataType: "html",
        success: function (data) {
          let div = document.createElement('div');
          div.innerHTML = data;
          let find_el = div.querySelector('.module.borderwrap .box-content');
adsSection.append(find_el);
       
        },
        error: function (xhr, status, error) {
          console.log("AJAX request error:" + error);
        },
});
 
});
 
</script>

If the CORS policy is not violated, you should get this result or something like that:

HTML code similar to External Widget but  for AD widget instead? Scree743


HTML code similar to External Widget but  for AD widget instead? Screen51
Razor12345
Razor12345
Support Moderator
Support Moderator

Male Posts : 1462
Reputation : 262
Language : Ukr, Rus, Eng
Location : Ukraine

Sir Chivas™ and TheCrow like this post

Back to top Go down

Back to top

- Similar topics

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