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.

Widget to template

2 posters

Go down

Solved Widget to template

Post by TheCrow November 24th 2013, 4:00 pm

Hi, i am using these arrows on the forum but they are in a widget.
Widget to template DjWX4VY

Is there any way to put them in the template?


Widget Code:
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Widget to template

Post by Ange Tuteur November 24th 2013, 4:13 pm

If you want it to work on almost all pages you would have to add it to nearly every single template. I think you would be best sticking with the widget. thumright
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Widget to template

Post by TheCrow November 24th 2013, 4:23 pm

i only want it in the forum.. not in all pages. only in homepage.. can i put it as it is in the template? or it needs any changes..
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Widget to template

Post by Ange Tuteur November 24th 2013, 4:28 pm

Okey dokey,

Administration Panel > Modules > HTML & JAVASCRIPT > Javascript codes management > Create a new script

Name: what you wish
Placement: In the homepage
Code:
jQuery(function() {
jQuery('body').append('<div style="position:fixed; right:0.1%; bottom:45%;"><div id="nav_up"><img src="http://i57.servimg.com/u/f57/11/38/18/62/iiii10.gif" alt="Πάνω" title="Πάνω" border="0"></div><div id="nav_down"><img src="http://i57.servimg.com/u/f57/11/38/18/62/isiii11.png" alt="Κάτω " title="Κάτω" border="0"></div></div>');
});

                    jQuery(function() {
                        var overelem = jQuery('body');
                
                       jQuery('#nav_up').fadeIn('slow');
                        jQuery('#nav_down').fadeIn('slow');
                                    
                       jQuery('#nav_down').click(
                          function (e) {
                              jQuery('html, body').animate({scrollTop: overelem.height()}, 1100);
                          }
                        );
                        jQuery('#nav_up').click(
                          function (e) {
                              jQuery('html, body').animate({scrollTop: '0px'}, 1100);
                          }
                        );
                        });
Save and it should only run in the homepage.
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Widget to template

Post by TheCrow November 24th 2013, 4:36 pm

I don't know but this works fine to all pages also!!

You are great!! Solved..
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Widget to template

Post by Ange Tuteur November 24th 2013, 4:39 pm

Topic Solved and Archived
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

Back to top

- Similar topics

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