Support Forum

question about post linking

RA -Radio-
-Radio-
Member

As I go through wordpress and wpmu I have come across a question about post triggers… when creating a post which links to a forum post, the plugin adds a feild to the post data which initiates the process…

what is that feild key and it's value?… how is the value determined? … since xmlprc tools (offline blog tools) can achieve this same effect when adding special keys and values to a post … what would the raw key/value pair look like for a single post, to be posted and linked at the time it's published?

3 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Well aside from a complete topic and a complete post record needing to be created, the actual link data is held in the post_meta table and consists of:

meta_id: auto incremental key field (integer)

post_id: The id of the new post record

meta_key: set to the term 'forumlnk'

meta_value: the topic id and forum post id separated by an @ character (as in 55@4433)

And – not just the new topic and post records either – there are the usual post-save routines that check and set indexes etc.

RA -Radio-
-Radio-
Member

ok… that's what happens AFTER the post is published and linked…

what I'm looking for is what is set, before the publish button is pressed…

I know you have a post edit page menu where you can select the forum to publish in, and a check box to initiate the linking routine.

that check box and forum selection have got to be passed to wordpress (through my limited understanding) as extra meta data, which is then acted upon by your link routine.

xmlrpc tools do not have the extra little menu, but they can add extra meta data and upon publishing, can trigger the link routine just as if you were on the post editing page.

what I'm looking for is the metadata to trigger that routine. what metadata is set, before hitting the publish button.

YS Yellow Swordfish
Yellow Swordfish
Member

Ah. Gotcha.

Data is sent to the back end trough POST variables. The checkbox control – which determines that the user wants a link to be made – is named ‘sflink’ and the selected forum to create the new topic in is named ‘sfforum’.