WordPress / wordcamp.org

WordCamps are casual, locally-organized conferences covering everything related to WordPress.
https://wordcamp.org
132 stars 74 forks source link

Correct Twitter URL and hashtag in email to global sponsors #609

Open ghost opened 5 years ago

ghost commented 5 years ago

Imported from https://meta.trac.wordpress.org/ticket/4011 Created by @RMarks:

Reported in Slack: https://wordpress.slack.com/archives/C08M59V3P/p1545183587066200

The email that goes out to global sponsors to alert them of an upcoming camp has some problems with the way the information regarding the camps' Twitter accounts is displayed. Here's an example from the recent WordCamp Proldiv email: Their Twitter handle is https://twitter.com/https://twitter.com/WordCampPlovdiv and their hashtag is https://twitter.com/hashtag/#WCPLD Can we get the repetitive "https://twitter.com/" removed and the hashtag limited to just the hashtag in this case it would be #WCPLD

ghost commented 5 years ago

Comment by slackbot:

This ticket was mentioned in Slack in #meta-wordcamp by iandunn. View the logs.

ghost commented 5 years ago

Comment by @RMarks:

I'd like to make this change, but don't see the code for this in the meta repository. Can someone point me to where this code is located?

ghost commented 5 years ago

Comment by @iandunn:

It's the replace_placeholders() function in the Organizer Reminders plugin:

https://meta.trac.wordpress.org/browser/sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-organizer-reminders/wcor-mailer.php?rev=5513#L142

ghost commented 5 years ago

Comment by @RMarks:

ghost commented 5 years ago

Comment by @RMarks:

I've uploaded a screenshot of what I see in my local development environment. Could someone please send me the same for Plovdiv from the production enviroment? I believe the additional https://twitter.com/ parts are being stored along with the Twitter username.

For the hashtag, I believe the # was being added in the UI. https://twitter.com/hashtag/WCPLD is a valid URL.

In both of these cases, I think removing the URL and # when saving a WordCamp would be the better direction to go. Thoughts?

ghost commented 5 years ago

Comment by @iandunn:

production

ghost commented 5 years ago

Comment by @iandunn:

🤔

My instinct is to normalize them to be full/valid URLs and hashtags -- e.g., https://twitter.com/WordCampPlovdiv and #WCPLD -- since that feels like it's more intuitive/expected/"correct".

I don't hold that opinion very strongly, though; I can see the other side of it as well.

I'd be curious to see how those fields are being used across the codebase. That may be a factor in how practical one option would be over the other.

ghost commented 5 years ago

Comment by @RMarks:

I agree that they should be normalized. The mailer.php code mentioned in comment:3 is attempting to make both into URLs: https://twitter.com/WordCampPlovdiv https://twitter.com/hashtag/WCPLD

It may be useful to look at the production database and see what the previous usage has been. For the handle: Username alone, Username with the @ symbol, or URL to profile For the hashtag: Hashtag letters with or without the # symbol

ghost commented 4 years ago

Comment by slackbot:

This ticket was mentioned in Slack in #meta-wordcamp by coreymckrill. View the logs.