Posted by rajarju on June 21, 2010 at 9:43am
Hey Guys,
I was working on a small Drupal Module called select link lately,
I would like you guys to have a look at it..
http://bitbucket.org/naughty_david/select-link
You can also get a demo here
http://nd33.neolivz.in/selectlink
Cheers
Aj
Comments
good stuff
Quickly browsed through the php only, didn't find any obvious issues. What if you allow whoever writes the posts to tag and underline a word/name so that the selectlink box appears on click. It could also allow changing of the query string - so you can tag 'module' but have the query search for 'drupal+module'. What do you think? May make a pretty nifty module for posts that use a lot of big/technical words!
yeah gibbet. i was thinking
yeah gibbet. i was thinking of auto taging terms based on taxonomy terms and forward users to glossary page.
we can also allow users to tag terms by wrapping it in a tag. which i can identify...
adding + in the query string can be added as an option.. where admin can select how he wants it to be :)
Thanks for testing it..
if u want you can mod it and push the code to bitbucket..
again Thanks a lot :)
rajarju
No problem
Yea sounds good, having that drop box appear for any text that is selected feels like over kill.
Also, since you are implementing a search on site - is there a way to refresh the search index or run cron when the node is submitted? Otherwise the term selected won't pull the original article (or other recent articles) until your sites cron runs.
I'd rather not mod it as I dont have time or js experience!
I've seen that the glossary
I've seen that the glossary module can do this pretty well. (http://drupal.org/project/glossary). I think raj's selectlink module can be a utility module that gives users quick access to search terms on the website. or use this as quick links to directly tweet the selected phrase ... etc
I think a module that tweets
I think a module that tweets (or posts to blog/fb) a 'summary' of a post would be cool. But it should probably be a separate module as this one is for the user to quickly find out what terms refer to... And you can get pretty close to this using AddThis and some meta tags...
Most of these things can be
Most of these things can be done with other contrib module but require significant user input and several page loads. What we can do with this module is we build it to act as a quick access interface. Say i've installed modules that allow me to tweet a phrase or create facebook statuses (http://drupal.org/project/facebook_status) for users on the site, selectlink can 'link' with these modules and provide instant access. how?
Picture this. im on the site reading something and i find an interesting quote. i highlight the text and a menu popups with multiple things i can do with this text. i can update my status, use this text in a comment, create an article with this text on my blog, or search for this text. There are so many things we can use this module with but we need to keep the concept of 'select and link' or otherwise we might be duplicating functionalities already provided by other contrib.
let me have your two cents on this.
Well I guess what I am
Well I guess what I am looking at is more general, your use case is very specific - i.e for microblogs who's posts are small enough to fit into fb/twitter posts (approx 150 char limit) ... Further, most blogs aren't written in the style a person would want to post. The first 150 characters of an interesting article on Apple's development policies would not make a great twitter/fb update but a good summary or quote from within the article would... More than having an API i think what would be cool is just a filter of some sort so when we post an article like 'Apple vs. OpenSource' we can have different parts of the post or the summary itself as a possible post to twitter/fb/google. Something like the following could be in a post and stripped and replaced using a filter:
[selectlink|Display='Text to show User', 'Text to post to Service', array/list of services]
This would make the module very flexible. Some links can be just for search engines while others just for fb/twitter. This would not be like other modules as it can be used in such a way that different parts of an article become different fb/twitter posts rather than the article itself. I'm not sure if this approach will be compatible with facebook though as the method I currently use needs custom meta tags to be placed in the page header....
I have an issue with posting
I have an issue with posting on selection, though its cool... 90% of an article will not need it... Whats your take on this? It may be easier for users to click on a cool line or quote from an article and see the popup than 'select' the lines he wants and see the popup. And what if he selects more words than allowed?
I see what you mean. i think
I see what you mean. i think modules like addthis, sharethis or servicelinks do this. i mean they function like this : provides links to share / quote / blog content but here we want to give the end user flexibilty. not on the content creation side but rather to the one viewing the content. we want users to be able to select any text on the website and do something with it.
as for the maximum words allowed, this can be inifinite.
Those modules all add a
Those modules all add a single share button or service links per article/page. What I'm looking at is like Tool tips (http://drupal.org/project/tooltips) with the added benefit of posting/searching for whatever quote/statement has been used in the filter. Either way, I see what the direction you guys are looking. And when I say maximum words, I am referring to limits set by fb and twitter - of course there is no word/character limit if you are posting to your own blog...
actually reading what you
actually reading what you said again, I think we are actually on the same wavelength haha...
This is a neat idea. But i
This is a neat idea. But i dont think it would fit into this module.
Cos the most important thing about the module is the ability to select text. There are a lot of other modules who can do posting and sharing and add tool tips to taxonomy terms.
rajarju
ahh i see... so there is a
ahh i see... so there is a module that adds tool tips that can be used as posts/searches? which?
iv come accross a couple of
iv come accross a couple of them..
http://nanwich.com/
http://www.valueofbiotech.com/biotech-basics/glossary
these adds titles to text
rajarju
looked at both of them but
looked at both of them but neither post the link you click to fb/google/twitter... What i think would be great is if we can post/search for any quote/words within an article. But I think control should be down to the person who posts it and credit should be given. Example: "lets post blah blah blah but not bleh bleh bleh", roll over 'blah blah blah' and you should see a 'Post to fb, twitter..etc' tooltip click 'blah blah blah', choose fb, then your fb status should update to 'gibbet blah blah blah via groups.drupal.org'
Either way, your approach will have everything we need to port it to other approaches quite easily.
so you want to give control
so you want to give control to the content creator so that he/she can choose whether to allow selectlink on a piece of content or not. i like this idea +1. but what's the best way of doing this? we can use a filter but people would want plugins for their editor (button on tinymce for eg) too. and i think we need to find use cases for this.
The select and search feature
The select and search feature is something new. I dont know if most users are familiar with this.
Also allowing Users who post content to decide if their quotes can be reposted on FB or twitter seems to be a complex use case. Atlest for a normal user.
But we can put this to another use. A user who adds content can deside if a particula technical term or quote can be linked to SELECTLINK so that readers can get an explanation on that by searching for it. This idea was already shared with respect to an LMS
rajarju
I think we are talking about
I think we are talking about the same thing. The user who adds the content decides what should be linked/searched/posted... I'm not sure which is the better approach though, the current select and post is obviously easier to implement. I'll look into it more when I get some time... Good work on the module though, cool idea!
Oh boy.. this is going some
Oh boy.. this is going some wer :)
Wad i see is the possibility of building a SELECTLINK API which can again be used for many features.
@Arshad.. Uv made one hell of a jq Plugin :P
And guy pour in more ideas.. I think we can restructure it as we keep gettin more inputs!
rajarju
SELECTLINK API These are the
These are the exact words. ok we need a plan and a team on this.