CVS edit link for -stager-

I've developed a module which allow to create hashtags (Twitter tags) for nodes and want to add it on drupal.org.
CommentFileSizeAuthor
#6 hashtags_v2.zip3.13 KBradamiel
#3 hashtag.jpeg10.67 KBradamiel
#1 hashtags.zip3.06 KBradamiel

Comments

radamiel’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new3.06 KB
avpaderno’s picture

Status: Needs review » Needs work
Issue tags: +Module review

Hello, and thank you for applying for a CVS account.

As per requirements, the motivation message should include more than two sentences used to describe the module features, and a comparison with the existing solutions.

radamiel’s picture

Status: Needs work » Needs review
StatusFileSize
new10.67 KB

Hashtags module provides alternative way of adding tags to node.

To add a tag in a such way you need to put the 'hash' or 'pound' symbol (#) preceding the any word in Body field when you add or edit a node.

Module works with standard taxonomy module. After activating module a new vocabulary is created and all tags, which added through body field will be the terms of this vocabulary.

This module works same way if user would add tags manually through the autocomplete textfield.

Also when someone views a node all hashtags words will be replaced to links on concreate terms.

This way of adding tags uses in Twitter.

See attached picture to understand how it looks like.

cleaver’s picture

I took a quick look at the module. A few things that would be good to clear up:

1. Why do you not add $vid as a parameter to db_query as you did with $nid?

<?php
  $vid = variable_get('hashtags_vocabulary', '');
  $sql = "SELECT td.name, td.tid FROM {term_data} td 
  INNER JOIN {term_node} tn ON td.tid = tn.tid 
  WHERE tn.nid = %d AND td.vid = $vid";  
  $result = db_query($sql, $nid);
?>

2. Your install script attempts to install the schema for your module, but there is no implementation of hook_schema(). In fact, it doesn't look like there is any table at all.

<?php
/**
* hook_install().
*/
function hashtags_install() {
  drupal_install_schema('hashtags');
}
?>

3. Finally, more as a suggestion, it would be nice to have some facility to theme the links, or at a minimum add a css class. That shouldn't stand in the way of approving your account, though.

avpaderno’s picture

Status: Needs review » Needs work

SQL queries should use placeholders whenever the parameter is taken from a PHP variable (or from any dynamic values).

radamiel’s picture

Component: Miscellaneous » miscellaneous
Status: Needs work » Needs review
StatusFileSize
new3.13 KB

Thanks for replies. What have been fixed in a new version:
* SQL queries used placeholders for all parameters (hashtags.module - 83 str);
* added uninstall functionality (hashtags.install - 27 str);
* removed hook_install (hashtags.install);
* added css class for all hashtag links; (hashtags.module - 99 str);

cleaver’s picture

Looks like you've taken care of all of the points I've raised and the uninstall make sense.

I think you've met the guidelines for contrib access.

Let's see if kiamlaluno has any suggestions...

avpaderno’s picture

Status: Needs review » Fixed

If the code has been changed, then it's all fine for me.

screenn’s picture

I think it's a very useful module, I'll use that. I was bored to add all the words to my cloud of tags by hands, and think will be better just to hash my words in body field.

Status: Fixed » Closed (fixed)
Issue tags: -Module review

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

avpaderno’s picture

Assigned: Unassigned » avpaderno
Issue summary: View changes
Status: Closed (fixed) » Fixed

Thank you for your contribution! I am going to update your account.

These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

I thank all the dedicated reviewers as well.

avpaderno’s picture

Component: miscellaneous » new project application

I am giving credits to the users who actively participated in this issue.

Status: Fixed » Closed (fixed)

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