vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   [SOLVED] Templates all in one group (product development) (https://vborg.vbsupport.ru/showthread.php?t=321894)

Dr.CustUmz 02-20-2016 06:46 PM

[SOLVED] Templates all in one group (product development)
 
I am trying to make all of my products templates fall under one group. I do this by using these lines of codes in all of my products:

PHP Code:

<plugin active="1" executionorder="5">
  <
title>Dirt RIF CustUmz Template Group</title>
  <
hookname>template_groups</hookname>
  <
phpcode><![CDATA[$only['drc_'] = $vbphrase['dirt_rif_custumz'];]]></phpcode>
</
plugin

PHP Code:

<phrasetype name="Control Panel Global" fieldname="cpglobal">
  <
phrase name="dirt_rif_custumz" date="0" username="DrCustUmz" version="1.2"><![CDATA[Dirt RIF CustUmz]]></phrase>
</
phrasetype

but when i uninstall one product it breaks the template group by what i believe its doing is removing the phrase.

is there another way of accomplishing this other than they method i am trying to use?

Paul M 02-22-2016 06:52 PM

You could try making the phrase unique to each product, so uninstalling one would not affect any others.

Dr.CustUmz 02-23-2016 04:10 PM

would that be able to keep them all in the same group in the template systems though?

so each of my products would still get put in (for example

Dirt RIF CustUmz Templates
>drc_prdct1
>drc_prdct1_main
>drc_prdct1_css
>drc_prdct2
>drc_prdct2_js

Paul M 02-23-2016 04:26 PM

Quote:

Originally Posted by Dr.CustUmz (Post 2565473)
would that be able to keep them all in the same group in the template systems though?

so each of my products would still get put in (for example

Dirt RIF CustUmz Templates
>drc_prdct1
>drc_prdct1_main
>drc_prdct1_css
>drc_prdct2
>drc_prdct2_js

Yes.

You would simply be assigning the phrase to $only['drc_'] in every product, but as they will all be the same Text (but different phrase names) its not going to matter which one is the final assignment.

Dr.CustUmz 02-23-2016 05:30 PM

worked, thanks =)


All times are GMT. The time now is 03:20 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.02009 seconds
  • Memory Usage 1,723KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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