• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_module_pref函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_module_pref函数的典型用法代码示例。如果您正苦于以下问题:PHP get_module_pref函数的具体用法?PHP get_module_pref怎么用?PHP get_module_pref使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_module_pref函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: scrapbots_get_armies

function scrapbots_get_armies($defenderid, $attackerid)
{
    global $session;
    //get attackers
    $sql = "SELECT id,owner,name,activated,hitpoints,brains,brawn,briskness,junglefighter,retreathp FROM " . db_prefix("scrapbots") . " WHERE owner = {$attackerid}";
    $result = db_query($sql);
    $attacker = array();
    for ($i = 0; $i < db_num_rows($result); $i++) {
        $attacker[$i] = db_fetch_assoc($result);
    }
    $sql = "SELECT id,owner,name,activated,hitpoints,brains,brawn,briskness,junglefighter,retreathp FROM " . db_prefix("scrapbots") . " WHERE owner = {$defenderid}";
    $result = db_query($sql);
    $defender = array();
    for ($i = 0; $i < db_num_rows($result); $i++) {
        $defender[$i] = db_fetch_assoc($result);
    }
    debug("Debugging Attacker");
    debug($attacker);
    debug("Debugging Defender");
    debug($defender);
    $armies = array("attacker" => $attacker, "defender" => $defender);
    //Set starting vals
    $armies['attacker']['retreatpct'] = get_module_pref("retreatpct", "scrapbots", $attackerid);
    $armies['defender']['retreat'] = get_module_pref("retreatpct", "scrapbots", $defenderid);
    debug("Debugging Armies");
    debug($armies);
    return $armies;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:28,代码来源:battle.php


示例2: rationpack_use

function rationpack_use($args)
{
    $full = get_module_pref("fullness", "staminafood");
    if ($full >= 100) {
        output("You pick up the ration pack, and eye it for a moment.  Then, you put it right back where it was.  You're `ifar`i too full to eat anything more for now.`n`n");
        unset($args['destroyafteruse']);
        unset($args['usetext']);
        return $args;
    }
    //debug($args);
    require_once "modules/staminasystem/lib/lib.php";
    addstamina(100000);
    increment_module_pref("fullness", 40, "staminafood");
    increment_module_pref("fat", 40, "staminafood");
    increment_module_pref("nutrition", 30, "staminafood");
    if ($full < 0) {
        output("You still feel as though you haven't eaten in days.`n`n");
    }
    if ($full >= 0 && $full < 50) {
        output("You feel a little less hungry.`n`n");
    }
    if ($full >= 50 && $full < 100) {
        output("You still feel as though you've got room for more!`n`n");
    }
    if ($full >= 100) {
        output("You're stuffed!  You feel as though you can't possibly eat anything more today.`n`n");
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:29,代码来源:rationpack.php


示例3: hepzibah_runevent

function hepzibah_runevent($type)
{
    global $session;
    $from = "village.php?";
    // Since there is no interaction here, don't even set this
    //$session['user']['specialinc'] = "module:Hepzibah";
    $voucher = get_module_pref("voucher", "marquee");
    $city = $session['user']['location'];
    $op = httpget('op');
    // Since the text in both cases is mostly the same, make it common
    output("`7As you're walking around, admiring the sights, a wizened old woman approaches.`n`n");
    output("Her greying hair stands out in shock, and her nose is hooked and gnarled.");
    output("It takes all your willpower not to run away from this ghastly sight.`n`n");
    output("She smiles the most evil looking smile you have ever encountered.`n`n");
    output("`&\"Hello, warrior!");
    if (!is_module_installed("marquee") || $voucher) {
        output("Enjoying your visit?\"`n`n");
        output("`7Before you can answer, she has wandered off towards another tourist.`n`n");
        output("`7You shudder and head away quickly.`n`n");
    } elseif ($op == "" && !$voucher) {
        output("For you, a gift!\"`n`n");
        output("`7Before you can protest, she has grabbed your wrist, and placed a small voucher into your hand.");
        output("It reads, `Q\"One Free Pizza at the Marquee\".`n`n");
        output("`&\"Enjoy your stay in {$city}, warrior!\" `7she says, before wandering off towards another tourist.`n`n");
        set_module_pref("voucher", 1, "marquee");
    }
    // Since we never set the special inc, we don't need to unset it.
    //if ($op != "") {
    //    $session['user']['specialinc'] = "";
    //}
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:hepzibah.php


示例4: bioextension_dohook

function bioextension_dohook($hookname, $args)
{
    global $session;
    if ($hookname == "bioinfo") {
        $sql = "SELECT donation FROM " . db_prefix("accounts") . " WHERE acctid = '" . $args['acctid'] . "'";
        $result = db_query($sql);
        $row = db_fetch_assoc($result);
        if ($row['donation'] >= get_module_setting("threshhold")) {
            $bio = get_module_pref("user_extendedbio", "bioextension", $args['acctid']);
            $link = get_module_pref("user_extlink", "bioextension", $args['acctid']);
            $bio = str_replace(chr(13), "`n", $bio);
            $bio = stripslashes($bio);
            output("`0%s`n`n", $bio);
            if (substr($link, 0, 5) == "http:") {
                rawoutput("<a href=\"" . $link . "\">Player's webpage</a><br /><br />");
            }
        }
    } else {
        if ($hookname == "footer-prefs") {
            $bio = get_module_pref("user_extendedbio");
            $limit = get_module_setting("charlimit");
            if (strlen($bio) > $limit) {
                output("`c`4`bWARNING`b`0`c`nYour Extended Bio is oversized by %s characters.  If you navigate away from this page, your Extended Bio will have %s characters indiscriminately cut from the end.  Please edit and re-save your Extended Bio to avoid cuts.", strlen($bio) - $limit, strlen($bio) - $limit);
                $bio = substr($bio, 0, $limit);
                set_module_pref("user_extendedbio", $bio);
            }
        }
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:30,代码来源:bioextension.php


示例5: faqmute_dohook

function faqmute_dohook($hookname, $args)
{
    global $session;
    $seen = get_module_pref("seenfaq");
    switch ($hookname) {
        case "insertcomment":
            if (!$seen && !$session['user']['dragonkills']) {
                $args['mute'] = 1;
                $mutemsg = "`n`\$You have to read the FAQ before you can post comments. You can find it in any town.`0`n`n";
                $mutemsg = translate_inline($mutemsg);
                $args['mutemsg'] = $mutemsg;
            }
            break;
        case "faq-posttoc":
            if (!$seen) {
                set_module_pref("seenfaq", true);
            }
            break;
        case "bioinfo":
            $id = $args['acctid'];
            $seen = get_module_pref("seenfaq", false, $id);
            if (httpget("op") == "faqmute") {
                set_module_pref("seenfaq", false, false, $id);
                output("`nPlayer's FAQ seen status reset.`n");
            } elseif ($session['user']['superuser'] & SU_EDIT_COMMENTS && $seen && !$args['dragonkills']) {
                addnav("Mute Player Options");
                addnav("FAQmute player", "bio.php?char=" . $id . "&ret=" . rawurlencode(httpget("ret")) . "&op=faqmute");
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:32,代码来源:faqmute.php


示例6: iitems_cratelocator_dohook

function iitems_cratelocator_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "iitems-use-item":
            if ($args['player']['itemid'] == "cratelocator") {
                $crates = unserialize(get_module_setting("crates"));
                output("`0You thumb the switch on your Crate Locator.  It buzzes and hisses for a moment, exhausting its primitive battery sending out a radio ping to nearby Crates.`n`n");
                $crates = unserialize(get_module_setting("crates", "iitemcrates"));
                debug($crates);
                $ploc = get_module_pref("worldXYZ", "worldmapen");
                list($px, $py, $pz) = explode(",", $ploc);
                $pxlow = $px - 5;
                $pxhigh = $px + 5;
                $pylow = $py - 5;
                $pyhigh = $py + 5;
                if (!is_array($crates)) {
                    $crates = array();
                }
                $count = 0;
                foreach ($crates as $key => $vals) {
                    if ($vals['loc']['x'] >= $pxlow && $vals['loc']['x'] <= $pxhigh && $vals['loc']['y'] >= $pylow && $vals['loc']['y'] <= $pyhigh) {
                        $count++;
                    }
                }
                output("It displays, weakly, the number `\$`b%s`b`0 in dull red LED's before its radio module catches fire.`n`n", $count);
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:iitems_cratelocator.php


示例7: energydrink_use

function energydrink_use($args)
{
    require_once "modules/staminasystem/lib/lib.php";
    $full = get_module_pref("fullness", "staminafood");
    if ($full >= 100) {
        output("You eye the bottle critically.  Then, you put it right back where it was.  You're `ifar`i too full to imbibe anything more for now.`n`n");
        unset($args['destroyafteruse']);
        unset($args['usetext']);
        return $args;
    }
    addstamina(50000);
    increment_module_pref("fullness", 5, "staminafood");
    $full = get_module_pref("fullness", "staminafood");
    if ($full < 0) {
        output("You still feel as though you haven't eaten in days.`n`n");
    }
    if ($full >= 0 && $full < 50) {
        output("You feel a little less hungry.`n`n");
    }
    if ($full >= 50 && $full < 100) {
        output("You still feel as though you've got room for more!`n`n");
    }
    if ($full >= 100) {
        output("You're stuffed!  You feel as though you can't possibly eat anything more today.`n`n");
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:27,代码来源:energydrink.php


示例8: tents_dohook

function tents_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "worldnav":
            $ploc = get_module_pref("worldXYZ", "worldmapen");
            $sql = "SELECT owner,type,data FROM " . db_prefix("structures") . " WHERE location = {$ploc}";
            $result = db_query($sql);
            for ($i = 0; $i < db_num_rows($result); $i++) {
                //send structure through module hooks
            }
            // $chats = unserialize(get_module_setting("placedchats"));
            // $ploc = get_module_pref("worldXYZ","worldmapen");
            // $chatarea = 0;
            // if (!is_array($chats)) {
            // $chats = array();
            // }
            // foreach($chats AS $key => $vals){
            // if ($ploc == $vals['loc']['x'].",".$vals['loc']['y'].",1"){
            // output("`0There's a little tent here.`n");
            // addnav("Investigate Tent","runmodule.php?module=tents&xyz=".$ploc);
            // $chatarea = 1;
            // break;
            // }
            // }
            // if (!$chatarea){
            // }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:tents.php


示例9: es_bridge_gp_dohook

function es_bridge_gp_dohook($hook, $args)
{
    global $session, $baseaccount;
    $item = httpget('item');
    $action = httpget('action');
    if ($session['user']['armor'] != $baseaccount['armor'] && ($action == 'weararmor' || $action == 'buyarmor') && $session['user']['armor'] == $item) {
        $category = 'armor';
        $defense = $session['user']['defense'];
    } elseif ($session['user']['weapon'] != $baseaccount['weapon'] && ($action == 'wearweapon' || $action == 'buyweapon') && $session['user']['weapon'] == $item) {
        $category = 'weapon';
        $attack = $session['user']['attack'];
    } else {
        $category = false;
    }
    if ($category && get_module_pref($category, 'mysticalshop')) {
        $current_id = get_module_pref($category . 'id', 'mysticalshop');
        debug("Current ID is {$current_id}");
        require_once './modules/mysticalshop/lib.php';
        mysticalshop_destroyitem($category);
        mysticalshop_resetbuffs($current_id);
        require_once './modules/mysticalshop_buffs/stripbuff.php';
        mysticalshop_buffs_stripbuff();
        if ($category == 'armor') {
            $session['user']['defense'] = $defense;
        } else {
            $session['user']['attack'] = $attack;
        }
        debuglog('es_bridge_gp: ' . $category . ' (ID: ' . $current_id . ') item removed on action "' . $action . '".');
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:es_bridge_gp.php


示例10: friendlist_unignore

function friendlist_unignore()
{
    global $session;
    $ac = httpget('ac');
    $ignored = rexplode(get_module_pref('ignored', 'friendlist', $ac));
    $iveignored = rexplode(get_module_pref('iveignored'));
    if (in_array($ac, $iveignored)) {
        $sql = "SELECT name FROM " . db_prefix("accounts") . " WHERE acctid={$ac} AND locked=0";
        $result = db_query($sql);
        if (db_num_rows($result) > 0) {
            $row = db_fetch_assoc($result);
            $info = sprintf_translate("%s`Q has been removed from your list.", $row['name']);
            require_once "lib/systemmail.php";
            $t = array("`\$Ignore List Removal");
            $mailmessage = array("%s`0`@ has removed you from %s ignore list.", $session['user']['name'], $session['user']['sex'] ? translate_inline("her") : translate_inline("his"));
            systemmail($ac, $t, $mailmessage);
        } else {
            $info = translate_inline("That user no longer exists...");
        }
    }
    $ignored = array_diff($ignored, array($session['user']['acctid']));
    $ignored = rimplode($ignored);
    set_module_pref('ignored', $ignored, 'friendlist', $ac);
    if (in_array($ac, $iveignored)) {
        $iveignored = array_diff($iveignored, array($ac));
        $iveignored = rimplode($iveignored);
        set_module_pref('iveignored', $iveignored);
    }
    output_notl($info);
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:30,代码来源:friendlist_unignore.php


示例11: dwellings_run

function dwellings_run()
{
    checkday();
    page_header("Dwellings");
    global $session;
    $op = httpget("op");
    $dwid = httpget('dwid');
    $type = httpget('type');
    debug(get_module_pref("location_saver"));
    if ($type == "" && $dwid > 0) {
        $sql = "SELECT type FROM " . db_prefix("dwellings") . " WHERE dwid={$dwid}";
        $result = db_query($sql);
        $row = db_fetch_assoc($result);
        $type = $row['type'];
    }
    $cityid = httpget('cityid');
    require_once "modules/dwellings/run/case_{$op}.php";
    if ($op != "list" && $op != "") {
        addnav("Leave");
        addnav("Return to Hamlet", "runmodule.php?module=dwellings");
    } else {
        addnav("Navigation");
        villagenav();
    }
    page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:26,代码来源:dwellings.php


示例12: drunkard_runevent

function drunkard_runevent($type)
{
    global $session;
    require_once "lib/partner.php";
    $partner = get_partner();
    $chance = get_module_setting("spillchance");
    $roll = e_rand(1, 100);
    $seen = get_module_pref("seen");
    set_module_pref("seen", $seen + 1);
    output("`5A very drunk patron stumbles into you as you make your way across the crowded room.`n`n");
    if ($roll < $chance) {
        // He spills on you
        output("`5He is carrying a nearly full glass of ale.");
        output("As he collides with you, it spills all over your nearly clean clothes!");
        output("As you look up, you notice %s`5 watching you and become acutely embarrassed.", $partner);
        output("You notice %s`5 is trying to keep from laughing out loud at your mishap.", $partner);
        output("`n`n`&You `\$lose 1`& charm point.");
        if ($session['user']['charm'] > 0) {
            $session['user']['charm']--;
        }
    } else {
        // You're safe
        output("`5Fortunately his glass was already empty.");
        output("You escort him over to a chair where he can sit without running into everyone else.");
        output("As you stand up, you catch %s's`5 eye and receive a big smile for your kindness.", $partner);
        output("`n`n`&You gain `^1`& charm.");
        $session['user']['charm']++;
    }
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:29,代码来源:drunkard.php


示例13: friendlist_search

function friendlist_search()
{
    global $session;
    $n = httppost("n");
    rawoutput("<form action='runmodule.php?module=friendlist&op=search' method='POST'>");
    addnav("", "runmodule.php?module=friendlist&op=search");
    if ($n != "") {
        $string = "%";
        for ($x = 0; $x < strlen($n); $x++) {
            $string .= substr($n, $x, 1) . "%";
        }
        $sql = "SELECT name,dragonkills,acctid FROM " . db_prefix("accounts") . " WHERE name LIKE '%{$string}%' AND acctid<>" . $session['user']['acctid'] . " AND locked=0 ORDER BY level,dragonkills";
        $result = db_query($sql);
        if (db_num_rows($result) > 0) {
            $ignored = rexplode(get_module_pref('ignored'));
            $friends = rexplode(get_module_pref('friends'));
            $request = rexplode(get_module_pref('request'));
            $iveignored = rexplode(get_module_pref('iveignored'));
            output("`@These users were found:`n");
            rawoutput("<table style='width:60%;text-align:center;' cellpadding='3' cellspacing='0' border='0'>");
            rawoutput("<tr class='trhead'><td>" . translate_inline("Name") . "</td><td>" . translate_inline("Operations") . "</td></tr>");
            for ($i = 0; $i < db_num_rows($result); $i++) {
                $row = db_fetch_assoc($result);
                rawoutput("<tr class='" . ($i % 2 ? "trlight" : "trdark") . "'><td>");
                output_notl($row['name']);
                rawoutput("</td><td>");
                if (in_array($row['acctid'], $ignored)) {
                    $info = translate_inline("This user has ignored you.");
                    $info .= " [<a href='runmodule.php?module=friendlist&op=ignore&ac=" . $row['acctid'] . "' class='colDkGreen'>" . translate_inline("Ignore") . "</a>]";
                    addnav("", "runmodule.php?module=friendlist&op=ignore&ac=" . $row['acctid']);
                } elseif (in_array($row['acctid'], $friends)) {
                    $info = translate_inline("This user is already in your list.");
                } elseif (in_array($row['acctid'], $request)) {
                    $info = translate_inline("This user has already requested to you.");
                } else {
                    if (in_array($row['acctid'], $iveignored)) {
                        $info = "[<a href='runmodule.php?module=friendlist&op=unignore&ac=" . $row['acctid'] . "' class='colLtRed'>" . translate_inline("Unignore") . "</a>]";
                        addnav("", "runmodule.php?module=friendlist&op=unignore&ac=" . $row['acctid']);
                    } else {
                        $info = "[<a href='runmodule.php?module=friendlist&op=ignore&ac=" . $row['acctid'] . "' class='colDkGreen'>" . translate_inline("Ignore") . "</a>]";
                        addnav("", "runmodule.php?module=friendlist&op=ignore&ac=" . $row['acctid']);
                        $info .= " - [<a href='runmodule.php?module=friendlist&op=request&ac=" . $row['acctid'] . "' class='colDkGreen'>" . translate_inline("Request") . "</a>]";
                        addnav("", "runmodule.php?module=friendlist&op=request&ac=" . $row['acctid']);
                    }
                }
                rawoutput("{$info}</td></tr>");
            }
            rawoutput("</table>");
        } else {
            output("`c`@`bA user was not found with that name.`b`c");
        }
        output_notl("`n");
    }
    output("`^`b`cFriend Search...`c`b");
    output("`n`nWho do you want to search for?");
    output("`n`nName of user: ");
    rawoutput("<input name='n' maxlength='50' value=\"" . htmlentities(stripslashes(httppost('n'))) . "\">");
    $apply = translate_inline("Search");
    rawoutput("<input type='submit' class='button' value='{$apply}'></form>");
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:60,代码来源:friendlist_search.php


示例14: ekd_dohook

function ekd_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "biostat":
            $acctid = $args['acctid'];
            $sql = "SELECT dragonkills FROM " . db_prefix("accounts") . " WHERE acctid = {$acctid}";
            $result = db_fetch_assoc(db_query($sql));
            $tdk = $result['dragonkills'];
            $edk = get_module_pref("edks", "edk", $acctid);
            $cdk = $tdk - $edk;
            if ($edk > 1 && $tdk > 1) {
                output("Out of %s total Drive Kills, %s were Economic Drive Kills.`n", $tdk, $edk);
            } else {
                if ($edk == 1) {
                    output("This player has completed an Economic Drive Kill.`n");
                }
            }
            break;
        case "counciloffices":
            addnav("Ask about the Gun", "runmodule.php?module=edk&op=start");
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:25,代码来源:edk.php


示例15: maikopan_dohook

function maikopan_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "village":
            if (get_module_pref("plotpoint3a", "watcher_quests") && !get_module_pref("plotpoint1") && $session['user']['location'] == "Kittania") {
                output("`0You hear quite a commotion coming from Maiko's cookery school.  A clattering of pots and pans, and a hoarse, screeching voice: \"`i`%Where is it?  WHERE IS IT?!`i`0\"`n`nYou might want to check that out.`n`n");
                addnav($args['fightnav']);
                tlschema();
                blocknav("runmodule.php?module=meatschool&op=start");
                addnav("Maiko's Cookery Academy", "runmodule.php?module=maikopan&step=1");
            } else {
                if (get_module_pref("plotpoint1") && !get_module_pref("plotpoint2")) {
                    blocknav("runmodule.php?module=meatschool&op=start");
                }
            }
            break;
        case "pub_kittania":
            if (get_module_pref("plotpoint1") && !get_module_pref("plotpoint2")) {
                redirect("runmodule.php?module=maikopan&step=2");
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:25,代码来源:maikopan.php


示例16: hunterslodge_namedmount_dohook

function hunterslodge_namedmount_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "stable-mount":
            global $playermount;
            $name = get_module_pref("mountname");
            if (isset($playermount['mountname'])) {
                $playermount['basename'] = $playermount['mountname'];
                if ($name > "") {
                    $playermount['mountname'] = $name . " `0the " . $playermount['basename'] . "`0";
                    $playermount['newname'] = "{$name}`0";
                }
            }
            break;
        case "bio-mount":
            $name = get_module_pref("mountname", "hunterslodge_namedmount", $args['acctid']);
            if ($name != "") {
                //debug($name);
                if (isset($args['mountname'])) {
                    $args['basename'] = $args['mountname'];
                    if ($name > "") {
                        $args['mountname'] = $name . " `0the " . $args['basename'] . "`0";
                        $args['newname'] = "{$name}`0";
                    }
                }
            }
            break;
    }
    return $args;
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:hunterslodge_namedmount.php


示例17: asides_dohook

function asides_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "viewcommentary":
            $tloc = get_module_pref("loc", "commentaryinfo");
            $sloc = get_module_pref("loc", "commentaryinfo", $args['acctid']);
            break;
        case "commentaryoptions":
            if (!strpos($_SERVER['REQUEST_URI'], "char=" . $session['user']['acctid'] . "&")) {
                $link = "bio.php?char=" . $session['user']['acctid'] . "&ret=" . URLEncode($_SERVER['REQUEST_URI']);
                $total = get_module_pref("total");
                $seen = get_module_pref("seen");
                output("`n`n<a href=\"{$link}\">View my Bio</a>", true);
                if ($seen != $total) {
                    $new = $total - $seen;
                    if ($new == 1) {
                        output("(1 unread Natter)");
                    } else {
                        output("(%s unread Natters)", $new);
                    }
                }
                addnav("", $link);
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:28,代码来源:asides.php


示例18: commentaryicons_donation_dohook

function commentaryicons_donation_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "postcomment":
            $donation = $session['user']['donation'];
            if (get_module_pref("user_showmydonation")) {
                if ($donation >= 2000) {
                    $args['info']['icons']['donator'] = array('icon' => "images/icons/donator/donator3.png", 'mouseover' => "Extra-Awesome Site Supporter");
                } else {
                    if ($donation >= 1000) {
                        $args['info']['icons']['donator'] = array('icon' => "images/icons/donator/donator2.png", 'mouseover' => "Special Site Supporter");
                    } else {
                        if ($donation >= 100) {
                            $args['info']['icons']['donator'] = array('icon' => "images/icons/donator/donator1.png", 'mouseover' => "Site Supporter");
                        }
                    }
                }
            }
            break;
        case "commentbuffer":
            if (!get_module_pref("user_showdonations")) {
                foreach ($args as $line => $details) {
                    if (isset($details['info']['icons']['donator'])) {
                        unset($args[$line]['info']['icons']['donator']);
                    }
                }
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:32,代码来源:commentaryicons_donation.php


示例19: wcgpoints_supporterpoints_dohook

function wcgpoints_supporterpoints_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "wcgpoints_increased":
            if (get_module_pref("gotfirst")) {
                $session['user']['donation'] += 5;
                output("`5`bYou have five extra Supporter Points!`b  Thank you for contributing to humanitarian research.`0`n`n");
            } else {
                if (get_module_pref("runtime", "wcgpoints") > get_module_setting("initialrequirement")) {
                    $session['user']['donation'] += get_module_setting("initialreward");
                    require_once "lib/systemmail.php";
                    $subj = "You've got Supporter Points!";
                    $body = "As a thank-you for helping us to support humanitarian research via grid computing, we've given you 500 Supporter Points completely free of charge.  Thank you so much!  Remember that you'll get five extra Supporter Points every time your World Community Grid points increase (which is usually every 24 hours, if you let the client run regularly).  Have fun!";
                    systemmail($session['user']['acctid'], $subj, $body);
                    set_module_pref("gotfirst", true);
                }
            }
            break;
        case "wcg-features-desc":
            output("`bFree Supporter Points`b: After you've run the World Community Grid client for at least 24 hours (it doesn't have to be all at once - an hour here and an hour there will soon add up), you'll get 500 Supporter Points completely free of charge.  After that, you'll get 5 Supporter Points every time World Community Grid reports that your Cobblestones have increased.`n`n");
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:25,代码来源:wcgpoints_supporterpoints.php


示例20: commentaryicons_armour_dohook

function commentaryicons_armour_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "postcomment":
            if (get_module_pref("user_showmyarmour")) {
                $armourfilename = strtolower($session['user']['armor']);
                $armourfilename = strtr($armourfilename, " '-_.!+1234567890,", "                  ");
                $armourfilename = str_replace(" ", "", $armourfilename);
                $armourfilename = "images/icons/armour/" . $armourfilename . ".png";
                if (file_exists($armourfilename)) {
                    $armour = "<img src=\"" . $armourfilename . "\" alt=\"armour: " . $session['user']['armor'] . "\" title=\"armour: " . $session['user']['armor'] . "\">";
                    $args['info']['mouseover']['armour'] = "`n<img src=\"" . $armourfilename . "\">`n" . $session['user']['armor'] . "`n";
                } else {
                    $armour = "Armour: " . $session['user']['armor'];
                    $args['info']['mouseover']['armour'] = "`nArmour: " . $session['user']['armor'];
                }
                // $args['info']['icons']['armour']=array(
                // 'icon' => $armourfilename,
                // 'mouseover' => "armour: ".$session['user']['armor'],
                // );
            }
            break;
        case "commentbuffer":
            if (!get_module_pref("user_showarmour")) {
                foreach ($args as $line => $details) {
                    if (isset($details['info']['mouseover']['armour'])) {
                        unset($args[$line]['info']['mouseover']['armour']);
                    }
                }
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:35,代码来源:commentaryicons_armour.php



注:本文中的get_module_pref函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_module_setting函数代码示例发布时间:2022-05-15
下一篇:
PHP get_module_path函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap