Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-21-2003, 05:13 PM
gengar003's Avatar
gengar003 gengar003 is offline
 
Join Date: Apr 2002
Location: .::|The Matrix|::.
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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. 
Reply With Quote
  #2  
Old 06-22-2003, 10:06 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

- miSt
Reply With Quote
  #3  
Old 06-22-2003, 10:32 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Simply put:

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

Satan
Reply With Quote
  #4  
Old 06-23-2003, 04:37 PM
Dark_Wizard Dark_Wizard is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 1,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 06-23-2003, 04:42 PM
Dark_Wizard Dark_Wizard is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 1,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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"); 
Reply With Quote
  #6  
Old 06-25-2003, 11:03 AM
gengar003's Avatar
gengar003 gengar003 is offline
 
Join Date: Apr 2002
Location: .::|The Matrix|::.
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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....
Reply With Quote
  #7  
Old 06-25-2003, 02:27 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:46 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.03916 seconds
  • Memory Usage 2,237KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete