The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Widgets in Profiles page

View previous topic View next topic Go down

Solved Widgets in Profiles page

Post by Anzo on September 26th 2015, 4:21 pm

I have widgets placed under my forum's logo, not to the right or left side. When visiting a member's profile, widgets doesn't appear. I couldn't find a way to have widgets appear; instead, I only have a blank area.

This is how it looks: http://daskintest.forumarabia.com/u1

I only want to widgets beneath my logo to appear and not the all of the widgets i have. OR, if that wasn't possible, I want to reduce that empty space between the logo and the profiles just like if nothing was there when viewing profiles.

Is it possible?


Last edited by Anzo on September 26th 2015, 7:20 pm; edited 1 time in total

Anzo
Forumember

Posts : 316
Reputation : 6
Language : English/Arabic
Location : Baghdad - Iraq

http://www.duelacademy.net/forum

Back to top Go down

Solved Re: Widgets in Profiles page

Post by Ange Tuteur on September 26th 2015, 4:35 pm

Hi @Anzo,

You could send a request to your main page to get the widgets, and then append them to the profile page. Try adding the following scripts in all the pages :
Code:
/\/u\d+/.test(window.location.href) && $(function() {
  var wrapper = document.getElementById('wrapper');
  if (wrapper) {
    $.get('/', function(d) {
      var widgets = $('#right', d)[0];
      if (widgets) wrapper.appendChild(widgets);
    });
  }
});

Although if you're using the advance profile it may get a tad messy. I think if you use the simple profile the widgets show by default.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Widgets in Profiles page

Post by Anzo on September 26th 2015, 4:53 pm

All widgets appeared, can i specify which widgets I want to show in profiles? Like, I don't need to request all the widgets to be brought from the Index, right?

Also, how do I know whether I'm using simple or advances profiles? lol

Anzo
Forumember

Posts : 316
Reputation : 6
Language : English/Arabic
Location : Baghdad - Iraq

http://www.duelacademy.net/forum

Back to top Go down

Solved Re: Widgets in Profiles page

Post by Ange Tuteur on September 26th 2015, 5:02 pm

I think you're using advanced if you don't see the widgets. Razz

Hmm.. if your widgets have specific ID's you can do this :
Code:
/\/u\d+/.test(window.location.href) && $(function() {
  var wrapper = document.getElementById('wrapper');
  if (wrapper) {
    $.get('/', function(d) {
      $(wrapper).append($('#right, #left', d));
    });
  }
});

You should see this part with right and left : $('#right, #left', d) just replace those selectors with the IDs of the widgets you want to get. If any problems let me know. Smile

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Widgets in Profiles page

Post by Anzo on September 26th 2015, 5:38 pm

Something like this?

Code:
/\/u\d+/.test(window.location.href) && $(function() {
  var wrapper = document.getElementById('wrapper');
  if (wrapper) {
    $.get('/', function(d) {
      $(wrapper).append($('#IndexBLogo1, #IndexBLogo2, IndexBLogo4', d));
    });
  }
});

because nothing is showing

Anzo
Forumember

Posts : 316
Reputation : 6
Language : English/Arabic
Location : Baghdad - Iraq

http://www.duelacademy.net/forum

Back to top Go down

Solved Re: Widgets in Profiles page

Post by Ange Tuteur on September 26th 2015, 6:15 pm

Are they "index_wid_test" ? Because I tried document.getElementId('IndexBLogo1'); and it returned null in the console. ( doesn't exist )

If so, this should work :
Code:
/\/u\d+/.test(window.location.href) && $(function() {
  var wrapper = document.getElementById('wrapper');
  if (wrapper) {
    $.get('/', function(d) {
      $(wrapper).append($('#index_wid_test, #index_2ndrow_table, #index_wid3', d));
    });
  }
});

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Widgets in Profiles page

Post by Anzo on September 26th 2015, 6:54 pm

Hm, it worked but the CSS wasn't applied: http://prntscr.com/8kq7ec

Anzo
Forumember

Posts : 316
Reputation : 6
Language : English/Arabic
Location : Baghdad - Iraq

http://www.duelacademy.net/forum

Back to top Go down

Solved Re: Widgets in Profiles page

Post by Ange Tuteur on September 26th 2015, 6:57 pm

Oh, is the CSS included in a widget ? If you put it in the stylesheet it should work on all pages.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Widgets in Profiles page

Post by Anzo on September 26th 2015, 7:20 pm

You're a magician Very Happy

Thanks a lot.

Anzo
Forumember

Posts : 316
Reputation : 6
Language : English/Arabic
Location : Baghdad - Iraq

http://www.duelacademy.net/forum

Back to top Go down

Solved Re: Widgets in Profiles page

Post by SLGray on September 26th 2015, 8:07 pm

Topic solved and archived



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


SLGray
Administrator
Administrator

Male Posts : 36697
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


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