By Zeosing on Wednesday, 07 June 2017
Posted in Technical Issues
Replies 10
Likes 0
Views 2.9K
Votes 0
Hi, this is a global problem, all our site has it.

The problem it´s simple, the twitter script to display "tweet" button doesn´t load, and as a result the tweet button only display the text "tweet" .

This happens after you move the files of social button in the recent updates, before all buttons was in "part.socialbuttons.php" and now are in "/socialbuttons/external" , of course it´s no related to a simple directory change.

Moreover , we aded the twitter script manually to file /com_easyblog/themes/wireframe/socialbuttons/external/twitter.php and the need class "twitter-share-button" and work perfect but of course do this custom work to all sites is a waste of time, since in a future update this can broke the social buttons.

We only put one site , but is for all.

Thanks.
Hi Zeosing,

I've tried to replicate this locally seems like I cannot reproduce it https://www.screencast.com/t/holSeEqu
Is it possible for you to provide us with the back end and FTP access to your site to check on this issue?

You can add the information needed by edit your first post in the Details section or you can just include your site's access once at http://stackideas.com/dashboard/site rather than needing to keep adding them in your replies
·
Wednesday, 07 June 2017 16:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Like you see in your image, the tweet button it´s no generate by a default Twitter Script, since there it´s not translated like the Facebook button, this is the problem, and it´s in your screen cap, and you reproduce it like we have it.

To be totally clear, the FB button it´s generated by FB script and you can change language etc, the TW button not ( in previous versions yes ), it´s a word "Tweet" with a fontawesome icon and a bit of CSS, this is the problem, moreover the settings in back end like "@Via Screen Name" has no effect in the button when in the TW documentation there is a param "data-via=" to do this.

Like I said this is a recent problem.

Thanks
·
Wednesday, 07 June 2017 17:37
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Zeosing,

Basically you would like us to include via into the tweet share URL right?

And the `Tweet` word you can change it from Joomla language override section is because we did put this following language constant for translated this `tweet`.

COM_EASYBLOG_SOCIALBUTTON_TWEET
·
Wednesday, 07 June 2017 18:40
·
0 Likes
·
0 Votes
·
0 Comments
·
No, our question is , why use FB scripts to generate FB buttons and don´t do the same with twitter, this causes a lot of problems, since one button is generated correctly ( FB ) and the other (TW) is generated incorrectly.

In resume:

FB Button: generated by FB scripts , work perfect and follow FB developers.
TW Button: generated by a custom work, works bad and doesn´t follow TW developers.
G+ Button: generated by Google Scripts, work perfect and follow G+ developers

The main question is WHY generate a button that causes a lot of problems because is not coded like TW recommends.

And like I, we can solve the problem by put the right code:

<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>


<a href="" class="twitter-share-button" data-url="<?php echo $url;?>&text=<?php echo urlencode($title);?>" data-text="<?php echo $title;?>" data-via="parameter">Tweet</a>
·
Wednesday, 07 June 2017 18:57
·
0 Likes
·
0 Votes
·
0 Comments
·
The reason why we remove that is because Tweet no longer support show count on their Tweet social button, so we changed it to use tweet share url from the social button.

Perhaps you can elaborate more details like what you mentioned which cause a lot of problem? It might help us to understand more about this Tweet social button.

Based on what i tested just now, it seems like it does the same function for me without load the tweet script on the page when i compare with your code.

For example : I updated a little bit my original source, pass in the @via parameter and updated the to share url.
[gist type="php"]
<div class="eb-social-button retweet">
<a href=" echo $url;?>&text=<?php echo urlencode($title);?>&via=<?php echo $via;?>"
target="_blank" alt ="Tweet <?php echo $title;?>" class="eb-share-twitter-btn">
<i class="fa fa-twitter"></i>
<span class="btn-text"><?php echo JText::_('COM_EASYBLOG_SOCIALBUTTON_TWEET');?></span>
</a>
</div>
[/gist]
·
Wednesday, 07 June 2017 19:50
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok, I understood why you did, for our clients we need to load the Twitter Script but since it´s is a client request it´s our problem.

Thanks for the help.
·
Thursday, 08 June 2017 16:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for understand, you can do the template override so it will not affected when you update to next release version of Easyblog in the future.

JoomlaFolder/templates/YourCurrentTemplate/html/com_easyblog/socialbuttons/external/twitter.php
·
Thursday, 08 June 2017 16:32
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post