Make WordPress Core

Opened 19 years ago

Closed 17 years ago

#900 closed enhancement (fixed)

support of mt_keywords

Reported by: anonymousbugger's profile anonymousbugger Owned by: rob1n's profile rob1n
Milestone: 2.3 Priority: normal
Severity: normal Version: 2.2
Component: XML-RPC Keywords: has-patch
Focuses: Cc:

Description

is missing, would be nice for use with eg technorati tags..

Attachments (4)

xmlrpc.php.diff (4.0 KB) - added by redsweater 17 years ago.
Patch to support mt_keywords as conveyance of WP native tags. (Second upload with small fix)
900.diff (3.6 KB) - added by rob1n 17 years ago.
900-fixed.diff (3.6 KB) - added by westi 17 years ago.
Fixed patch
tags-xmlrpc.php.diff (3.6 KB) - added by josephscott 17 years ago.

Download all attachments as: .zip

Change History (32)

#2 @anonymousbugger
19 years ago

  • Patch set to No

#3 @anonymousbugger
19 years ago

It shall be available to plugins once we add API hooks in xmlrpc.php.

#4 @michel v
19 years ago

(I'm the author of the previous note.)

#5 @markjaquith
18 years ago

  • Keywords bg|needs-patch added
  • Milestone set to 2.1
  • Priority changed from normal to low

#6 @mdawaffe
18 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

#2061 allows a plugin to handle this. Without native support for tags in WP, I think this should remain in the plugin domain.

Feel free to reopen with other thoughts.

#7 @redsweater
17 years ago

  • Milestone changed from 2.1 to 2.2
  • Resolution wontfix deleted
  • Status changed from closed to reopened
  • Version changed from 1.5 to 2.2

In light of the last comment, it may be time to reopen this? Since 2.2 is adding native tagging support, the xmlrpc.php interface should support the mt_keywords parameter for MovableType.

If nobody else is inclined to work on this right now, I can probably do it.

I would recommend changing the priority from low to at least normal, since the missing functionality is glaring in the context of the native tagging support.

Daniel

#8 @rob1n
17 years ago

Yep. Feel free to attach a patch, then assign it to me for looking over and possibly committing :).

#9 @rob1n
17 years ago

  • Keywords needs-patch added; bg|needs-patch removed
  • Priority changed from low to normal

#10 @redsweater
17 years ago

Attaching patch, xmlrpc.php.diff.

Summary:

  • Accept mt_keywords input as comma-separated tag names, supplied to wp_insert_post and wp_update_post.
  • Convey get_post_tags result as comma-separated string to generated XML for getRecentPosts and getPost.

One part I'm not sure about is the way I added an include() for wp-admin/admin-db.php near the top of xmlrpc.php. There is some assumption of implicitly included libraries, where the category_exists() function is used in post.php. This include fixes the problem but I'm not sure that's the correct way to solve it.

Daniel

#11 @redsweater
17 years ago

  • Cc redsweater added

#12 @redsweater
17 years ago

  • Keywords has-patch added; needs-patch removed

@redsweater
17 years ago

Patch to support mt_keywords as conveyance of WP native tags. (Second upload with small fix)

#13 @matt
17 years ago

More importantly, I think we need a API call in XML-RPC for tags.

#14 @redsweater
17 years ago

A dedicated API would probably be a good idea, especially if it gives more info (e.g. tell me all tags that have been used on this blog).

But seeing as some emphasis has been made on smoothing the transition for UTW users, I think this patch would be a good way to offer a blunt interface to the tags repository that matches the existing behavior of UTW (as I understand it, it will grab the mt_keywords of submitted posts, and ingest the items as tags).

#15 @westi
17 years ago

This patch looks good in terms of functionality.

Pulling in an admin file in the includes feels wrong though.

The code elsewhere should be fixed instead.

#16 @foolswisdom
17 years ago

  • Keywords developer-feedback added; has-patch removed
  • Milestone changed from 2.2 to 2.3

#17 @redsweater
17 years ago

Does pushing this to 2.3 mean there will be no XML-RPC interface to getting/setting tags in 2.2?

#18 @westi
17 years ago

  • Keywords has-patch commit added; developer-feedback removed
  • Milestone changed from 2.3 to 2.2

reviewing this further it looks like that new include is not actually needed as nowhere in post.php calls category_exists

I think this patch should go into 2.2 minus the extra include line.

#19 @rob1n
17 years ago

  • Owner changed from anonymous to rob1n
  • Status changed from reopened to new

@rob1n
17 years ago

#20 @rob1n
17 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [5278]) Add mt_keywords support. Props redsweater. fixes #900

#21 @redsweater
17 years ago

Sweet!! Thanks for picking this up, rob1n.

#22 @rob1n
17 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Apparently it breaks something.

#23 follow-up: @redsweater
17 years ago

Bummer. Maybe the breakage can be documented here for posterity?

#24 in reply to: ↑ 23 @westi
17 years ago

Replying to redsweater:

Bummer. Maybe the breakage can be documented here for posterity?

Fatal error:  Call to undefined function get_post_tags() in
/home/peter/www/trunk/xmlrpc.php on line 1330

Fixed patch coming up

@westi
17 years ago

Fixed patch

#25 @rob1n
17 years ago

  • Keywords commit removed
  • Milestone changed from 2.2 to 2.3

Tags are moving to 2.3.

#26 @josephscott
17 years ago

  • Cc josephscott added

#27 @josephscott
17 years ago

The new patch I've uploaded is based off the 900-fixed.diff. I fixed the error noted earlier and confirmed that tags can be set for new posts and are returned for existing posts.

#28 @ryan
17 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [5981]) mt_keywords support. Props westi and josephscott. fixes #900

Note: See TracTickets for help on using tickets.