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.

Recent Topic widget

View previous topic View next topic Go down

Solved Recent Topic widget

Post by TheShaka on March 11th 2014, 12:17 pm

Hi is possible to add background only to 1 widget (Recent Topic)?
or maybe i can make something like table?
and how i can change this icon:

forum: http://seiya.forumotion.com/


Last edited by TheShaka on March 14th 2014, 11:03 pm; edited 1 time in total

TheShaka
Forumember

Male Posts : 413
Reputation : 6
Language : polish

http://seiya.forumotion.com

Back to top Go down

Solved Re: Recent Topic widget

Post by TheShaka on March 12th 2014, 12:43 pm

bump.

TheShaka
Forumember

Male Posts : 413
Reputation : 6
Language : polish

http://seiya.forumotion.com

Back to top Go down

Solved Re: Recent Topic widget

Post by Ange Tuteur on March 13th 2014, 2:17 am

Hello TheShaka,

Create a new script :
Administration panel > Modules > Javascript codes management > create a new script

Title : what you wish
Placement : in the portal, or all the pages if it is on all pages
Paste the code below and save :
Code:
$(function() {
    var html = $('.module:has(.h3:contains(Latest topics))').html().replace(/»/g,'');
    $('.module:has(.h3:contains(Latest topics))').html(html).addClass('latestTopics')
});

Use this CSS to style the widget once the script is installed :
Display > colors > css stylesheet
Code:
.module.latestTopics {
    background-color:#DEF;
    background-image:url('IMG URL');
}

Ange Tuteur
Forumaster

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

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Recent Topic widget

Post by TheShaka on March 13th 2014, 11:20 am

Work man perfect. but how to replace ">>" to another image or something?

TheShaka
Forumember

Male Posts : 413
Reputation : 6
Language : polish

http://seiya.forumotion.com

Back to top Go down

Solved Re: Recent Topic widget

Post by Ange Tuteur on March 13th 2014, 11:22 am

In the script we replace that icon :
Code:
.replace(/»/g,'')

You can use html or another character that it is replaced by.

ex :
Code:
$(function() {
    var html = $('.module:has(.h3:contains(Latest topics))').html().replace(/»/g,'Topic :');
    $('.module:has(.h3:contains(Latest topics))').html(html).addClass('latestTopics')
});

Ange Tuteur
Forumaster

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

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Recent Topic widget

Post by TheShaka on March 13th 2014, 10:03 pm

I try add image:  but not work
Code:
$(function() {
    var html = $('.module:has(.h3:contains(Latest topics))').html().replace(/»/g,'[img]http://i37.servimg.com/u/f37/17/78/55/62/commen10.png[/img]');
    $('.module:has(.h3:contains(Latest topics))').html(html).addClass('latestTopics')
});

Also i have problem with the background idk why but for me all work (img 1) but for anther members (img 2) the table look like broken...
Any idea how i can fix it?


the backgrround img:

TheShaka
Forumember

Male Posts : 413
Reputation : 6
Language : polish

http://seiya.forumotion.com

Back to top Go down

Solved Re: Recent Topic widget

Post by Ange Tuteur on March 14th 2014, 6:45 am

For the topic image try this :
Code:
$(function() {
    var html = $('.module:has(.h3:contains(Latest topics))').html().replace(/»/g,'<img src="http://i37.servimg.com/u/f37/17/78/55/62/commen10.png" alt="»" />');
    $('.module:has(.h3:contains(Latest topics))').html(html).addClass('latestTopics')
});

The position/size of the background image depends on viewers screen resolution. So for other people it will display differently.

Ange Tuteur
Forumaster

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

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Recent Topic widget

Post by TheShaka on March 14th 2014, 6:26 pm

Hmm any idea what happen here?

TheShaka
Forumember

Male Posts : 413
Reputation : 6
Language : polish

http://seiya.forumotion.com

Back to top Go down

Solved Re: Recent Topic widget

Post by Ange Tuteur on March 14th 2014, 8:59 pm

Try this :
Code:
$(function() {
    var html = $('.module:has(.h3:contains(Latest topics))').html().replace(/»/g,'<img src="http://i37.servimg.com/u/f37/17/78/55/62/commen10.png" alt="»" style="width:auto !important;height:auto !important;" />');
    $('.module:has(.h3:contains(Latest topics))').html(html).addClass('latestTopics')
});

Ange Tuteur
Forumaster

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

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Recent Topic widget

Post by TheShaka on March 14th 2014, 10:52 pm

Work perfect thanks.

TheShaka
Forumember

Male Posts : 413
Reputation : 6
Language : polish

http://seiya.forumotion.com

Back to top Go down

Solved Re: Recent Topic widget

Post by SLGray on March 15th 2014, 3:18 am

Topic Solved & Archived


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


SLGray
Administrator
Administrator

Male Posts : 36735
Reputation : 2446
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