Is the functionality of this module replaced by something else in drupal7? Or does it still need to be ported to drupal7?

Though I don't use this module myself, I think it would be useful and am wondering if there are plans on supporting stable drupal.

Comments

rorymadden’s picture

Title: drupal7 support/release » drupal7 support/release of mentions

sub

avolve’s picture

I was looking for such functionality for a forum site. Any updates on porting to D7 or an alternative solution?

capnjav’s picture

I too would be very interested in a drupal 7 port.

BenK’s picture

Subscribing

capnjav’s picture

Just a quick update, I've begun work on porting Mentions to 7.x.

Thus far I have the module functioning in Drupal 7.7, with the Token functionality removed. At least for nodes. I have yet to check comments, and FBSS (waiting for the drupal 7 port of FBSS). AND No views as of yet.

Things to do:
- Ensure Mentions is functioning with comments (if not fix)
- Test Mentions is functioning with FBSS 7.x-3.x when released (if not fix)
- Add views (as seen in Mentions 6.x-1.x-dev)
- Add Token functionality

capnjav’s picture

StatusFileSize
new20.9 KB

Forgot to include the file.

halloffame’s picture

Subscribe.

deciphered’s picture

Hi guys,

I'm in the process of rebuilding my dev environment at the moment, so I'm partially out of commission, but as soon as I am back on track I will give this a look over and give my thoughts.

One thing to point you in the right direction straight away though, I will want this written in a modular approach, as per all my recent development, so I recommend looking at the D7 version of Mobile Codes or SexyBookmarks for my code style and some useful snippets.

Cheers,
Deciphered.

deciphered’s picture

I've created a github.com repo for the 7.x-1.x branch, I'd appreciate if anyone interested in development on this branch could fork the repo and send pull requests when wishing to merge back into the primary branch, this will allow me to keep an eye on development, and once I'm satisfied I will be happy to hand over the primary development if necessary.

The repo can be found at https://github.com/Decipher/mentions

Cheers,
Deciphered.

capnjav’s picture

Thanks for the feedback @Deciphered, I will be creating a fork tonight/tomorrow to continue progress. I will most definitely have a look at Mobile Codes and SexyBookmarks for code style/snipplets in a modular approach. I had been looking closely at some of the other filter modules that have 7.x versions to get insight as well. And of course http://drupal.org/update/modules/6/7 has been extremely useful!

infines’s picture

Any update on this?

deciphered’s picture

Unfortunately I can't guarantee any time to development or even mentoring development to this module anymore, I wrote it with the hopes of getting it implemented in some form on D.o, but as there's no support for such functionality and as I've not needed the module for any of my own sites I just don't have time for the module.

I'm more than happy just to hand the rains over to someone and see where it goes, with the caveat that if I ever do need the module for a clients site that I would come back on as a developer.

If anyone wants to put there hand up, either respond here or shoot me an email via my D.o. contact form, or in a perfect world, mention me and I'd get notified via my D.o. mentions pane :)

Cheers,
Deciphered.

walker2238’s picture

Any updates on this?

deciphered’s picture

No one has stepped up as of yet.

rickharington’s picture

Hi Deciphered

I used your http://drupal.org/node/1175916#comment-4800240 dev module and everything seems to be fine. I just cannot remove the [] tags. Any ideas how to do this. As input suffix is required.

rickharington’s picture

Edit Sorry, the views integration doesn't work.

deciphered’s picture

besnikt,

I can't speak for that version as I've had no involvement in it, there is however a version in the works by one of my colleagues, but paid work has pushed it to the side for the moment.

Will provide more information as soon as it's available.

rickharington’s picture

Hi Deciphered

Thanks that would be awesome. I think this module should in fact be in D.c cause it just makes communication so much easier.

adamtong’s picture

Category: task » bug

After install the dev 7, i cannot delete node. When I delete node, it has the following error:

Recoverable fatal error: Argument 2 passed to db_query() must be an array, string given, called in /mydrupal/sites/all/modules/mentions/mentions.module on line 180 and defined in db_query() (line 2313 of mydrupal/includes/database/database.inc).

Thank you very much.

deciphered’s picture

Category: bug » task

@adamtong,

There is no 7 dev version, the zip in this issue is an attempt from a community member (which is perfectly acceptable) but it's not what will be committed as there is a (currently on temporary hiatus) somewhat official D7 port underway. I will attempt to get the maintainer to provide his code ASAP so that there is at least something for people to test.

realityloop’s picture

Status: Active » Needs work
StatusFileSize
new36.87 KB

Patch of current work

deciphered’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

Updated version of this patch has been committed, 7.x-1.x-dev should be built shortly.

Leaving open until 1.0 release is ready.

infines’s picture

how about releasing a dev version so we can attract more testers?

deciphered’s picture

@gridbitlabs... please read last comment

7.x-1.x-dev should be built shortly.

I can't control when the dev release comes up, that's up to Drupal.org, but it's usually once every 12 hours.

mgifford’s picture

Issue summary: View changes

It's been over a year. There are a number of known bugs, but #2064103: Warning: Invalid argument supplied for foreach() in mentions_entity_insert() is the only one that is RTBC.

yanniboi’s picture

Status: Needs work » Needs review
StatusFileSize
new15.15 KB

Hey guys!

First of all great module, and I totally understand how stuff can get left behind when life/work gets busy, so I decided to fix things up a but for Drupal 7. The following is rather a big patch, but so far I have tested it and it works with views integration for comments.

I installed the 7.x-1.x-dev version this morning and found that while it was adding mentions to the database, views integration was totally shot. I fixed this, but it is not backwards compatible for drupal 6.

Also, I haven't tested the rules integration yet...

yanniboi’s picture

Patch Summary

  • I have added a new field handler for author based on the drupal user name field handler
  • I have changed the module to use the schema tables columns uid and auid rather than user and author
  • I have updated the field handlers for mentions title, content and link (application to follow...)
  • I have changed the views field 'timestamp' to look at the created column of the database table

Custom module

I have written a custom module for comment integration for views.

Something along the lines of this:

<?php

/**
 * Pre render hook for mentions content field.
 */
function mentions_MYMODULE_views_handler_field_content_fields($class) {
  $class->additional_fields['entity_id'] = 'entity_id';
}

/**
 * Pre render hook for mentions link field.
 */
function mentions_MYMODULE_views_handler_field_link_fields($class) {
  $class->additional_fields['entity_id'] = 'entity_id';
}


/**
 * Creates mention title for Comments
 */
function mentions_comment_views_handler_field_title($class, $values) {
  return 'You were mentioned in a comment';
}

/**
 * Creates mention link for Comments
 */
function mentions_comment_views_handler_field_link($class, $values, &$link) {
  $link['url'] = 'comment/' . $values->mentions_entity_id; 
  $link['options']['fragment'] = 'comment-' . $values->mentions_entity_id;
}

/**
 * Creates mention content for Comments
 */
function mentions_comment_views_handler_field_content($class, $values) {
  $comment = entity_load_single('comment', $values->mentions_entity_id);
  return $comment->comment_body['und'][0]['safe_value'];
}


?>
mgifford’s picture

I tried to apply this patch to SimplyTest.me and got "Error message - An error occurred while patching the project."

Was this built against the git repo or the dev release?

yanniboi’s picture

Status: Needs review » Needs work

Ahh, good point, I think it was the dev release. I will have a look what was added in the git repo...

yanniboi’s picture

Status: Needs work » Needs review
StatusFileSize
new13.69 KB

Wow! rookie error! I made a patch based on my dev sites webroot rather than on the git repo of the module :P

Here is the new one.

mgifford’s picture

Ok, that allows me to get to here http://s44bc979c31af5cd.s3.simplytest.me/admin/config/content/mentions

Much better. Afterwards though, not sure how to get to this:

"Once installed, the Mentions filter needs to be enabled on your desired Input formats, this can be done via the Input formats page.

http://[www.yoursite.com/path/to/drupal]/admin/settings/filters/[id]/configure"

yanniboi’s picture

StatusFileSize
new16.61 KB

Ahhh that a d6 link I think... In d7 its: www.yoursite.com/admin/config/content/formats.

Pick the format you want to enable and there is a checkbox for 'Mentions filter':

mgifford’s picture

yanniboi’s picture

It does now. You need to put the whole thing in square brackets by default (which you can change on the config page).

To mention the admin user you need to write [@admin] or [@#1]

mgifford’s picture

Ahh, thanks!

mgifford’s picture

What else would be needed to mark this RTBC? Would be good to get feedback from Deciphered.

deciphered’s picture

I really do want this module to move forwards, as I think it's extremely useful for large community based sites (like D.o), I will do my best to review what is in the issue as soon as I can, but I can't make promises when I don't know if I have the time to fulfil said promises. Will do my best though.

deciphered’s picture

Update: Have currently got a project that requires this functionality, so will be pushing forward hard in the next few weeks. Any requests, make them now.

deciphered’s picture

Title: drupal7 support/release of mentions » Views integration

I'm updating this issue title, which is a bit confusing in this very late stage of the game, but I want it to reflect what this issue is about, which at this stage, based on the current patch, is about the Views integration.

All other D7 issues should live in their own issues.

deciphered’s picture

Latest patch committed, work will continue from that point as while it's an improvement, it's still not finished.

The last submitted patch, 26: drupal7_support_release-1175916-26.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 30: drupal7_support_release-1175916-30.patch, failed testing.

mgifford’s picture

Thanks @Deciphered! Appreciate your efforts.

deciphered’s picture

Glad I could finally get to it. I don't get nearly enough to work on my contrib, and I do actually quite like this module, as I think it would be perfect for use on D.o....

mgifford’s picture

Yup, agreed. Would be good to get more support behind #448074: @ style mentions for usernames which send notifications for D.o

We're already using the convention.... It's just not linked to anything.

deciphered’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Needs work » Fixed

Views integration is vastly improved in the 7.x-2.x branch as it is now Entity based and the Entity API is doing the majority of the work for the Views integration.

Status: Fixed » Closed (fixed)

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

fadgadget’s picture

doesanyone have any views i could use to show peoples mentions or even just a pointer thanks? im not having any jy making mentions appear in a blick like i could on 7.1 tx