NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

#1 11-07-2008 01:43:16

Archiving

I tried editing functions.php to where only the owner and a super administrator could archive pictures; I was rewarded with a parse error. hmm
Is there anyway you could help me with that? I edited the admin bar, taking away most of their abilities big_smile Rage doesn't like to share tongue So, I figured this would be just as simple. T.T But it wasn't. >_>

Oh, and I figured out how to change peoples usernames, so ignore that part in that e-mail. big_smile <333

Last edited by Rage Inflictor (11-07-2008 01:46:09)

Offline

#2 11-07-2008 04:35:43

Waccoon
Administrator

Re: Archiving

In the functions file, the only line you have to change is this:

Code:

// Archive picture
if ($mode == 'archive') {
    $picid = w_gpc('picid', 'i');

    if ($flags['admin']) {

CHANGE TO

// Archive picture
if ($mode == 'archive') {
    $picid = w_gpc('picid', 'i');

    if ($flags['sadmin']) {

The archive link on each picture is tricky, because the code is messy, and the admin features are kinda grouped together.

Take this:

Code:

        // Admin-only options
        if ($flags['admin']) {
            // Lock
            if ($outerrow['threadlock'] != 0) {
?>
        [<a href="functions.php?mode=unlock&amp;picno=<?=$outerrow['PIC_ID']?><?=$pic_redirect?>"><?=$langop_word_unlock?></a>]
<?
            } else {
?>
        [<a href="functions.php?mode=lock&amp;picno=<?=$outerrow['PIC_ID']?><?=$pic_redirect?>"><?=$langop_word_lock?></a>]
<?
            }

            // Archive
?>
        [<a href="functions.php?picid=<?=$outerrow['PIC_ID'];?>&amp;mode=archive<?=$pic_redirect?>"><?
            if ($outerrow['archive'] == '0') {
                echo $langop_word_archive;
            } else {
                echo $langop_word_unarchive;
            }
            ?></a>]
<?

            // Bump
?>
        [<a href="functions.php?mode=bump&amp;resno=<?=$outerrow['PIC_ID'];?>"><?=$langop_word_bump?></a>]
<?

        }

...and replace it with this:

Code:

        // Admin-only options
        if ($flags['admin']) {
            // Lock
            if ($outerrow['threadlock'] != 0) {
?>
        [<a href="functions.php?mode=unlock&amp;picno=<?=$outerrow['PIC_ID']?><?=$pic_redirect?>"><?=$langop_word_unlock?></a>]
<?
            } else {
?>
        [<a href="functions.php?mode=lock&amp;picno=<?=$outerrow['PIC_ID']?><?=$pic_redirect?>"><?=$langop_word_lock?></a>]
<?
            }
        }
        if ($flags['sadmin']) {
            // Archive
?>
        [<a href="functions.php?picid=<?=$outerrow['PIC_ID'];?>&amp;mode=archive<?=$pic_redirect?>"><?
            if ($outerrow['archive'] == '0') {
                echo $langop_word_archive;
            } else {
                echo $langop_word_unarchive;
            }
            ?></a>]
<?
        }
        if ($flags['admin']) {
            // Bump
?>
        [<a href="functions.php?mode=bump&amp;resno=<?=$outerrow['PIC_ID'];?>"><?=$langop_word_bump?></a>]
<?

        }

You can then change the admin test to "admin", "sadmin", or "owner".

Offline

#3 11-07-2008 07:16:25

Rage
Guest

Re: Archiving

Thank you big_smile

Do I find that script in functions? I can't seem to be able to... T.T

#4 11-07-2008 13:58:37

Pinkie
Member

Re: Archiving

Rage wrote:

Thank you big_smile

Do I find that script in functions? I can't seem to be able to... T.T

Second part can be found in index.php

Offline

#5 11-08-2008 00:49:32

Re: Archiving

lol, thanks XD I'm not the brightest creature out there <3333

Offline

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB