Advertisement:

Author Topic: SA Twitter Integration  (Read 125084 times)

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Twitter Integration
« Reply #60 on: November 21, 2011, 02:57:40 PM »
it needed tobe done
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline ~DS~

  • SMF Hero
  • ******
  • Posts: 2,599
  • Gender: Male
Re: SA Twitter Integration
« Reply #61 on: November 21, 2011, 03:34:15 PM »
Here's a view of what's coming in the next version. :)
“There is no god, and that’s the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Twitter Integration
« Reply #62 on: November 25, 2011, 04:08:03 AM »
0.4 relesed

chnaged to a different twitter php lib [fixes most of the Bugs]
fixed issue where it was calling twitter info on each page load now only does it when needed
added support for custom login url
added support for custom login img
now reqires oauth keys from twitter
now uses session url whn loggin in
updated twitter logs in admin to use creat list function
fixed errors with api call failing with try and catch functions to catch errors
added support for at anywere
now you can import twitter avatars
added allready registerd check
added support for last tweets at index
added supoort for reg agreement
added publisher
fixed issue showing redirect boards in bards list
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline awolexpat

  • Jr. Member
  • **
  • Posts: 129
Re: SA Twitter Integration
« Reply #63 on: November 25, 2011, 05:32:55 AM »
Hi SA,
Thanks for the update BUT I am getting a bunch of errors after installation (it installed no problems), as follows:

hxxp://www.awolonline.net/forum/index.php?http://www.awolonline.net/forum/
8: Undefined index: oauth_token
File: /home/xxxxx/public_html/forum/Sources/Twitter/TwitterHooks.php
Line: 442

hxxp://www.awolonline.net/forum/index.php?http://www.awolonline.net/forum/
8: Undefined index: twusername
File: /home/xxxxx/public_html/forum/Sources/Twitter/TwitterHooks.php
Line: 465

hxxp://www.awolonline.net/forum/index.php?http://www.awolonline.net/forum/
8: Undefined index: twuserid
File: /home/xxxx/public_html/forum/Sources/Twitter/TwitterHooks.php
Line: 467

hxxp://www.awolonline.net/forum/index.php?http://www.awolonline.net/forum/
8: Undefined index: twpic
File: /home/xxxxx/public_html/forum/Sources/Twitter/TwitterHooks.php
Line: 468

These errors are accumulating rapidly! Also if I try to access my forum as a guest it doesn't load properly. I uninstalled the old (last version) mod but didn't delete it and the uninstallation seemed also to have no problem. Any clues as to what is happening?

P.S I have just uninstalled it, but now (as a guest trying to open the forum on Google Chrome) I am getting the following error appearing:
Fatal error: Call to undefined function twit_init() in /home/awolonl1/public_html/forum/Sources/Load.php(2494) : eval()'d code on line 260

Would this be some stray code that hasn't been removed in either the old or new version of the mod?

P.P.S I have reinstalled the previous version and my forum is accessible again for guests; interestingly I was logged in as admin all the time and never had any issues (thankfully) so that might give you a clue to where the problem lies?
« Last Edit: November 25, 2011, 05:39:53 AM by awolexpat »

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Twitter Integration
« Reply #64 on: November 25, 2011, 06:13:11 AM »
hmm it shouldent be loads them vars on index have you got twit_init() decalred someware else

prob down to this
Call to undefined function twit_init() but it is an eval()' error can you disable template evalation

admin>server settings>Disable evaluation of templates then try a repopulate that error it should give more info this way

http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline awolexpat

  • Jr. Member
  • **
  • Posts: 129
Re: SA Twitter Integration
« Reply #65 on: November 28, 2011, 10:08:43 AM »
Sorry for the delay in replying. I have Simple Twitter installed, but that was installed with the previous version as well - I assume that might declare twit_init()? The eval error appeared not in the error log but at the top of the screen when the forum wouldn't load properly as a guest. I am loathe to reinstall the new version for fear it will break the forum completely, so I will wait to see if anyone else has similar problems I think. I have a suspicion that it is either a conflict (possibly with Simple Twitter) or there might be some code that is not being removed fully when I uninstall the old version. When i have time I will look at the parse and compare it to my files. My forum is heavily modded so there is every chance that something is conflicting though.

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Twitter Integration
« Reply #66 on: November 28, 2011, 01:36:59 PM »
twit_init has nothing todo wit the simple twitter mod you have a custom theme right?

did you do this to add the login button?
http://www.simplemachines.org/community/index.php?topic=446987.msg3153017#msg3153017

if so your need to remove that and use show_twitter_login() with the new version other wise using twit_init in the new version will give the errors above
« Last Edit: November 28, 2011, 01:42:59 PM by SA™ »
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline awolexpat

  • Jr. Member
  • **
  • Posts: 129
Re: SA Twitter Integration
« Reply #67 on: November 29, 2011, 10:38:02 PM »
Hi SA,
Thanks, that fixed the problem with the errors (after I also removed the same code from my portal block), and I have successfully added the Twitter button to my themes, but it does not show up on the default curve theme - can you tell me how to add it there? Also how can I make sure it goes below the Facebook button rather than alongside it on my themes?  I am sure others will also want a more detailed description of what how and where to put the code as well. Thanks for the mod and your help so far.

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Twitter Integration
« Reply #68 on: November 30, 2011, 01:49:21 AM »
for the default theme  index.template.php

Code: [Select]
echo '
<input type="hidden" name="hash_passwrd" value="" />
</form>';

add after
show_twitter_login();

to make them side by side wich needs to be done anyway cos it does look better ill have to play around with the code mmore later


http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline awolexpat

  • Jr. Member
  • **
  • Posts: 129
Re: SA Twitter Integration
« Reply #69 on: November 30, 2011, 02:12:49 AM »
Hi SA,
OK, did that but no button is showing, either side by side or below the Facebook one. That is on the forum home page (in my case a portal where i have also managed to add FB and Twitter buttons to the user block which do show) but also on the login and register pages for all my themes. Which file(s) do i need to edit to get it on the login and register pages, and again, what should I add and where?

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Twitter Integration
« Reply #70 on: December 01, 2011, 08:56:27 PM »
hmm make sure you have anbled the mod after updating cos it installs disabled as default this is the only reason i can think of why it dont show
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline awolexpat

  • Jr. Member
  • **
  • Posts: 129
Re: SA Twitter Integration
« Reply #71 on: December 01, 2011, 09:32:12 PM »
Hi SA,
Yes, I discovered that last night but didn't have a chance to come on here to update. I would still like to be able to put the Twitter button below the Facebook one on some themes though, so any hint how I can do that? Thanks for all your help by the way, and again for the mod.

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Twitter Integration
« Reply #72 on: December 01, 2011, 09:51:23 PM »
if you inserted the button manualy you need to add echo'<br />'; between the button coded like this

facebook code
echo'<br />';
twitter code

if it is the one that show when the mod is installled you need to

depending on what was installed first twitter or facebook

for twitter sources/twitter/twitterhooks.php

Code: [Select]
$buffer = preg_replace('~(' . preg_quote('<div class="info">'. $txt['guestnew']. '</div>') . ')~', '<a href="'.$url.'"><img src="'.$modSettings['tw_app_log_img'].'" alt="'.$txt['twittsign'].'"/></a><br /><div class="info">'. $txt['guestnew']. '</div>', $buffer);
replace with

Code: [Select]
$buffer = preg_replace('~(' . preg_quote('<div class="info">'. $txt['guestnew']. '</div>') . ')~', '<a href="'.$url.'"><img src="'.$modSettings['tw_app_log_img'].'" alt="'.$txt['twittsign'].'"/></a><br /><div class="info">'. $txt['guestnew']. '</div><br />', $buffer);
if that does not do it your need todo simualr to the sources/facebook/facebookhooks.php file
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline awolexpat

  • Jr. Member
  • **
  • Posts: 129
Re: SA Twitter Integration
« Reply #73 on: December 03, 2011, 12:18:57 AM »
Thanks SA, that's perfect.

Offline Dblog

  • Jr. Member
  • **
  • Posts: 153
  • Gender: Female
Re: SA Twitter Integration
« Reply #74 on: December 03, 2011, 07:30:54 AM »
thanks for the update
show_twitter_login();
works cool

Offline awolexpat

  • Jr. Member
  • **
  • Posts: 129
Re: SA Twitter Integration
« Reply #75 on: December 04, 2011, 12:03:10 AM »
Hi SA, me again  :-[
I'm getting some errors in my error log as follows:

http://www.awolonline.net/forum/index.php?action=register2
8: Undefined index: tw_enpub
File: /home/awolonl1/public_html/forum/Sources/Twitter/TwitterHooks.php
Line: 84

http://www.awolonline.net/forum/index.php?topic=827.0
8: Undefined index: tw_enpub
File: /home/awolonl1/public_html/forum/Sources/Twitter/TwitterHooks.php
Line: 133

The first one has appeared many times, the second one only once (so far). They are all from guests, not logged in members. Any ideas?

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Twitter Integration
« Reply #76 on: December 04, 2011, 03:29:15 AM »
enable then disable the publisher and they will go
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline Dblog

  • Jr. Member
  • **
  • Posts: 153
  • Gender: Female
Re: SA Twitter Integration
« Reply #77 on: December 05, 2011, 12:58:40 AM »
SMF package manager shows 0.3.3 and why doesnt it show version is old, when existing new version is 0.4

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Twitter Integration
« Reply #78 on: December 05, 2011, 01:30:57 AM »
package_info.xml says 0.4 so you must of got the old version
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline awolexpat

  • Jr. Member
  • **
  • Posts: 129
Re: SA Twitter Integration
« Reply #79 on: December 05, 2011, 02:41:39 AM »
Thanks SA, that worked.