Cool idea! When the Repository is fully bedded in, I think it would be great to get a tutorial done on how we created this from the ground up.
This might make a great tutorial BTW. It would be a good real world example of how to use MODx natively and the available resources we already have. Is there a module involved in this?
I think it’s best to wait a short while until the new Repository has the full complement of resources ... then we can make the switch.
perhaps you should update the "resources" pointer in the top menu of the forum wich still links to http://modxcms.com/forums/index.php/topic,2425.msg16420.html#msg16420
Great job
perhaps you should update the "resources" pointer in the top menu of the forum wich still links to http://modxcms.com/forums/index.php/topic,2425.msg16420.html#msg16420
A quick starter question -- when a repository item "document" is created, are you actually storing it as authored by a web user that was created via the SMF Bridge? Or are you just storing it with some generic authorship and storing the SMF username in a TV?There is no use of the SMF Bridge at all in the repository. When the new entry is posted, the document’s "createdby" field is set to the SMF ID (but with a minus eg. -3977). The minus sign stops any interference with existing manager or web users who may be set up.
Kyle will probably confirm this ... but if you include the ’Sources/Sub-Posts.php’ from your SMF install (in addition to the SSI.php) in your snippet then you will have access to the createPost() function. (Have a look at this function and you’ll see the types of values you can pass into it)
Was the "auto-generated forum post" bit straightforward to implement; that is, did it use standard SMF API calls, or did it require some funky hacks to SMF?
Kyle will probably confirm this ... but if you include the ’Sources/Sub-Posts.php’ from your SMF install (in addition to the SSI.php) in your snippet then you will have access to the createPost() function. (Have a look at this function and you’ll see the types of values you can pass into it)
Agreed. More talk about this here, don’t know if anything been made yet.. I believe it hasn’t been logged to the bugtracker yet.
I think we need to fix this on the next release of MODx. I believe this is caused by the uncache header setting that is being sent out to the browser so that the page will not be cached and needs to be refreshed all the time. Correct me if I’m wrong.
Ah, I see. So you don’t actually have to have a MODx-authenticated user to create document objects. Now that I think about it, it makes sense, and was probably where I was having a hangup overall. I wanted some sort of single-signon for webusers that didn’t require MODx driving the registration/user management, but now it looks like everything I actually need can be done by authentication via the SMF SSI. Cool. Thanks for the breakthrough.
There is no use of the SMF Bridge at all in the repository. When the new entry is posted, the document’s "createdby" field is set to the SMF ID (but with a minus eg. -3977). The minus sign stops any interference with existing manager or web users who may be set up.
Heh. Probably the ususal "These functions are subject to change, so we don’t support ’em" kind of deal. Better add that function to the "test it in case it breaks" list for the next SMF upgrade...
I’m not sure why they don’t have this functionality in the api.