Widget to template Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

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.
2 posters

    Widget to template

    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    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:
    Ange Tuteur
    Ange Tuteur
    Forumaster


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

    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
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    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..



    Widget to template Thecro10
    Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    Ange Tuteur
    Ange Tuteur
    Forumaster


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

    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.
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    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..



    Widget to template Thecro10
    Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    Ange Tuteur
    Ange Tuteur
    Forumaster


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

    Solved Re: Widget to template

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

    Topic Solved and Archived