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.

Extensions and Themes

edited August 2006 in Vanilla 1.0 Help
Hi, I'm extending the Vote add-on as per some of the suggestions and I'm running into problems with the themes. Basically, I'm not sure of the protocol for Add-ons that require theme changes? Do you package them together and ask the user to over write the existing theme? What happens if two extensions want to extend / edit the same theme file? I want to amend the Discussion List on the front page - I have done this by adding temporary delegates - which may be the way forward, but it feels rather haphazard to keep adding these to the code base. I cant override the ThemeFilePath function so it checks my extension directory before the main theme / application directories, so I cant keep the add-on all enclosed in a directory - so I'm not sure of the cleanest approach. I could achieve that by using the objectFactory - but I'll be replicating 99% of the code of the DiscussionGrid control and the discussions and discussion theme which isnt ideal - but its not really a big deal. In other frameworks I have used Partial templates - this might be a solution, my add-on would be less disruptive! - and this could be achieved with the delegation as is. However, to be really useful this requires consistent delegation and delegate parameters especially before outputting content - but is it really possible to cater for most eventualities? Especially, when thats what theme templates are for - they're supposed to be flexible! So as you can gather I'm not sure what approach is best! So I suppose the question is what solutions have you used for updating themes? Ross

Comments

  • If it can work with delegation that you added, just ask mark to add them to vanilla. After you can release your extension for vanilla 1.0.1 only, or ask user to add them manully (when the will upgrade vanilla the delegation will be there anyway).
  • edited August 2006
    You can add this condition "if( APPLICATION_VERSION != '1.0' )" before adding feature that will work in vanilla 1.0.1 or higher
  • MarkMark Vanilla Staff
    That's a great idea, Dinoboff!
  • well... i saw it in attachment 2.0 from jazzman
This discussion has been closed.