Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Delegate request: access to rowset
An extension I am working on needs additional information about the user in the comments page. I have attached to the
I will be playing with modifying
Would it be possible to add a delegate to
I figure the
CommentBuilder_PreSelect
to add these columns to the query, but there doesn't appear to be any way to get to that information once its been retrieved from the database.I will be playing with modifying
/themes/comments.php
to add a DelegateParameters['Row'] = $Row
, but what I figured would be most useful would be to have a delegate return the result set just after it returns from the database.Would it be possible to add a delegate to
\library\Framework\Framework.Class.MySQL.php
on line 86 right before GetRow
returns $DataSet
?I figure the
SenderObject
and SenderMethod
can be checked by the extension that attaches to this to make sure the query executed is the one the extension wants to capture. 0
This discussion has been closed.
Comments
Anyway, my idea was to add delegates to the GetPropertiesFromDataSet methods on the comments and discussion objects. Then you could attach to the comment object's GetPropertiesFromDataSet method and make up your new property like..
$DataSet = &$Comment->DelegateParameters['DataSet']; $Comment->MyNewProperty = ForceString($DataSet['MyNewColumnName'], '');
Know what I mean? Then you can access your property down in the theme somewhere. It could be neato.
Where can I learn more about this?
Both records were from existing database values so I didn't have to add an additional column, but you can see examples of how to do that in some of Jazzman's extensions.
I wouldn't really consider my method better then what I originally wanted since it seems kind of dispersed, but it works.
You still also have the option of using the ObjectFactory to completely replace the comment class with another one that does what you want. My Forced Category extension does this.