vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Admin functions (https://vborg.vbsupport.ru/showthread.php?t=42488)

Ninth Dimension 08-19-2002 04:25 PM

Admin functions
 
Hi all, i'm about to start working on the admin functions for my vBstory hack, but I don't know where to start.

OK, that is a lie, I know that I should use
PHP Code:

<?php
error_reporting
(7);
require(
"./global.php");
cpheader();

/* .... your script here ... */

cpfooter();
?>

as a basis for the file, but after that I'm stuck.

I think that the admin supports some type of non-template based options, with some special code for input tags, etc... but I don't know what these are.

Can anyone gimme a hand please?

Lionel 08-19-2002 04:33 PM

I am not a coder myself, but what I see the other guys do is write a function for edit, delete or add and then they edit the admin/index.php with the makeeyesnode do?edit do?add etc...and when you click on them it allows you to write directly in database.

Ninth Dimension 08-19-2002 04:40 PM

I've just had a look at the code for the admin section of the vBquiz hack, and damn - it looks very confusing :(

I'll have to see if i can pull it apart and see what I can learn from it :)

Lionel 08-19-2002 04:44 PM

you might want to look at the glossary hack. It is less complexed.

Ninth Dimension 08-19-2002 05:06 PM

Thank you, i'll have a look.

Ninth Dimension 08-19-2002 06:27 PM

it took me a while, but I think i'm getting used to this, it's really each once you use all the functions that vB has provided.

what do you think of my form code for adding a story to the database?

PHP Code:

            // add  story
            
echo "<p><b>vBstory $ver - Add Story</b></p>";

            
doformheader("vbstory_admin","add");
            
maketableheader("Add Story - All fields are required.","",1,2);
            
makeinputcode("Story Title""title""");
            echo 
'<tr class="'.getrowbg().'"><td valign=top>';
            echo 
"Genre";
            echo 
"</td><td valign=top>";
            
// get genre list
            
echo "<select name='genreid'>";
            foreach (
$genres_global[title] as $genres_key => $genres_value) {
                echo 
"<option value='$genres_key'>$genres_value</option>";
            }
            echo 
"</select>";
            echo 
"</td></tr>";
            
makeinputcode("Character Name""name""");
            
maketextareacode("Background","info",$description,6,50);
            
makeinputcode("Display <small>1 for yes. 0 for no.</small>""display""1");
            
makehiddencode("what""story");
            
makehiddencode("post""1");
            
doformfooter("Add Story"); 


Lionel 08-19-2002 06:40 PM

why do you make it only one Character? A story should have more than one Character...

Ninth Dimension 08-19-2002 06:47 PM

it only has one Character because the idea is that you take on the role of that person in the story.

the stories will be written as if you was telling a story to your grandchildren from a first person perspective, but in a past tense.

For example:
I sat in the park and waited for my friends.
instead of:
He sat in the park and waited for his friends.

The story can have more than one character, but you will only have control of one :)

I hope that makes sense?


All times are GMT. The time now is 10:47 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.01214 seconds
  • Memory Usage 1,735KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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