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

XF 1.1 Twitter widget into the sidebar

Discussion in 'XenForo Questions and Support' started by Marco Famà, Jul 23, 2012.

  1. Marco Famà

    Marco Famà Active Member

    Dear all,

    do you know if it is possible to have a widget within the sidebar, showing the list of the 5/10 most recent tweets from a twitter account?

    Maybe it's already there somewhere and I cannot see it...? :)

  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    This looks promising:


    In step 4 (adding the placeholder in <body>) you will need to edit this template to add a sidebar block:

    Admin CP -> Appearance -> Templates -> forum_list

    E.g. add the red code:

    	<xen:edithint template="sidebar.css" />
    	<xen:hook name="forum_list_sidebar">
    		<xen:include template="sidebar_online_users" />
    		<!-- block: forum_stats -->
    		<div class="section">
    			<div class="secondaryContent statsList" id="boardStats">
    				<h3>{xen:phrase forum_statistics}</h3>
    				<div class="pairsJustified">
    					<dl class="discussionCount"><dt>{xen:phrase discussions}:</dt>
    						<dd>{xen:number $boardTotals.discussions}</dd></dl>
    					<dl class="messageCount"><dt>{xen:phrase messages}:</dt>
    						<dd>{xen:number $boardTotals.messages}</dd></dl>
    					<dl class="memberCount"><dt>{xen:phrase members_count}:</dt>
    						<dd>{xen:number $boardTotals.users}</dd></dl>
    					<dl><dt>{xen:phrase latest_member}:</dt>
    						<dd><xen:username user="$boardTotals.latestUser" /></dd></dl>
    					<!-- slot: forum_stats_extra -->
    		<!-- end block: forum_stats -->
    		<xen:include template="sidebar_share_page">
    			<xen:set var="$url">{xen:link canonical:index}</xen:set>
    	<div class="section">
    		<div class="secondaryContent">
    			<div class="tweet"></div>
    Marco Famà likes this.
  3. MagnusB

    MagnusB Well-Known Member

    You can just get the official widget and use the ad_sidebar templates, just do something like this:
    <div class="section">
    <div class="secondaryContent">
    <h3>Twitter Feed</h3>
    <!-- Paste your twitter widget code here -->
    Marco Famà and HenrikHansen like this.
  4. Marco Famà

    Marco Famà Active Member

  5. MichaelDance

    MichaelDance Well-Known Member

    I couldn't get that working :s

Share This Page