Hello,
I found a WP plugin that automatically links twitter user names like @name in blog posts and/or comments to the user's twitter profile at twitter.com/name. Is something like that possible in s9y? The twitter plugin is not able to do this.
A second thing is link a commenter's name with his twitter profile, if it can be found via email address. I saw this in another blog, with an option box to switch linking to twitter on or off. The link was realized by a twitter icon behind the name. How can this be done in s9y?
Link twitter user names
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Link twitter user names
Hi!
I believe you could easily do that with the "Regular Expressions" event plugin (serendipity_event_regexpmarkup). You can store a file "twitter.php" inside the plugins/serendipity_event_regexpmarkup/ directory that should look like:
(I've now also committed that file to the plugin, should be available shortly in spartacus)
Regards,
Garvin
I believe you could easily do that with the "Regular Expressions" event plugin (serendipity_event_regexpmarkup). You can store a file "twitter.php" inside the plugins/serendipity_event_regexpmarkup/ directory that should look like:
Code: Select all
<?php
$regexpArray = array(
'SearchArray' => array("/@([\w]+)/i"),
'ReplaceArray'=> array('<a href="http://www.twitter.com/\1">\1</a>')
);
Is that really done by email address? I think it would then require a Twitter API lookup, that could be harder to implement... Maybe we can push Grisha on this?A second thing is link a commenter's name with his twitter profile, if it can be found via email address. I saw this in another blog, with an option box to switch linking to twitter on or off. The link was realized by a twitter icon behind the name. How can this be done in s9y?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Link twitter user names
Hey, thanks! I'll try it with that plugin, it looks simple.
For the second question: The text box label was about "Email-Adresse zum Twitter-Profil verlinken" ("Link email address to twitter profile") The blog where I found this is styled with a new theme, in which that feature isn't implemented anymore.
For the second question: The text box label was about "Email-Adresse zum Twitter-Profil verlinken" ("Link email address to twitter profile") The blog where I found this is styled with a new theme, in which that feature isn't implemented anymore.
-
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
Re: Link twitter user names
hmm.. I have to look, if I can manipulate this link. Seems to be a nice idea, to link the name with a twitter acc. If this is possible for a plugin, the microblogging plugin seems to be the right place for it.
I will have a look into that.
I will have a look into that.
-
- Regular
- Posts: 1531
- Joined: Tue Mar 07, 2006 11:25 pm
- Location: Berlin, Germany
- Contact:
Re: Link twitter user names
hm, this new regex interferes with a private plugin of mine (serendipity_event_email_bot_OBFUSCATOR) witch makes mail-adresses clickable and have the possibility to obfuscate them with various methods. (in the moment I cannot publish it, because I am unsure about the licence).garvinhicking wrote:You can store a file "twitter.php" inside the plugins/serendipity_event_regexpmarkup/ directory that should look like:
(I've now also committed that file to the plugin, should be available shortly in spartacus)
But what this post is about:
in the moment I have deleted the twitter.php, but the next plugin-update it will be there again.
Would it be a good idea to have a option in the egexpmarkup-plugin to enable/disable the xxx.php-Files in the plugin directory?
Ciao, Stephan