It would be cool if the hooks could decide where the image of a site should be.
Curenntyl its quite broken, because once you set some settings in the admin ui
variable_get('tweet_image', $image_location)
Will return the variable from the database. So your module cannot decide where the image should be.
| Comment | File | Size | Author |
|---|---|---|---|
| tweet-image-fix.patch | 1.54 KB | dawehner |
Comments
Comment #1
dawehnerAdditional the text settings gets overriden, too.
In my original patch the text and the image building part was part of the hook implementation. I would suggest to do it this way.
Comment #2
icecreamyou commentedI believe in your original patch the text and image path were required in the hook, and I wanted them to be optional. However your patch in this issue does make the image path optional. I will probably tweak your patch a little but I do agree with the request you're making.
Comment #3
dawehnerJust to clear it out.
You can't define your own image/text in your hook_tweet_sites implementation. It always get overriden because variable_get returns not the default value, because you need to safe once at admin/settings/tweet.
Without your own custom image/text its senseless :)
Comment #4
icecreamyou commentedYeah, the intention was to build a default path for icons based on the service name, but obviously there was a mistake there.
Comment #5
icecreamyou commentedCommitted several changes which should also solve this issue. The "image_name" and "image_dir" keys were dropped from hook_tweet_sites() altogether, replaced by the "image" element which holds the relative path (including the image name).
Having the text formatted the same way is intentional.