vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   makeyaddayaddacode(); ... in custom CP pages (https://vborg.vbsupport.ru/showthread.php?t=54592)

gengar003 06-21-2003 05:13 PM

makeyaddayaddacode(); ... in custom CP pages
 
Bleh. Icky title.

Anyway, I've made a custom page for my admin CP, works likea charm, BUT -- the pages are all black on white.

I COULD hard-code it to look like the other pages, but, upon looking at some other hacks, (namely the template backup system)

I've figured out that there are approximately a jillion makeinputcode("blah", "lbah", "halb"); maketableheader("moo", "moo" , 0);

etc things that can be used, and I'd prefer to use them.

SO, i've got a hard-coded (using "echo") form, and I want to put it in a nice table w/colors that match the rest of the cp.

What would I use, and how?


PHP Code:

echo "<p>Modifying TAC?mon:<br>"// This would be the table header.
echo "<form action=\"tacemon.php\" method=\"GET\">"// this just needs to be here, doesn't show up.
echo "Old Name: <input type=\"text\" name=\"old_name\" length=\"25\" size=\"20\"><br>";//seperate line
echo "<br><hr><br>"//would probably be removed
echo "New Name: <input type=\"text\" name=\"new_name\" length=\"25\" size=\"20\"> (type 'keep' to leave it as is.)<br>"// new line
echo "New Variable: <input type=\"text\" name=\"new_var\" length=\"30\" size=\"20\">(type 'keep' to leave it as is.)<br>";// new line
echo "New Data: <input type=\"text\" name=\"new_data\" length=\"20000\" size=\"20\">(type 'keep' to leave it as is.)<br>"// new line
echo "<input type=\"submit\" name=\"submit\" value=\"Modd 'em!\">"// the submit button
echo "<input type=\"hidden\" name=\"action\" value=\"modifying\">"// just needs to be here
echo "</form>"// ditto as above. 


Dean C 06-22-2003 10:06 AM

This isn't hard... just take a look at adminfunctions.php and you'll get the hang of it in no time :)

- miSt

Chris M 06-22-2003 10:32 AM

Simply put:

Code:

cpheader();
and:
Code:

cpfooter();
in your file:)

Satan

Dark_Wizard 06-23-2003 04:37 PM

Quote:

Yesterday at 07:32 AM hellsatan said this in Post #3
Simply put:

Code:

cpheader();
and:
Code:

cpfooter();
in your file:)

Satan


That won't handle the form though...he has to look at makeformheader and makeformfooter in adminfunctions.php

Dark_Wizard 06-23-2003 04:42 PM

It would look something like this:

PHP Code:

maketableheader("Modifying TAC?mon:");
makeformheader("tacemon","add");
makelabelcode("Old Name:","old_name",$old_name);
makelabelcode("New Name:","new_name",$new_name);
makelabelcode("New Variable:","new_var",$new_var);
makelabelcode("New Data:","new_data",$new_data);
makeformfooter("Add"); 


gengar003 06-25-2003 11:03 AM

Thanx, guys, I'll try that.

EDIT: I replaced the "Echo" statements w/ that code, and put Cpheader(); at the top of the page, and cpfooter(); at the bottom.... But nothing changed....

Dean C 06-25-2003 02:27 PM

If you know how php functions work then like i said - look at adminfunctions.php.

I learnt how to use these functions in minutes as they are so simple :)

- miSt


All times are GMT. The time now is 07:06 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.01132 seconds
  • Memory Usage 1,736KB
  • 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
  • (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
  • (7)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