Recent Topic widget

Go down

Solved Recent Topic widget

Post by TheShaka on 11/3/2014, 12:17

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 14/3/2014, 23:03; edited 1 time in total
avatar
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 12/3/2014, 12:43

bump.
avatar
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 13/3/2014, 02:17

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

Male Posts : 13195
Reputation : 2910
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: Recent Topic widget

Post by TheShaka on 13/3/2014, 11:20

Work man perfect. but how to replace ">>" to another image or something?
avatar
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 13/3/2014, 11:22

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

Male Posts : 13195
Reputation : 2910
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: Recent Topic widget

Post by TheShaka on 13/3/2014, 22:03

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:
avatar
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 14/3/2014, 06:45

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

Male Posts : 13195
Reputation : 2910
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: Recent Topic widget

Post by TheShaka on 14/3/2014, 18:26

Hmm any idea what happen here?
avatar
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 14/3/2014, 20:59

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

Male Posts : 13195
Reputation : 2910
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: Recent Topic widget

Post by TheShaka on 14/3/2014, 22:52

Work perfect thanks.
avatar
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 15/3/2014, 03:18

Topic Solved & Archived


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

avatar
SLGray
Administrator
Administrator

Male Posts : 43061
Reputation : 3047
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Back to top


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