Author Topic: How to edit the HTML using templete hooks  (Read 6858 times)

Offline buffe

  • Newbie
  • *
  • Posts: 8
How to edit the HTML using templete hooks
« on: November 30, 2009, 12:03:36 AM »
Hi,
I'm extending roundcube for my university project. And I'm currently developing a blacklist. But I found bit difficult to understand how to add my HTML contents to the page  using template hooks. Can anyone please suggest how to extend them or any document which describes it more elaborately than in the plugin doc. Also the Doc_TempleObject link is not working in the available plugin hooks document.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
How to edit the HTML using templete hooks
« Reply #1 on: November 30, 2009, 01:52:41 AM »
Where did you find the Doc_TempleObject hook, you should read the template  hook documentation Plugin_Hooks ? Roundcube Webmail I'd recommended that you look at a plugin that modified the template the way you that you wanted and reverse engineer the plugin so you know how it does it.

Offline buffe

  • Newbie
  • *
  • Posts: 8
How to edit the HTML using templete hooks
« Reply #2 on: November 30, 2009, 03:41:09 AM »
Well in the page you have mentioned there is a section called Template Hooks , in that section there is a sentence "A list of all available template objects is given in Doc_TemplateObjects?. " but the link is not working.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
How to edit the HTML using templete hooks
« Reply #3 on: November 30, 2009, 03:57:48 AM »
Sorry I missed that its part of a wiki and that page hasn't been made yet, I think it will be part of the theme documentation. What are you trying to modify in the template? I also recommend reading Doc_Plugins ? Roundcube Webmail It has use of the code.

Offline buffe

  • Newbie
  • *
  • Posts: 8
How to edit the HTML using templete hooks
« Reply #4 on: November 30, 2009, 04:24:13 AM »
Thanks skaero for your immediate replies.
Actually, I'm trying to add a tab for "blacklist" in settings -> preferences section and then add the necessary controls(list, textbox , etc) to add to, delete from  and display  blacklist. To add those control as I understood I have to use template hooks and understand how to extend the objects given in it. This is my first experience with roundcube so I found it bit difficult to get a clear idea of how to extend those object to suit my requirements. Also I don't know the available template objects in detail. So It would be great if some one can help me on this.

Offline buffe

  • Newbie
  • *
  • Posts: 8
How to edit the HTML using templete hooks
« Reply #5 on: November 30, 2009, 07:04:59 AM »
Quote from: buffe;23462
Thanks skaero for your immediate replies.
Actually, I'm trying to add a tab for "blacklist" in settings -> preferences section and then add the necessary controls(list, textbox , etc) to add to, delete from  and display  blacklist. To add those control as I understood I have to use template hooks and understand how to extend the objects given in it. This is my first experience with roundcube so I found it bit difficult to get a clear idea of how to extend those object to suit my requirements. Also I don't know the available template objects in detail. So It would be great if some one can help me on this.


can anyone please tell me where is this is defined and where can I see its properties, and also the available template objects.

Offline markbecken09

  • Newbie
  • *
  • Posts: 3
How to edit the HTML using templete hooks
« Reply #6 on: December 12, 2009, 01:48:12 AM »
HI,
I need to look at how it exists now to see if it's really that complicated. I know that plugins can be saved and traded as XML files already, so the template author just needs to take an existing plugin and modify it.

Thanks.

shanthi

  • Guest
How to edit the HTML using templete hooks
« Reply #7 on: December 15, 2009, 04:21:21 AM »
I have been thinking of this for a while; pretty much since template hooks were added.

I feel that people cannot take advantage of template hooks unless they are a PHP coder, and this shouldn't be the case (designers of templates should be able to plug in to this without requiring plugins / manual template edits). With requiring you to know PHP before using template hooks, it makes it harder for people to edit them and or add their own code.

This is where my suggestion comes in. I propose a template hook "plugin" like interface where the code is stored just like plugins. No PHP is required, you just have a thooks_vbulletin.xml file that is read into the drop down (just like normal hooks) and that is user selectable. Then you can add code for template hooks to be evaluated where ever needed (parse templates ?).

All that is required would be a general knowledge of HTML for writing the code. This could also be tied into the plugin system by having them exported / imported and into the style system where they don't need to have a separate product if designers would like to use the proposed structure.