Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hi, is anybody currently using the latest tweets addon discussed in the post: http://www.couchcms.com/forum/viewtopic.php?f=8&t=7730 ?

I´m trying to use it following step by step the instructions mentioned in the post but all i get displayed in screen is the title "Latest Tweets" and the twitter bird image.

i already placed the tweets folder into addons, added the line to kfunctions, changed the config.php file with my twitter app data, and paste the following code to a template, still it doesn't display the tweets, maybe i´m missing something?

Note: The only diference is in this code i´m hard-coding the screen user name
Code: Select all
<div id="twitter-feed">
    <a href="https://twitter.com/" target="_blank">
        <img src="images/twitter-bird-light.png" width="34" style="float:left;padding:3px 12px 0px 6px" alt="twitter bird">
    </a>
    <h1>Latest Tweets</h1>
   
    <cms:tweets>
    <div class="twitter-article" id="tw<cms:show k_count />">
        <div class="twitter-pic">
            <a href="https://twitter.com/TechCrunch" target="_blank">
                <img src="<cms:show user_profile_image />" width="42" height="42" alt="twitter icon">
            </a>
        </div>

        <div class="twitter-text">
            <p>
                <span class="tweetprofilelink">
                    <strong><a href="https://twitter.com/TechCrunch" target="_blank"><cms:show user_name /></a></strong> <a href="https://twitter.com/TechCrunch" target="_blank">@TechCrunch</a>
                </span>
                <span class="tweet-time">
                    <a href="<cms:show permalink />" target="_blank"><cms:show tweet_display_time /></a>
                </span>
                <br/>
                <cms:show tweet_text />
            </p>

            <cms:if is_retweet><div id="retweet-indicator"></div></cms:if>
            <div id="twitter-actions" style="display: none; opacity: 0; margin-top: -20px;">
                <div class="intent" id="intent-reply"><a href="<cms:show reply_link />" title="Reply"></a></div>
                <div class="intent" id="intent-retweet"><a href="<cms:show retweet_link />" title="Retweet"></a></div>
                <div class="intent" id="intent-fave"><a href="<cms:show favorite_link />" title="Favourite"></a></div>
            </div>
        </div>
    </div>
    </cms:tweets>     
</div> 
Hi,

I tested your code and it is working fine for me.
So nothing wrong with that.

Also, had you missed any necessary configuration step, it'd thrown a visible error.
So, I don't think that is the problem either.

So, I really don't know what could be going wrong.
Perhaps you can try emptying your 'couch/cache' folder?
See if that makes any difference.

Keep us posted.
Thanks.
Hi KK, after try it several times it was actually something very very simple, the account i used to create the twitter app didn´t have any tweets and i didn´t change the 'handle' parameter in the tweets_ex.php file so after publishing the first tweet of the account or changing the 'handle' parameter the code actually worked perfectly.

So this lead me to another question, is there a way to pull the value of an editable region to the 'handle' parameter? For example i have an editable region in globals.php for the client to put his twitter user name and i would like to use that value for the 'handle' parameter, i tried the next code but it didn´t work.

Code: Select all
extract( $FUNCS->get_named_vars(
  array(
    'handle'=>'<cms:get_custom_field 'twitter' masterpage='globals.php' />',
    'count'=>'5',
    'exclude_replies'=>'0',
    'include_rts'=>'1',
    'twitter_style_dates'=>'1',
    'date_format'=>'',
    'startcount'=>'1',
  ),
  $params)
);
Hi,

Modifying the PHP code will not be necessary - the cms:tweets tag itself supports a 'handle' parameter e.g.
Code: Select all
<cms:tweets handle='xyz'>

or
Code: Select all
<cms:tweets handle="<cms:get_custom_field 'twitter' masterpage='globals.php' />">

Hope this helps.
4 posts Page 1 of 1