Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Facebook Connect - Plugin Assistance Needed
I'm working on a Facebook Connect plugin, and am trying to wrap my head around how the Garden works exactly. I have some basic plugin functionality setup already for this and working, however need to refine things a bit further. Any help regarding the following is greatly appreciated! Simple examples please.
1) I'm attempting to display additional html on the entry login page (where user's enter their username and password). I understand I could simply add another view file in, however this seems a bit clumsy. Can I append additional html to the login view file via plugin, and if so what would the example code look like? If not, I have the view override file working already.
2) I want to fire-off another javascript function when a user clicks the sign-out link (doesn't matter if its directly before or after the normal sign-out functionality is run). How would I accomplish this within the same plugin?
3) How can I inject code in the to the portion of the page - without modifying the view directly (ie: via the same plugin)? I want to load some additional javascript here.
Thanks in advance - and great work on the Garden! I'll post some code once I make further progress for everyone else to use.
1) I'm attempting to display additional html on the entry login page (where user's enter their username and password). I understand I could simply add another view file in, however this seems a bit clumsy. Can I append additional html to the login view file via plugin, and if so what would the example code look like? If not, I have the view override file working already.
2) I want to fire-off another javascript function when a user clicks the sign-out link (doesn't matter if its directly before or after the normal sign-out functionality is run). How would I accomplish this within the same plugin?
3) How can I inject code in the to the portion of the page - without modifying the view directly (ie: via the same plugin)? I want to load some additional javascript here.
Thanks in advance - and great work on the Garden! I'll post some code once I make further progress for everyone else to use.
0
Comments
[code]
class FacebookConnectPlugin implements Gdn_IPlugin {
public function EntryController_Render_Before(&$Sender) {
echo 'This would output some html from an html file eventually.';
}
}
[/code]
Do I simply need to put all my display in a new .php file, and tell the plugin to override the view here to accomplish what I'm looking to do (add the Facebook Connect button on this page), like:
[code]
class FacebookConnectPlugin implements Gdn_IPlugin {
public function EntryController_Render_Before(&$Sender) {
$this->View = PATH_PLUGINS.DS.'FacebookConnect'.DS.'entry.php';
}
}
[/code]
Downside to this approach that I see, is that if the base entry.php file is ever edited, then the plugin will always have an out-of-date version - unless updated.
Or is there a better way to do this? Thanks guys!
We don't have a concrete timeline on this, but as @garymardell said, we've finished coding an OAuth implementation that works pretty well and we're testing that now, so it shouldn't be *too* long...
Vanilla Forums COO [GitHub, Twitter, About.me]