1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Add tsviewer to sidebar

Discussion in 'Styling and Customization Questions' started by Ren3gade10, Aug 4, 2013.

  1. Ren3gade10

    Ren3gade10 Member

    What would be the easiest way for me to add sidebars to my website on Xenforo?

    I am wanting to add a few custom sidebars and whatnot. But TSviewer is the most important.
     
  2. dvsDave

    dvsDave Well-Known Member

    create a new template and put your tsviewer code in there., call the template custom_TSviewer. Then go to the template that you want to add the sidebar block to. See if there is already the following code in the template:

    Code:
    <xen:sidebar>
        /* sidebar content between the xen:sidebar tabs */
    </xen:sidebar>
    Add

    Code:
    <xen:include template="custom_TSviewer" />
    between the sidebar tags.

    There is a great FAQ for template edits here: http://xenforo.com/community/threads/frequently-asked-questions.5183/
     
    Last edited: Aug 4, 2013
  3. Ren3gade10

    Ren3gade10 Member

    When trying to save the template i get.. The following templates contained errors and were not saved: custom_TSviewer: 1) custom_TSviewer - Line 14: Circular reference found in template includes.

    This is the tsviewer code..
    Code:
    <div id="ts3viewer_1024178" style="width:; background-color:;"> </div>
    
    <script type="text/javascript" src="http://static.tsviewer.com/short_expire/js/ts3viewer_loader.js"></script>
    
    <script type="text/javascript">
    <!--
    var ts3v_url_1 = "http://www.tsviewer.com/ts3viewer.php?ID=1024178&text=000000&text_size=12&text_family=1&js=1&text_s_weight=bold&text_s_style=normal&text_s_variant=normal&text_s_decoration=none&text_s_color_h=525284&text_s_weight_h=bold&text_s_style_h=normal&text_s_variant_h=normal&text_s_decoration_h=underline&text_i_weight=normal&text_i_style=normal&text_i_variant=normal&text_i_decoration=none&text_i_color_h=525284&text_i_weight_h=normal&text_i_style_h=normal&text_i_variant_h=normal&text_i_decoration_h=underline&text_c_weight=normal&text_c_style=normal&text_c_variant=normal&text_c_decoration=none&text_c_color_h=525284&text_c_weight_h=normal&text_c_style_h=normal&text_c_variant_h=normal&text_c_decoration_h=underline&text_u_weight=bold&text_u_style=normal&text_u_variant=normal&text_u_decoration=none&text_u_color_h=525284&text_u_weight_h=bold&text_u_style_h=normal&text_u_variant_h=normal&text_u_decoration_h=none";
    ts3v_display.init(ts3v_url_1, 1024178, 100);
    -->
    </script>
     
  4. Ren3gade10

    Ren3gade10 Member

    Nvm I did it wrong. let me try again xD
     
  5. Ren3gade10

    Ren3gade10 Member

    Where do I insert
    <!-- block: sidebar_online_staff -->
    <xen:sidebar>
    <xen:include template="custom_TSviewer" />
    </xen:sidebar>

    I am still using the default template. But I don't know where to insert that code at. What template file?
     
  6. dvsDave

    dvsDave Well-Known Member

    Where do you want the sidebar?
     
  7. Ren3gade10

    Ren3gade10 Member

    On the right side under Members online now
     
  8. dvsDave

    dvsDave Well-Known Member

    in the forum_list template, find:
    Code:
    <xen:hook name="forum_list_sidebar">
            <xen:include template="sidebar_online_users" />
    Put the template include under the next line.
     
  9. Ren3gade10

    Ren3gade10 Member

    Got it, thank you so much dave!
     

Share This Page