Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • ozzymanson2 Friend
    #183131

    how to make twitter posts looks like in demo (com_content) in K2?

    com_content http://gyazo.com/493585bab3c0f7433e3f77721d3a6410
    K2 http://gyazo.com/6676d7d687fe58662350b0512e1f904b

    there are no blue bird, intro text and active links in K2

    misteroram01 Friend
    #476436

    Try with K2 twitter button change text

    ozzymanson2 Friend
    #476439

    <em>@misteroram01 350874 wrote:</em><blockquote>Try with K2 twitter button change text</blockquote>

    what are you talking about? i didn’t understand

    Wall Crasher Developer
    #476460

    Hi

    It is easy to show the blue bird in k2 item.

    Just add ‘twitter’ as extended class to K2 items.

    You can also use this thread http://www.joomlart.com/forums/topic/youtube-extended-classes/#post-476291

    and try to copy the function to twitter feeds.

    Here are steps:

    1. Open pluginssystemjasocial_feedjasocial_feed.xml and this block code at line 118

    <field name="twitter_exclass" type="text" default="" label="Extened class" description="Extened class"/>

    2. Open pluginssystemjasocial_feedjasocial_feed.php and add this block code at line 315

    $twitter_exclass= $this->getProperty($profile, 'twitter_exclass', '');

    And this block code at line 389

    if($twitter_exclass){
    $post['metadata'] = json_encode(array('xclass' => $twitter_exclass));
    }

    Also, add this line code at line

    3. Open pluginssystemjasocial_feedtablesjoomla.php and add this block code at line 95 (if you already add, please skip)
    $item[‘metadata’] = isset($post[‘metadata’]) ? $post[‘metadata’] : ”;

    For the text, you can simply remove
    $txt .= ‘<p class=”readmore”><a class=”readmore” href=”‘.$post[‘source_url’]. ‘” title=”‘.$post[‘source_url_txt’].'” target=”_blank”>’.$post[‘source_url_txt’].'</a></p>’;

    in pluginssystemjasocial_feedtablesk2.php

    We will try to update new version to fix this problem.

    Hope it helps.

    Regards

    Wall Crasher Developer
    #476632

    Hi,

    I make a mistake yesterday.

    <blockquote>And this block code at line 389
    Code:
    if($twitter_exclass){
    $post[‘metadata’] = json_encode(array(‘xclass’ => $twitter_exclass));
    }
    Also, add this line code at line

    3. Open pluginssystemjasocial_feedtablesjoomla.php and add this block code at line 95 (if you already add, please skip)
    $item[‘metadata’] = isset($post[‘metadata’]) ? $post[‘metadata’] : ”;</blockquote>

    I forgot we are try to use K2, not Joomla Standard content.
    It should be like this.

    if($twitter_exclass){
    $post['exclass'] = json_encode(array(array('id' => 1, 'value' => $twitter_exclass)));
    }

    and Open file pluginssystemjasocial_feedtablesk2.php instead of ‘pluginssystemjasocial_feedtablesjoomla.php’
    We should add this line code at line 107

    $item['extra_fields'] = isset($post['exclass']) ? $post['exclass'] : '';

    There is one important note:

    json_encode(array(array('id' => 1, 'value' => $twitter_exclass)))
    Since we use id value here. This value should be the id of extra field name ‘Extended Class’ of K2 #__k2_extra_fields table.

    If you have installed our quickstart package, you should get it at id = 1. If you not have Extended Class extra field, you should add it to K2 and change the correct id here.

    Hope it helps.

    Regards

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 3 voices, and was last updated by  Wall Crasher 11 years, 11 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum