NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

#1 10-31-2008 16:55:32

Twighlight
Member

installing new menu items

whe i try to install new menu items in header.php
i just get errors and whatnot.
i want to add an editable about us section.
i aslo would like to figure out a code to give art a "pending" status.
such as, "pending lineart"
i would also like to add some sort of punishment system, where after 3 strikes, your out.

does anyone have any codes a all to fulfil any of these dreams?

Offline

#2 11-01-2008 05:28:55

Waccoon
Administrator

Re: installing new menu items

whe i try to install new menu items in header.php
i just get errors and whatnot.
i want to add an editable about us section.

There are two arrays that contain all the menu items, $left_menu and $right_menu.  To add a menu item, you only need to "push" a new item on to that array, as follows:

Code:

$left_menu[] = '<a href="about.php">About Us</a>';

The empty brackets after the variable name tell PHP to add whatever is to the right of the equals sign into the array.  Each array item is then printed to the header with spacers in between them.  You just have to make sure the apostrophes and quotes are in the right order, and you don't forget the semicolon at the end.

Making the actual About Us page is a lot trickier, as that requires the usage of PHP code so the template will work correctly.  The "showrules.php" file is an excellent reference on how to make your own page.

i aslo would like to figure out a code to give art a "pending" status.
such as, "pending lineart"

This is tricky, because the board wasn't designed for version control.  A picture is either in progress as a WIP (hidden from the index page), or it is posted for everyone to see.  Trying to mess with that code causes a bunch of interface issues when trying to comment on a picture, and can confuse the security system that keeps people from commenting on pictures that have not been officially posted.

i would also like to add some sort of punishment system, where after 3 strikes, your out.

The banning system is pretty crude at the moment.  You'll have to warn people via mailbox messages and then manually add their IPs into the ban list.

Offline

#3 11-01-2008 11:20:24

Twighlight
Member

Re: installing new menu items

the problem is that i've already tried the while adding menus thing. i mean, its says clearly on header.php
"to add menu items, do it here"
i copy and pasted the code that says RULES, and all i did was remove the <strog> tags and the excamation point as swell.
also i renamed it.
ive also tried adding a NEW php file called "about us.php"
but it didnt save correctly no matter what i did. it always saved as a text file, not a notepad file.
i ust copied all of edit rules.php
and rules.php
renamed the variables, and renamed the files. adding an extra "edit" to the admin submenu worked. but it was just another edit rules,  not about us.
again, i could NOT save them as a nnotepad file for some reaon. i mean, i directly edited the existing files and "saved as..." instead of save.
i dont know what im doing wrong. hmm
also, what about
".$langop_word_rules.'"
what do i put for that?
thanks alot for the help btw, i really enjoy your programs.

Last edited by Twighlight (11-01-2008 11:30:00)

Offline

#4 11-01-2008 22:25:15

Waccoon
Administrator

Re: installing new menu items

Editing the page directly from within the BBS requires some extra code.

Here, try this.  I haven't tested it, but it should do everything you need except have the appropriate links in the header menu:  twighlight-aboutus.zip

The "aboutus.php" file is the page that displays the About Us page.  This should be linked in the header.  Don't add a space to the name of the file, since spaces in filenames can be troublesome with web pages.  If you want to change the file name, you'll have to change the all_done('aboutus.php'); line in the "editabout.php" file to match, or else the editor will return an error.

The "editabout.php" file is what edits the About Us page, so that should be put into the admin section of the oekaki menu.  It uses its own code to save the About Us page, rather than using functions.php.  If you rename the "aboutus.php" file, the editor must be modified, too.

A new file will be created in the resource folder, called "about_include.php".  Don't link directly to this file, as it only contains the data that is displayed in the About Us page.

Please note that any administrator can change the About Us page, but only the owner may add PHP code to it.  This is important if you want to copy some of the code in the FAQ to the About Us page, such as the code that shows the current administrators.

Offline

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB