1. I'm running drupal at a path other than the root path -> http://[name].[tld]/drupal
I'm using aliases for content -> http://[name].[tld]/drupal/content/[title-raw]
The Tweet URL that is generated resolves to http://[name].[tld]/drupal/drupal/content/[title-raw]
As you can see, /drupal/ is doubled up.
code in question appears to be:
$q = $base_url . base_path() . $alias;

My temporary fix (not sure this is the best solution) was to change code to:

        // global $base_url; @ line 94
       global $base_url, $base_path, $base_root;
...
        // $q = $base_url . base_path() . $alias; @ line 96
        $q = $base_root . $base_path . $alias; 

2. Not a bug but a tweak.
Instead of using the twitter image:
btw, code as is, you need to wrap the alt in quotes.

  // @ line 119
$image = '<img src="http://assets1.twitter.com/images/favicon.ico" alt='. $text .' />';

I've changed it to:

 $image = '/images/twitter.png';
$image = '<img src="'. $base_url . '/' . drupal_get_path('module', 'tweet') . $image .'" alt="'. $text .'" />';

where I've added the images subdirectory to the tweet module folder. (you can then use whatever image you save there)

3. might be an idea to add title="[title]" rel="nofollow" to the $attributes array @ line 157 (personal preference or recommended?) "nofollow" -> spiders don't have Twitter accounts AFAIK :)

Comments

icecreamyou’s picture

Status: Active » Needs review

@1 and 2: will fix.

@3: I'll add rel="nofollow" and I'll add a title if only the image is displayed.

I don't know when I'll have time to commit this but probably this weekend at the latest. Thanks.

icecreamyou’s picture

Assigned: Unassigned » icecreamyou
Status: Needs review » Fixed

In my local copy, I have:

Fixed #1 as suggested.
Added quotes around alt tag per #2.
Added an option on the settings page to specify a different (local) location of the image (and added the image to the repository).
Added a title tag to the image in each instance.
Added rel="nofollow" to every Twitter link.

These changes will be in the next release.

Status: Fixed » Closed (fixed)

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