26

Re: [beta release]PunBB Twitter

Khalid-S wrote:

rajuru.. thank you very much.
you are my second hero for this day tongue

so it is solved now? cool! very nice to know that!

so who is the first hero? wink

Re: [beta release]PunBB Twitter

De-Luxis

28

Re: [beta release]PunBB Twitter

Hi rajuru,

great extension! Can you please post an example for \pun_twitter\lang\English\pun_twitter.php or a readme-file? I don't know exactly, how to fill the following settings:

- Punbb twitter
- Update posts
- Update topics
- Short URL
- Skip forum
- Skip forum desc

And I just want to tweet new topics, no new posts... is it possible?

Thx a lot so far :-)

29

Re: [beta release]PunBB Twitter

Hello,
You don't need to change \pun_twitter\lang\English\pun_twitter.php. That is language file.

To update on topic post only, Uncheck Update Posts from Settings->Features->Pun Twitter section

There are short notes for you.

thanks

30

Re: [beta release]PunBB Twitter

rajuru wrote:

To update on topic post only, Uncheck Update Posts from Settings->Features->Pun Twitter section

Aaah, ok. Well, I just filled in all necessary settings but it doesn't work... Please take a look at the image. Curiously, there is some sourcecode under the form:

http://img40.imageshack.us/img40/1594/lalaa.jpg

31

Re: [beta release]PunBB Twitter

sorry for delay. I have just seen your PM.

Please try this:
http://forum.projanmo.com/extensions/pun_twitter.zip

let me know the update.

32

Re: [beta release]PunBB Twitter

Hi rajuru,

thanks for your support. Unfortunaly, it still doesn't work. What else can I do?!?

My best,
blinks

33

Re: [beta release]PunBB Twitter

Hello I am sorry to hear that it still didn't help you. however, if u want me to help u further please PM me punbb admin login and ftp login info.

i will check when get a moment.

regards

Re: [beta release]PunBB Twitter

Hi there!

I just want to begin by saying, I love this extension!

It's brought so much traffic and exposure to my boards, it's amazing.

However, I have one minor problem, I have deselected the 'to.ly' short URL option. This has successfully disabled the short URL for NEW THREADS, but has no effect on new posts IN THREADS.

Love your work.

Thanks mate.

35

Re: [beta release]PunBB Twitter

Stormeh wrote:

Hi there!

I just want to begin by saying, I love this extension!

It's brought so much traffic and exposure to my boards, it's amazing.

However, I have one minor problem, I have deselected the 'to.ly' short URL option. This has successfully disabled the short URL for NEW THREADS, but has no effect on new posts IN THREADS.

Love your work.

Thanks mate.

hello,
thanks for your compliments.

to.ly short url is not working fine for me (both topic/post) when I uncheck it. however, twitter now uses bit.ly now by default. Are you using the latest version?

anyone have any idea of extending this extensions? I will work on that if I like the idea wink.

Re: [beta release]PunBB Twitter

I'm using this one:
http://forum.projanmo.com/extensions/pun_twitter.zip

Here's two screen shots that may assist you?
http://img391.imageshack.us/img391/3617/twitter.png
http://img53.imageshack.us/img53/1126/twitter2.png

37

Re: [beta release]PunBB Twitter

Hello,
Thanks for posting the screen shot. It is apparent that when you uncheck the To.ly short url box, my extension is not shortening the URL. However, twitter itself now uses bit.ly to shorten url. Here nothing to do on our part. Again now idea why it is not shortened in 3rd link!

38 (edited by Bibby 2009-07-10 15:19)

Re: [beta release]PunBB Twitter

There's extra strings displayed in the setting page, is it right?
And it doesn't work (no tweet updated).

Version: 0.9

http://img301.imageshack.us/img301/8797/punbbtwitters.png

Re: [beta release]PunBB Twitter

Bibby wrote:

There's extra strings displayed in the setting page, is it right?
And it doesn't work (no tweet updated).

Version: 0.9

http://img301.imageshack.us/img301/8797/punbbtwitters.png

http://forum.projanmo.com/extensions/pun_twitter.zip

Try that link ^

40

Re: [beta release]PunBB Twitter

It works, thanks Stormeh. smile

41

Re: [beta release]PunBB Twitter

One more feature request: Is it possible to extract some content of new topic/reply into tweet?

Re: [beta release]PunBB Twitter

I'd love to see the addition of newly registered members as tweets, and have a link to the profile.

Re: [beta release]PunBB Twitter

I just saw the error "Post too long/not set", and the new topic wasn't posted to Twitter.  Presumably this is because the topic title made the whole thing longer than 140 characters.  Is it possible to automatically cut the title (with an elipsis - '...') where necessary to ensure that a twitter post will always be made?

44 (edited by rajuru 2009-10-19 10:34)

Re: [beta release]PunBB Twitter

Bibby wrote:

One more feature request: Is it possible to extract some content of new topic/reply into tweet?

hello,
i am sorry, i did not see your post earlier.

it is possible however no benefit bcoz twitter supports only 140 or 160 chars. so nothing understandible can be shown after showing the topic and URL. max length is too short to show some excepts.


Stormeh wrote:

I'd love to see the addition of newly registered members as tweets, and have a link to the profile.

initially i had wish to implement this. however, could not manage time for the same sad. busy with a lots of works. will do if get some moments. i have another cool ext idea too smile.

I just saw the error "Post too long/not set", and the new topic wasn't posted to Twitter.  Presumably this is because the topic title made the whole thing longer than 140 characters.  Is it possible to automatically cut the title (with an elipsis - '...') where necessary to ensure that a twitter post will always be made?

actually, i faced same in some topics too. so in my personal version of the script, i removed the length checking. i awarded the duties to twitter wink. twitter itself will removes additional texts. so if you want, you may try removing the length checking in script.

if your forum is not in english, you may face it frequently. you may replace strlen() to mb_strlen() that will reduce that ugly message smile.

Re: [beta release]PunBB Twitter

rajuru wrote:
Bibby wrote:

One more feature request: Is it possible to extract some content of new topic/reply into tweet?

hello,
i am sorry, i did not see your post earlier.

it is possible however no benefit bcoz twitter supports only 140 or 160 chars. so nothing understandible can be shown after showing the topic and URL. max length is too short to show some excepts.


Stormeh wrote:

I'd love to see the addition of newly registered members as tweets, and have a link to the profile.

initially i had wish to implement this. however, could not manage time for the same sad. busy with a lots of works. will do if get some moments. i have another cool ext idea too smile.

I just saw the error "Post too long/not set", and the new topic wasn't posted to Twitter.  Presumably this is because the topic title made the whole thing longer than 140 characters.  Is it possible to automatically cut the title (with an elipsis - '...') where necessary to ensure that a twitter post will always be made?

actually, i faced same in some topics too. so in my personal version of the script, i removed the length checking. i awarded the duties to twitter wink. twitter itself will removes additional texts. so if you want, you may try removing the length checking in script.

if your forum is not in english, you may face it frequently. you may replace strlen() to mb_strlen() that will reduce that ugly message smile.

Rajuru - any thoughts on my problem? (one post above yours)

"I just saw the error "Post too long/not set", and the new topic wasn't posted to Twitter.  Presumably this is because the topic title made the whole thing longer than 140 characters.  Is it possible to automatically cut the title (with an elipsis - '...') where necessary to ensure that a twitter post will always be made?"

46

Re: [beta release]PunBB Twitter

melat0nin wrote:

Rajuru - any thoughts on my problem? (one post above yours)

you have already quoted my answer smile.

Re: [beta release]PunBB Twitter

rajuru wrote:
melat0nin wrote:

Rajuru - any thoughts on my problem? (one post above yours)

you have already quoted my answer smile.

Ah yes, I didn't see your edit before I replied!

I am using the version of the extension from here: http://forum.projanmo.com/extensions/pun_twitter.zip (because the other one didn't work).

In manifest.xml I see the following code (it is the only place where mb_strlen()/strlen() are used:

        <hook id="co_common"><![CDATA[
            $pun_extensions_used = array_merge(isset($pun_extensions_used) ? $pun_extensions_used : array(), array($ext_info['id']));
            function ShortenURL($url) {
              $ch = curl_init();
              curl_setopt($ch, CURLOPT_URL, "http://to.ly/api.php?longurl=".urlencode($url));
              curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
              curl_setopt($ch, CURLOPT_HEADER, 0);
              curl_setopt($ch, CURLOPT_FAILONERROR, 1);
              curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
              $shorturl = curl_exec ($ch);
              curl_close ($ch);
              return $shorturl;
            }
            
            function TextLength($str){
                if(function_exists('mb_strlen')){
                /* Set internal character encoding to UTF-8 */
                    mb_internal_encoding('UTF-8');
                    return mb_strlen($str);
                } else {
                    return strlen($str);
                }
            }
            
            function hashtag($str,$tags=''){
            
            }

            
        ]]></hook>

It looks like mb_strlen() is already used (if available).  What do you think?

48 (edited by rajuru 2009-10-19 10:58)

Re: [beta release]PunBB Twitter

please open twitter.class.php

you will get a line like:

if(!empty($Status) && TextLength($Status) <= $this->MaxLength){

replace with:

if(!empty($Status)){

49 (edited by melat0nin 2009-10-19 11:39)

Re: [beta release]PunBB Twitter

rajuru wrote:

please open twitter.class.php

you will get a line like:

if(!empty($Status) && TextLength($Status) <= $this->MaxLength){

replace with:

if(!empty($Status)){

Thanks rajuru.

I tried it with the same topic as before.  I don't see the error message now, but neither is the post submitted to twitter sad You can see the relevant post here: http://www.noisyneighbours.net/forum/to … and-cheap/

Any thoughts?

EDIT: it's fixed if I enable the to.ly URL shortening (Twitter seems to reject a Tweet with >160 chars, even if it would be smaller *after* the URL is shortened.  If the URL is shortened before sending the Tweet, it accepts it.

But I've also noticed that the To.ly URL uses the filename scheme (viewtopic.php?51 or similar). Would it be possible to use the URL rewritten address, for better traffic generation (links from twitter will include the topic title in the URL)?

Thanks for your great work, this is a brilliant extension!

50

Re: [beta release]PunBB Twitter

so in your case, twitter rejecting messages > 160 chars?  i don't remember if it was same in my case! sad

does punbb provides any function that returns permalink for any given post/topic? i am not familiar with punbb permalink stuffs!