vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=263)
-   -   Template Groups (https://vborg.vbsupport.ru/showthread.php?t=288061)

TheSupportForum 09-20-2012 09:26 AM

Template Groups
 
i see that create Template groups has now changed in VB5 but when trying to create the group in the product .xml file i am confused

this is an example of the admin template group within vbulletin-styles.xml

<templategroup name="Admin">

but i wish to use the same method within a product.xml the problem is where to place it ?

below is part of the xml where it shows <templates></templates>

<dependencies>
</dependencies>
<codes>
</codes>
<templates>
</templates>
<stylevardfns>

i have tried many ways of try this

<templates>
<templategroup name="test">
<template name="test_1" templatetype="template" date="1345854416" username="simonhind" version="5.0.0 Beta 10"><![CDATA[testing content
]]></template>
</templates>

but it throws error when i import

if anyone can help on a simple example it would be great

Scanu 09-20-2012 03:48 PM

Did you try the old vb4 plugin code?

ForumsMods 09-20-2012 04:30 PM

Not possible currently.
There are not hooks/plugins in vB5.

You are confusing a style xml with a product xml.

BirdOPrey5 09-20-2012 10:03 PM

The proper way to add a template to a product XML file is to put the forum in debug mode.

Go to Style Manager in the Admin CP, choose the master style, and from the drop down box choose "Add New Template"

On the next page give the template a name, choose your product from the drop down product list, and enter the code for your template.

Save.

Finally go to the Product Manager in Admin CP and "Export" the product- it will contain all your settings, templates, phrases, and anything else you can associate with the product from the Admin CP.

Scanu 09-21-2012 11:04 AM

Bop5, he is asking how to make a template group not a template, am i wrong?

TheSupportForum 09-21-2012 06:01 PM

Quote:

Originally Posted by Scanu (Post 2367262)
Bop5, he is asking how to make a template group not a template, am i wrong?

that is correct, woudl like to add a template group within the product

i have looked at vbulletin styles.xml which holds this
<templategroup name="Admin">

but the issue is where in the product xml should it be placed

the example from that is this

Code:


    <templategroup name="Admin">
        <template name="admin_screenlayout_1" templatetype="template" date="1345854416" username="vBulletin Solutions" version="5.0.0 Alpha 37"><![CDATA[<div id="canvas-layout-100" class="canvas-layout row-fluid {vb:raw displayClass}" layout-id="1">
    <div class="canvas-layout-row no-columns clearfix">
        <div class="canvas-widget-list section-2 span12"></div>
    </div>
    <div class="canvas-layout-row no-columns clearfix">
        <div class="canvas-widget-list section-0 span12"></div>
    </div>
    <div class="canvas-layout-row no-columns clearfix">
        <div class="canvas-widget-list section-3 span12"></div>
    </div>
    <input type="hidden" name="displaysections[0]" />
    <input type="hidden" name="displaysections[2]" />
    <input type="hidden" name="displaysections[3]" />
</div>]]></template>


ForumsMods 09-21-2012 06:05 PM

You can not add a new template group in vBulletin 5.
That tag (templategroup) is used for styles which are different from products.

BirdOPrey5 09-21-2012 07:10 PM

Quote:

Originally Posted by Scanu (Post 2367262)
Bop5, he is asking how to make a template group not a template, am i wrong?

sorry. :o

rellect 09-24-2012 08:28 AM

There is a way to add template group, but it require edit a file..
For doing that with extensions we should wait till:
1. vB5 devs take your suggestion and add the templategroup to the xml
2. Api extensions fixed to work in the admincp


All times are GMT. The time now is 03:27 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01048 seconds
  • Memory Usage 1,731KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete