vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How do I add a template group for a product? (https://vborg.vbsupport.ru/showthread.php?t=174970)

Grae 01-25-2009 10:19 AM

For some reason I can't use a prefix that contains an underscore.

$only['prefix'] works
$only['prefix_product'] does not work

any ideas?

Dismounted 01-25-2009 12:03 PM

What happens in that case? Any reason why you need the underscore anyway?

Grae 01-25-2009 08:24 PM

Quote:

Originally Posted by Dismounted (Post 1724168)
What happens in that case? Any reason why you need the underscore anyway?

When using an underscore the category is not created, even after creating templates with that particular prefix. I can only create a category when not using an underscore.

I have multiple custom products and wanted to use an underscore for organization. For example, vba uses vba_links and vba_portal.

Lynne 01-25-2009 08:39 PM

I have a feeling you are doing this wrong. If you have:

$only['yourname'] = 'Added by YourName';

Then, the templates you would add to go into that group would be named "yourname_template1" and "yourname_template2" or "yourname_this_that"

Grae 01-25-2009 10:17 PM

Quote:

Originally Posted by Lynne (Post 1724601)
I have a feeling you are doing this wrong. If you have:

$only['yourname'] = 'Added by YourName';

Then, the templates you would add to go into that group would be named "yourname_template1" and "yourname_template2" or "yourname_this_that"

I understand this completely.

I am unable to do the following:
$only['yourname_product'] = 'Product';
yourname_product_itembit
yourname_product_whatever

I am unable to create a template prefix group that contains an underscore :(

Lynne 01-25-2009 10:57 PM

Maybe it's a bug? If so, enter it into the bug tracker.

Dismounted 01-26-2009 04:31 AM

Do you have a prefix that is just "yourname", as well as "yourname_product"? That would probably create a conflict. However, if this is not the case, it does look like a bug.

Marco van Herwaarden 01-26-2009 11:30 AM

Best is not to use underscores within the prefix as the underscore is used as delimiter.

You can use underscores but you will need to keep in mind the following:
- If the first part (xxx_yyy_templatename) xxx is used in multiple prefixes (not recommended!!) templates will be placed in the first group that matches the prefix.
- Changing the order in which the prefixes are added to $only does make a difference.
$only[test] = "Main testgroup";
$only[test_sub] = "Sub testgroup";

will give different result as:
$only[test_sub] = "Sub testgroup";
$only[test] = "Main testgroup";

Grae 01-28-2009 07:15 AM

Thanks for the info :)


All times are GMT. The time now is 07:40 PM.

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.01008 seconds
  • Memory Usage 1,729KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete