PDA

View Full Version : makeyaddayaddacode(); ... in custom CP pages


gengar003
06-21-2003, 05:13 PM
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?



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:

cpheader();
and:
cpfooter();
in your file:)

Satan

Dark_Wizard
06-23-2003, 04:37 PM
Yesterday at 07:32 AM hellsatan said this in Post #3 (https://vborg.vbsupport.ru/showthread.php?postid=411569#post411569)
Simply put:

cpheader();
and:
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:


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