News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Personal Twitter on User Profile | Stucked (Newbie)

Started by Antes, June 07, 2011, 05:35:16 AM

Previous topic - Next topic

Antes

Recently i 'm working on Personal Twitter Feeds on User Profile... (I'm newbie)

I Did;
> db-table created
> Profile.template.php edited
> Profile-Modify.php edited
> Load.php edited
> Subs-Members.php edited
> index.css edited (windowbg4 added)

I tested db/save/load all working but still not working i added

Profile-Modify.php
        'P_Tweet_ID' => array(
            'type' => 'text',
            'label' => $txt['p_tweet_ID'],
            'subtext' => $txt['p_tweet_ID_Desc'],
            'size' => 50,
            'permission' => 'profile_extra',
        ),


Load.php (twice added)
mem.P_Tweet_ID,
        'twitter' => array(
            'ID' => $profile['P_Tweet_ID'],


Subs-Members.php
mem.P_Tweet_ID
        'P_Tweet_ID' => '',

Profile.template.php
    echo '    <div id="TweetSec">
            </div>
            <span class="botslice"><span></span></span>
        </div>
    </div>
<div class="clear"></div>
</div>';
        echo '
        <div class="windowbg4">
            <span class="topslice"><span></span></span>
            <div class="content flow_auto">';
        echo '
            <h3><b>', $txt['p_tweet'], '</b></h3>               
                <script src="http://widgets.twimg.com/j/2/widget.js"></script>
            <script>
                new TWTR.Widget({
                    version: 2,
                    type: "profile",
                    rpp: 4,
                    interval: 6000,
                    width: 250,
                    height: 300,
                    theme: {
                    shell: {   
                    background: "#333333",
                    color: "#ffffff"
            },
                tweets: {
                background: "#000000",
                color: "#ffffff",
                links: "#4aed05"
    }
  },
  features: {
    scrollbar: false,
    loop: false,
    live: false,
    hashtags: true,
    timestamp: true,
    avatars: false,
    behavior: "all"
  }
}).render().setUser("',$context['member']['P_Tweet_ID']['text'],'").start();
</script>';
    echo '                   
            </div>
            <span class="botslice"><span></span></span>
        </div>
    </div>
<div class="clear"></div>';


I added all of those above and i can save/change my twitter ID but still not showing on profile.
Also made a little copy of windowbg2 (and renamed it to windowbg4) ( just added topslice/botslice and )

.windowbg4
{
    color: #000;
    background-color: #f0f4f7;
}




Antes

well thank you, but i still cant figure out why context not loading from db ... :/

Yağız...

Try to replace your Profile.template.php codes with this:
    echo '    <div id="TweetSec">
            </div>
            <span class="botslice"><span></span></span>
        </div>
    </div>
<div class="clear"></div>
</div>';
        echo '
        <div class="windowbg4">
            <span class="topslice"><span></span></span>
            <div class="content flow_auto">';
        echo '
            <h3><b>', $txt['p_tweet'], '</b></h3>               
                <script src="http://widgets.twimg.com/j/2/widget.js"></script>
            <script>
                new TWTR.Widget({
                    version: 2,
                    type: "profile",
                    rpp: 4,
                    interval: 6000,
                    width: 250,
                    height: 300,
                    theme: {
                    shell: {   
                    background: "#333333",
                    color: "#ffffff"
            },
                tweets: {
                background: "#000000",
                color: "#ffffff",
                links: "#4aed05"
    }
  },
  features: {
    scrollbar: false,
    loop: false,
    live: false,
    hashtags: true,
    timestamp: true,
    avatars: false,
    behavior: "all"
  }
}).render().setUser("',$context['member']['twitter']['ID'],'").start();
</script>';
    echo '                   
            </div>
            <span class="botslice"><span></span></span>
        </div>
    </div>
<div class="clear"></div>';

Antes

Well once again thx for your help :) life saver... I shot you a pm about CSS :)

Advertisement: