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.

CommentFileSizeAuthor
tweet-image-fix.patch1.54 KBdawehner

Comments

dawehner’s picture

Status: Needs review » Needs work

Additional 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.

icecreamyou’s picture

Category: bug » feature

I 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.

dawehner’s picture

Just 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 :)

icecreamyou’s picture

Yeah, the intention was to build a default path for icons based on the service name, but obviously there was a mistake there.

icecreamyou’s picture

Status: Needs work » Fixed

Committed 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.