I was wondering if there will be a Drupal 7 version of Flag module ready for testing soon? http://webchick.net/node/74
This is such a great module and I really appreciate the great support by the maintainer and the community.
I would like to help with any testing needed.
Thanks very much in advance!

Comments

quicksketch’s picture

Category: support » task

Heh, well I knew it would happen sooner or later that someone would ask. ;-)

Flag has not yet begun porting to Drupal 7, but I've been prepping a lot of the code in 2.x for a smoother conversion. Fortunately most of Flag's code is largely independent of Drupal 7's major changes. I don't expect the port to take more than 2 weeks once started. No new features will be added to the Drupal 7 version, we'll be doing a straight port of 2.x.

In the mean time, you can help with Flag by trying out the 2.x beta version. The closer we are to a final release the less changes we'll have to maintain in two branches.

Bilmar’s picture

thanks for the reply quicksketch
i will take a look at 2.x beta version this weekend to see if i can help with any testing.

BenK’s picture

Subscribing...

YK85’s picture

+1 subscribing

robby.smith’s picture

+1 subscribing - drupal 7 alpha 2 is out! woohooo
any plans for this port in the near future?

coltrane’s picture

Status: Active » Needs work
StatusFileSize
new64.08 KB

Here's a start on porting Flag to Drupal 7. Flag actions hasn't been included in this port, and I didn't touch most of the includes/ like Views.

What works: You can enable the module and create flags for nodes.

What doesn't: It doesn't seem like the flag is appearing on nodes.

I haven't done a lot of testing of the port so this is really just a first pass. Most database queries are updated. The menu for flags has moved to admin/structure.

I haven't touch theme changes.

Remon’s picture

+1

quicksketch’s picture

StatusFileSize
new60.79 KB
new44.24 KB

Thanks coltrane for the start of this process. I've restored the HEAD branch for development of the Drupal 7 version. I've tagged a new release of the 2.x branch (beta3) since we'll need to make a lot of changes to the Drupal 6 version to ease maintenance between the two branches.

I'm taking a stab at continuing the port this weekend, we should have something mostly working in the D7 branch soon. Below is a reroll of coltrane's changes plus another patch that includes all the backports we'll be making to D6 so far.

quicksketch’s picture

StatusFileSize
new109.79 KB

Making progress:
- Fully converted all queries to DBNTG
- Converted nodeapi and hook_link so our links now show up properly
- Bunch of theme system fixes
- Fixed upgrade path from Flag 1.x

You can now create/delete/edit flags and they actually work, in all forms: JavaScript, link, and confirmation forms. I tried updating the Views integration but that pretty well exploded right off the bat. We probably have some Views 3 API changes that haven't yet been accommodated for.

amitaibu’s picture

1) Cool!
2) Subscribe :)
3) Maybe not for the first release of Flag, but I think the Flag can take advantage of other D7 goodies - like making it an entity (fieldable entity maybe). I've got also other ideas about making the flagging entity also more abstract (i.e. allow other enteties to flag not only users) -- but that's probably better to discuss after the first version is out.

quicksketch’s picture

Maybe not for the first release of Flag, but I think the Flag can take advantage of other D7 goodies - like making it an entity (fieldable entity maybe).

If we start taking advantage of Drupal 7 and make a completely separate branch, support will end for Drupal 6. That being the case, we probably won't take advantage of Drupal 7 fully until Drupal 8 starts rolling around, just like we've maintained the Drupal 5 version in sync in the 1.x branch until now, at the cusp of Drupal 7. chx is all about making flags into fields so that he can avoid the use of SQL, but as with CCK, making Flags into fields will add a significant amount of overhead for anyone using a relational database, which is quite a drawback. Anyway... yeah you're right we should talk about any changes to the Drupal 7 version in different issues. The 2.x version will be a straight port with the intention of maintaining the D6 and D7 versions in sync.

quicksketch’s picture

Port is coming along quickly, I've now got full Token and Actions integration finished, and fully ported Flag Actions module. A simple related issue just now discovered that would be nice to get some eyes on: #655252: Custom e-mail action fails to accept token [node:author:mail] or [comment:author:mail].

quicksketch’s picture

Status: Needs work » Fixed
StatusFileSize
new8.57 KB
new133.4 KB

I've gone ahead and committed this first round of changes, from which we can continue any further developments. Now fully working:

- Flag creation/edit/delete.
- Import and Export of flags.
- Flagging in all forms (JavaScript, link, confirmation form).
- Full actions support and Flag Actions module complete.
- Token integration completely updated.
- Views integration working.

Thanks again to coltrane for the HUGE help in getting this started. Updating those SQL queries is friggin' tedious work and I really appreciate all the progress that was made before I even started looking at this.

Status: Fixed » Closed (fixed)

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