Closed (duplicate)
Project:
Twitter
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Jun 2011 at 13:20 UTC
Updated:
4 Jul 2011 at 19:59 UTC
Hello.
We have such situation. There is CCK field url in our news nodes. And we want make post this info to twitter by another way.
For example we want put tihs url field into twitter post instead of url of node.
But there is not possible make some themization around twitter post body. In our case it's not good i have write own patch to module
Comments
Comment #1
Stan.Ezersky commented+1
Comment #2
michaek commentedI don't think theming would be the right approach to customize Twitter messages - it's more appropriate to use tokens: see #871728: twitter_actions token support missing
Comment #3
ilya1st commentedIn our case we must to substitute URL placed in to CCK field of node.
I think here must present both token and theming possibilities.
(in my advimage module I did so for formats templates for some custom cases)
Comment #4
Aleksey Zubko commentedsubscribe
Comment #5
michaek commentedThe use case you're describing, including a CCK field value in the message, would be very straightforward with a Token implementation, and I can't think of a reason that the theme layer should be involved.
Can you describe why the theme layer would be the appropriate place to change the content of a Twitter message?
I'll leave this active for now, but absent any compelling reason, I'm pretty sure providing theme hooks is not the direction the module will go. On the other hand, Token support will be restored to the module as soon as I test the patch in #871728: twitter_actions token support missing.
Comment #6
ilya1st commentedAFAIK token does not allow such things.
E.g. in out project we have node type "news" with CCK field URL.
After editor changes something on site(e.g. he've changed some chapter or updated article) he write news node with url to node which has beed changed. Ater that we need twitter post with this news node text and short url from it's cck key. So there must be additional function to allow manual theming both with tokens theming.
My idea is default theme function with defines default behaviour
Wherte twitter_repost_test_standard_text does standard operations with tokens.
Doing such way we give some freedom to programmer - use tokens there or theme content manually.
Or we need additional hook there.
In my advimage module, it's advimage_ref extension I did so for filter formatting output. I think, sometimes token replacements are not enough.
Comment #7
michaek commentedIt seems to me that when you say "theming", you mean "customizing" more broadly, which could lead to some confusion.
Part of my concern here is philosophical. Because posting a Twitter message is part of the function of the site, the theme layer shouldn't be involved, as its responsibility is the _display_ of the site. A module hook for rewriting Twitter messages may be useful, but I can't see any reason to support a theme hook.
When this patch is adopted, Twitter messages will be able to accept placeholders for all tokens, which will include CCK fields. What you seem to be looking for is a way to specify different default message strings for different node types. That seems both simpler and more likely to address more common use cases.
Comment #8
ilya1st commentedif token can do this(I have no knowledge about token module internals yet) - I have no questions anymore. Thanks.
Comment #9
michaek commentedThanks for the update. I'll do my best to get the token patch applied soon, but it seems like it might still be a good idea to have customizable Twitter messages per content type in the future.
Comment #10
Dxxxs commented+1
Comment #11
glu2006 commented+1 subscrybe
Comment #12
michaek commentedHi, folks. This is a closed issue, so it's probably not much good to subscribe to it. :)