vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Editing a VBoptions text box? (https://vborg.vbsupport.ru/showthread.php?t=211396)

chugger 04-16-2009 03:42 PM

Editing a VBoptions text box?
 
if I have a mod that has a admincp textarea where you enter in some text. Can I edit that from the frontend somehow?

Like it has the variable $vboptions['announce'] appended to it. Could I do an href="vboptions[announce] or something somehow?

Kinda of how you can do with the phrases?
Code:

a href="admincp/phrase.php?do=edit&e[global][phrase_name]
?

Dismounted 04-17-2009 04:02 AM

So you just want to link to the page that has that field? Sure, that can be done.
Code:

*ADMINCPDIR*/options.php?optiongroup=*OPTIONGROUP*
I *think* it's right, not 100% sure off the top of my head.

chugger 04-17-2009 11:53 AM

hmmm, ya no good yet. I modified what you said and I get the settings group, however that wasn't exactly what I wanted. However I'm guessing its the only way. I actually didnt really want the settings group, but 1 of the text fields within that settings group.




Code:

<a href="#" onclick="javascript:window.open('admincp/options.php?do=options&dogroup=announce_settings','popup','width=600,height=600');">
Edit</a>

So I was playing and came up with this plugin for forumhome, just to see if it could be done.

Code:

$options = $vbulletin->options['global_announce'];
$output = '<textarea name="global_announce" rows="10" cols="50">' .$options.'';
$output .='</textarea>';

echo $output;

and it basically shows at textarea now on forumhome with the text inside. So at least I know it can be done


All times are GMT. The time now is 08:38 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.00975 seconds
  • Memory Usage 1,710KB
  • 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
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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