Jump to content


Photo

[Resolved]Snippet conversion advice needed


  • This topic is locked This topic is locked
8 replies to this topic

#1 petewalker

petewalker

    Etomite Forum Newbie

  • Member
  • 22 posts

Posted 14 May 2009 - 02:26 AM

Hey guys - I found a snippet on the 'fork' site that I would love to use. After reading the syntax, I'm a bit..ummm, aware that it's propbably way over my head. There are several lines of code that I can see would need to be changed for the eto api.. wondering if someone could take a look at it for me maybe?... The snippet is a twitter posting thingy, so I really like the idea... I hope I'm not creating dramas between the 'fork' and the eto community by uploading the snipet here, - I have renamed the txt file slightly, BUT have NOT modified the code in ANY way, so the author and 'fork' names remain in tact.. Hoing that will surfice...
<download removed>
I would like to rename the snippet to "tweetweet" (lol, i know, im an oddball), and obviously retain ALL mentions of the original author.

#2 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,786 posts

Posted 14 May 2009 - 09:01 AM

All the snippet does it create an url that a user clicks so they can "tweet" it...

#3 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,786 posts

Posted 14 May 2009 - 09:06 AM

Edit: Snippet Uploaded showtopic=8449

#4 petewalker

petewalker

    Etomite Forum Newbie

  • Member
  • 22 posts

Posted 14 May 2009 - 09:17 AM

Thanks Dean - I replaced all the "returns" with $output .= .... and it fell on it's bum hard... I don't like the way it outputs the message to twitter, but that's just a matter of text formatting really. I realise the snippet isnt overy exciting, but it could be handy... cheers.

#5 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,786 posts

Posted 14 May 2009 - 09:23 AM

the returns are fine... it's the $-> bits that the parser doesn't know how to handle, so changing them to $etomite->
and removing the fork-specific functions and converting them to something else too ;)

you'll notice that I changed a bit near the top that previously wrote to the log file of a fork install... this version just outputs an error and quits (it's only if you pass $id in the snippet call and it isn't numeric).

I did test it, but not really knowing PHP I may have missed something...

#6 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,786 posts

Posted 14 May 2009 - 09:36 AM

I've uploaded the snippet to the snippet library.

#7 petewalker

petewalker

    Etomite Forum Newbie

  • Member
  • 22 posts

Posted 14 May 2009 - 09:37 AM

Yea, I got the moX bits.. made sense.. lol. and I did notice the chenges u made, very clearly. Ive just been testing various eto doc variations for the output, and it all works well.. also HAD to make it open in anew tab (i HATE pages loading over my site.. lol) ... wont use on acadd, but im sure i have future uses for it. thanks again Dean :)

#8 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,786 posts

Posted 14 May 2009 - 09:40 AM

no prob..

but im sure i have future uses for it

yeah, same here! I've already had an idea...

#9 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,786 posts

Posted 14 May 2009 - 09:40 AM

Support Issue Resolved!

The issue this topic was opened for has been resolved, and we look forward to helping you in the future. If you need further assistance, please open a new topic.

This topic will now be marked as Resolved. If you are satisfied with the support provided here at Etomite (or just appreciate the service we provide), you may want to make a donation to help cover forum and server costs in order to help this quality support continue. If you wish to donate, click Here




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users