Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 Programming Discussions
  #1  
Old 09-20-2012, 09:26 AM
TheSupportForum TheSupportForum is offline
 
Join Date: Jan 2007
Posts: 1,158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 09-20-2012, 03:48 PM
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
Posts: 829
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you try the old vb4 plugin code?
Reply With Quote
  #3  
Old 09-20-2012, 04:30 PM
ForumsMods ForumsMods is offline
 
Join Date: Aug 2007
Location: Argentina
Posts: 667
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

You are confusing a style xml with a product xml.
Reply With Quote
  #4  
Old 09-20-2012, 10:03 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 09-21-2012, 11:04 AM
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
Posts: 829
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bop5, he is asking how to make a template group not a template, am i wrong?
Reply With Quote
  #6  
Old 09-21-2012, 06:01 PM
TheSupportForum TheSupportForum is offline
 
Join Date: Jan 2007
Posts: 1,158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Scanu View Post
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>
Reply With Quote
  #7  
Old 09-21-2012, 06:05 PM
ForumsMods ForumsMods is offline
 
Join Date: Aug 2007
Location: Argentina
Posts: 667
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can not add a new template group in vBulletin 5.
That tag (templategroup) is used for styles which are different from products.
Reply With Quote
  #8  
Old 09-21-2012, 07:10 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Scanu View Post
Bop5, he is asking how to make a template group not a template, am i wrong?
sorry.
Reply With Quote
  #9  
Old 09-24-2012, 08:28 AM
rellect's Avatar
rellect rellect is offline
 
Join Date: May 2008
Posts: 220
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:53 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08757 seconds
  • Memory Usage 2,239KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete