vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Adding a New Variable (https://vborg.vbsupport.ru/showthread.php?t=157798)

Paul M 09-17-2007 11:15 PM

How exactly have you created 'bbtitle_discrete' in the first place ?

Remulon 09-17-2007 11:22 PM

Thanks for your reply Paul, please read my first post in this thread.

Remulon 09-19-2007 04:52 AM

Hi, I'm still looking for a solution on this.. can anyone help?

Paul M 09-19-2007 07:13 AM

When you answer my question, what steps exactly did you take to create it.

Remulon 09-19-2007 11:35 PM

Hi Paul, Thanks for replying.

I created the variable through MySQL queries.

Code:

INSERT INTO `setting` VALUES ('bbtitle_discrete', 'address', 'HC Support Forum', 'vBulletin Forums', '', 15, 0, 1, 'free', 'vbulletin', '', 0);

INSERT INTO `phrase` VALUES ('', -1, 'setting_bbtitle_discrete_desc', 'vbsettings', 'A discrete name for your forum. This appears in emails etc. (Wherever $vboptions[bbtitle_discrete] appears)', 'vbulletin', '', 0, '', 0);

INSERT INTO `phrase` VALUES ('', -1, 'setting_bbtitle_discrete_title', 'vbsettings', 'Discrete Forum Name', 'vbulletin', '', 0, '', 0);


The above queries allow me to edit the new variable in the adminCP.

I assumed that since the variable is in the setting table (alongside the original variable - bbtitle), it would be simple for me to access it's value in the scripts, provided I ensure that it is being set.

That's why I am trying to find out where the original variable - bbtitle - is set.

Regards

Remo

Dismounted 09-20-2007 06:00 AM

You could've created that setting without running SQL queries of your own, that's what the Products are for. You could just change $vbulletin->options['bbtitle'] by using a plugin at global_start.

Remulon 09-21-2007 04:11 AM

ok, thanks Dismounted, but...

I don't actually want to change $vbulletin->options['bbtitle'] everywhere, only in some places. That's why I created another variable, $vbulletin->options['bbtitle_discrete'] , so that I can use both.

Also, I created it this way so that it can be edited in the adminCP.

Could you explain how I would do this in the way of a plugin?

Thanks

Remo

Dismounted 09-21-2007 05:04 AM

It depends where you want to change it.

Remulon 09-21-2007 05:49 AM

If you go back to page 1 in this thread, one of my posts states all of the phrases I have changed 'bbtitle' to 'bbtitle_discrete'.

Marco van Herwaarden 09-21-2007 06:11 PM

What you are trying to do would need a lot of changes in phrases, templates and worse code-edits.

I suggest you try to do it the other way round: Mask your bbtitle, create a new setting with the real title and use that in your regular templates (just a guess, probably only needed in header template). Not tried this but i have the feeling it would be a lot less work.


All times are GMT. The time now is 02:12 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.01569 seconds
  • Memory Usage 1,727KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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