MyBBDepo - Türkiyenin MyBB Deposu Forumuna Hoşgeldiniz
Eğer sitemize yaptığınız ilk ziyaretiniz ise, lütfen öncelikle Forum Kurallarını okuyunuz. Forumumuzda bilgi alışverişinde bulunabilmeniz için Kayıt olmalısınız. Üye olmayanlar forumumuzdan yararlanamazlar.
Eğer zaten kayıtlı kullanıcı iseniz, lütfen kullanıcı adınız ve şifreniz ile, Giriş yapınız. (Sitemize üyelik ücretsizdir).
bilwars2 avatar
Konuyu Oyla:
  • Derecelendirme: 0/5 - 0 oy
  • 1
  • 2
  • 3
  • 4
  • 5

Derecelendirme: 0/5 - 0 oy

Default Avatar ve Forum İkonları


Sponsor Reklam
media venus

Çevrimdışı bilwars2
 Tarih: 13-08-2012, Saat:15:34
(Son Düzenleme: 14-08-2012, Saat:14:17, Düzenleyen: bilwars2.)
#1
Siteme başlıkta belirttiğim bu 2 eklentiyi kurunca aşşağıdaki hatayı alıyorum. Yani kuramıyorum aktifleştir diyorum aşşağıdaki hata geliyo 2 eklentidede durum aynı bir türlü yapamadım buyrun hata ;

resim

Yardım ederseniz çok mutlu olurum.
Cevapla
Bunu Beğenenler:
Sponsor Reklam
sponsor reklam sponsor reklam

Çevrimdışı Remzilord22
 Tarih: 13-08-2012, Saat:16:02
#2
22 & 101 'İnci satırları kontrol et.
yazan .phpdekileri.
Cevapla
Bunu Beğenenler:

Çevrimdışı bilwars2
 Tarih: 13-08-2012, Saat:16:19
#3
Kontrol edip napcamki Açık Ağızlı Gülümseme
Cevapla
Bunu Beğenenler:

İzinli devmybb
 Tarih: 13-08-2012, Saat:16:51
(Son Düzenleme: 13-08-2012, Saat:16:52, Düzenleyen: devmybb.)
#4
inc/plugins içinde bulunan bu iki eklentinin içeriğini buraya code tagları içinde ayrı ayrı verebilirmisin?
Cevapla
Bunu Beğenenler:

Çevrimdışı bilwars2
 Tarih: 13-08-2012, Saat:17:07
#5
Buyrun Default Avatar ;

Kod:
<?php

/**
* MyBB 1.6
* Copyright 2010 MyBB Group, All Rights Reserved
*
* Default Avatar by Santiago Dimattia
* http://www.teleportz.com.ar
*
*/

if(!defined("IN_MYBB"))
{
    die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

$plugins->add_hook("member_do_register_end", "default_avatar_onsignup");
$plugins->add_hook("usercp_do_avatar_end", "default_avatar_onchange");
$plugins->add_hook("admin_config_settings_start", "default_avatar_update_current_users");

/**
* Plugin information
*
* @return bool
*/
function default_avatar_info()
{
    global $lang;

    $lang->load('default_avatar');
    
    $data = array(
            "name" => $lang->default_avatar_plugin_name,
            "description" => $lang->default_avatar_plugin_description,
            "website" => "http://mods.mybboard.net/view/default-avatar/",
            "author" => "Santiago Dimattia",
            "authorsite" => "http://teleportz.com.ar",
            "version" => "1.0",
            "guid" => "389824f8f3c7b9056bed9dc3ac0330da",
            "compatibility" => "16*"
        );
    
    $plugin_status = default_avatar_is_installed();

    if($plugin_status)
    {
        $data['description'] .= $lang->sprintf($lang->default_avatar_plugin_description_link, 'index.php?module=config&amp;defaultavatar=update_current_users');
    }
    
    return $data;
}

/**
* Install plugin
*
* @return bool
*/
function default_avatar_install()
{
    global $db, $lang;
    
    // Create settings
    $new_configs = array();
    
    $new_configs[] = array(
        'name' => 'default_avatar_url',
        'title' => $lang->default_avatar_setting_url,
        'description' => $lang->default_avatar_setting_url_description,
        'optionscode' => 'text',
        'value' => 'images/avatars/invalid_url.gif',
        'disporder' => 40,
        'gid' => '9'
    );
    
    $new_configs[] = array(
        'name' => 'default_avatar_width',
        'title' => $lang->default_avatar_setting_width,
        'description' => $lang->default_avatar_setting_width_description,
        'optionscode' => 'text',
        'value' => '84',
        'disporder' => 41,
        'gid' => '9'
    );
    
    $new_configs[] = array(
        'name' => 'default_avatar_height',
        'title' => $lang->default_avatar_setting_height,
        'description' => $lang->default_avatar_setting_height_description,
        'optionscode' => 'text',
        'value' => '84',
        'disporder' => 42,
        'gid' => '9'
    );
    
    foreach($new_configs as $key => $data)
    {
        $db->insert_query("settings", $data);
    }
    
    rebuild_settings();
    
    return TRUE;
}

/**
* Uninstall plugin
*
* @return bool
*/
function default_avatar_uninstall()
{
    global $db;
    
    $db->delete_query('settings', 'name = "default_avatar_url" OR name = "default_avatar_width" OR name = "default_avatar_height"');

    rebuild_settings();
    
    return TRUE;
}

/**
* Check if plugin is installed
*
* @return bool
*/
function default_avatar_is_installed()
{
    global $mybb;
    
    // If setting exists, plugin is installed
    if(isset($mybb->settings['default_avatar_url']))
    {
        return TRUE;
    }
    
    return FALSE;
}

/**
* Activate plugin
*
* @return bool
*/
function default_avatar_activate()
{
    // Delete "Delete Avatar" button
    require MYBB_ROOT . '/inc/adminfunctions_templates.php';

    find_replace_templatesets('usercp_avatar', '#' . preg_quote('<input type="submit" class="button" name="remove" value="{$lang->remove_avatar}" />') . '#', '<!-- DeleteAvatarButton -->');
    
    return TRUE;
}

/**
* Deactivate plugin
*
* @return bool
*/
function default_avatar_deactivate()
{
    // Add "Delete Avatar" button
    require MYBB_ROOT . '/inc/adminfunctions_templates.php';

    find_replace_templatesets('usercp_avatar', '#<!--\sDeleteAvatarButton\s--\>#is', '<input type="submit" class="button" name="remove" value="{$lang->remove_avatar}" />', 0);
    return TRUE;
}

/**
* Set a default avatar to all users
*
* @return bool
*/
function default_avatar_update_current_users()
{
    global $mybb, $db, $lang;
    
    $plugin_status = default_avatar_is_installed();
    
    if($mybb->input['defaultavatar'] == 'update_current_users' && $plugin_status)
    {
        $lang->load('default_avatar');
        
        $set_avatar = get_default_avatar_data();
        $db->update_query('users', $set_avatar, 'avatar = "" OR avatar = "images/avatars/clear_avatar.gif"');
        
        flash_message($lang->default_avatar_message_all_users_updated, 'success');
        admin_redirect('index.php?module=config-plugins');
        
        return TRUE;
    }
    
    return FALSE;
}

/**
* Set default avatar on signup
*
* @return bool
*/
function default_avatar_onsignup()
{
    global $mybb, $db, $user_info;
    
    $set_avatar = get_default_avatar_data();
    
    $db->update_query('users', $set_avatar, 'uid = ' . $user_info['uid']);
    
    return true;
}

/**
* Set default avatar when the user delete his current avatar
*
* @return bool
*/
function default_avatar_onchange()
{
    global $mybb, $db;
    
    if($mybb->input['remove'] OR ($mybb->input['gallery'] && $mybb->input['avatar'] == 'clear_avatar.gif'))
    {
        $set_avatar = get_default_avatar_data();
        
        $db->update_query('users', $set_avatar, 'uid = ' . $mybb->user['uid']);
    }
    
    return true;
}

/**
* Get default avatar data from MyBB Settings
*
* @return array Avatar data
*/
function get_default_avatar_data()
{
    global $mybb;
    
    $avatar = array(
        'avatar' => $mybb->settings['default_avatar_url'],
        'avatardimensions' => $mybb->settings['default_avatar_width'] . '|' . $mybb->settings['default_avatar_height'],
        'avatartype' => 'remote'
    );
    
    return $avatar;
}

Buyrun Forum İkonları;

Kod:
<?php

/**
* PL9 Forum Icons 1.0
*
* Copyright © 2009 Project Level 9, All Rights Reserved
*
* Website: http://www.projectlevel9.com
* Forum: http://forums.projectlevel9.com
* PHPTPL PROVIDED BY YUMI OF MYBBOARD.NET COPYRIGHT YUMI 2008 - 2009
*/

if(!defined("IN_MYBB"))

    die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
// BEGIN PHPTPL PROVIDED BY YUMI OF MYBBOARD.NET COPYRIGHT YUMI 2009
    if(!defined('IN_ADMINCP'))
{
    // gain control of $templates object
    
    eval('
        class phptpl_templates extends '.get_class($GLOBALS['templates']).'
        {
            function phptpl_templates(&$oldtpl)
            {
                $vars = get_object_vars($oldtpl);
                foreach($vars as $var => $val)
                    $this->$var = $val;
                
                $this->def_htmlcomments = $GLOBALS[\'mybb\']->settings[\'tplhtmlcomments\'];
                $this->def_htmlcomments = (($this->def_htmlcomments == \'yes\' || $this->def_htmlcomments == 1) ? 1:0);
            }
            function get($title, $eslashes=1, $htmlcomments=1)
            {
                if($eslashes && $this->def_htmlcomments == $htmlcomments)
                {
                    if(!isset($this->parsed_cache[$title]))
                    {
                        $this->parsed_cache[$title] = parent::get($title, $eslashes, $htmlcomments);
                        // parse the template
                        phptpl_parsetpl($this->parsed_cache[$title]);
                    }
                    
                    return $this->parsed_cache[$title];
                }
                else
                    return parent::get($title, $eslashes, $htmlcomments);
            }
        }
    ');
    $GLOBALS['templates'] = new phptpl_templates($GLOBALS['templates']);
}
// END PHPTPL PROVIDED BY YUMI OF MYBBOARD.NET COPYRIGHT YUMI 2009

function pl9forumicons_info()
{
    global $lang;
    
    $lang->load("forum_pl9forumicons");

    return array(
        "name"          => $lang->pl9_forum_icons,
        "description"   => $lang->pl9_forum_icons_desc,
        "website"       => "http://destek.mybb.com.tr",
        "author"        => "Steve Moore",
        "authorsite"    => "http://www.projectlevel9.com",
        "version"       => "1.1",
        "guid"             => "33a4ae3af077c412cb29c9bb578c826d",
        "compatibility" => "14*, 16*"
    );
}

// BEGIN PHPTPL PROVIDED BY YUMI OF MYBBOARD.NET COPYRIGHT YUMI 2009
function phptpl_parsetpl(&$ourtpl)
{
    $ourtpl = preg_replace(array(
        '#\<\?.+?(\?\>)#se', // '#\<\?.*?(\?\>|$)#se',
        '#\<if (.*?) then\>#sie',
        '#\<elseif (.*?) then\>#sie',
        '#\<else( /)?\>#i',
        '#\</if\>#i',
        '#\<func (htmlspecialchars|htmlspecialchars_uni|intval|file_get_contents|floatval|urlencode|rawurlencode|addslashes|stripslashes|trim|crc32|ltrim|rtrim|md5|nl2br|sha1|strrev|strtoupper|strtolower|my_strtoupper|my_strtolower|alt_trow|get_friendly_size|filesize|strlen|my_strlen|my_wordwrap|random_str|unicode_chr)\>#i',
        '#\</func\>#i'
    ), array(
        'phptpl_evalphp(\'$0\', \'$1\')',
        '\'".phptpl_iif(\'.phptpl_unescape_string(\'$1\').\',"\'',
        '\'",\'.phptpl_unescape_string(\'$1\').\',"\'',
        '","',
        '")."',
        '".$1("',
        '")."'
    ), $ourtpl);
}

function phptpl_unescape_string($str)
{
    return strtr($str, array('\\\\"' => '"', '\\\\' => '\\'));
}

function phptpl_evalphp($str, $end)
{
    return '".eval(\'ob_start(); ?>'
        .strtr(phptpl_unescape_string($str), array('\'' => '\\\'', '\\' => '\\\\'))
        .($end?'':'?>').'<?php return ob_get_clean();\')."';
}

function phptpl_iif($condition, $true)
{
    $args = func_get_args();
    for($i=1, $c=count($args); $i<$c; $i+=2)
        if($args[$i-1]) return $args[$i];
    return (isset($args[$i-1]) ? $args[$i-1] : '');
}
// END PHPTPL PROVIDED BY YUMI OF MYBBOARD.NET COPYRIGHT YUMI 2009

function pl9forumicons_install()
{
    global $mybb, $db;

    $db->write_query("ALTER TABLE `". TABLE_PREFIX . "forums` ADD `forum_icon` VARCHAR( 155 ) NOT NULL");

    global $db, $mybb;

     $group = array(
        "gid"            => "NULL",
        "title"          => "PL9 Forum İkonları",
        "name"           => "pl9forumicons",
        "description"    => "Forum İkonları Plugin Ayarları.",
        "disporder"      => "0",
        "isdefault"      => "no",
    );
    
    $db->insert_query("settinggroups", $group);
    $gid = $db->insert_id(); //This will get the id of the just added record in the db
    
    
    $setting_1 = array(
        "sid"            => "NULL",
        "name"           => "enable_pl9ForumIcons",
        "title"          => "Forum İkonları Aktifleştirilsin mi?",
        "description"    => "Forum İkonlarını aktif etmek istiyorsanız aşağıdaki seçeneklerden <b>Evet</b>\'i seçiniz.",
        "optionscode"    => "yesno",
        "value"          => 'yes',
        "disporder"      => '1',
        "gid"            => intval($gid),
    );

    $db->insert_query("settings", $setting_1);
    rebuild_settings();
}

function pl9forumicons_is_installed()
{
    global $mybb, $db;

    return $db->field_exists("forum_icon", "forums");
}

function pl9forumicons_uninstall()
{
    global $db, $mybb;

    $db->write_query("ALTER TABLE `". TABLE_PREFIX . "forums` DROP `forum_icon`");

    $db->query("DELETE FROM ".TABLE_PREFIX."settings WHERE name='enable_pl9ForumIcons'");
    $db->query("DELETE FROM ".TABLE_PREFIX."settinggroups WHERE name='pl9forumicons'");
    rebuild_settings();
}

//All the activation processes go here
function pl9forumicons_activate()
{
    require MYBB_ROOT.'/inc/adminfunctions_templates.php';
    find_replace_templatesets("forumbit_depth2_forum", '#'.preg_quote('<img src="{$theme[\'imgdir\']}/{$lightbulb[\'folder\']}.gif" alt="{$lightbulb[\'altonoff\']}" title="{$lightbulb[\'altonoff\']}" class="ajax_mark_read" id="mark_read_{$forum[\'fid\']}" />').'#' , '<if $mybb->settings[\'enable_pl9ForumIcons\'] then><if $forum[\'forum_icon\'] then><img src="{$forum[\'forum_icon\']}" alt="{$lightbulb[\'altonoff\']}" title="{$lightbulb[\'altonoff\']}" class="ajax_mark_read" id="mark_read_{$forum[\'fid\']}" /><else /><img src="{$theme[\'imgdir\']}/{$lightbulb[\'folder\']}.gif" alt="{$lightbulb[\'altonoff\']}" title="{$lightbulb[\'altonoff\']}" class="ajax_mark_read" id="mark_read_{$forum[\'fid\']}" /></if><else /><img src="{$theme[\'imgdir\']}/{$lightbulb[\'folder\']}.gif" alt="{$lightbulb[\'altonoff\']}" title="{$lightbulb[\'altonoff\']}" class="ajax_mark_read" id="mark_read_{$forum[\'fid\']}" /></if>');
}

//All deactivation processes go here
function pl9forumicons_deactivate()
{
    require MYBB_ROOT.'/inc/adminfunctions_templates.php';
    find_replace_templatesets("forumbit_depth2_forum", '#'.preg_quote('<if $mybb->settings[\'enable_pl9ForumIcons\'] then><if $forum[\'forum_icon\'] then><img src="{$forum[\'forum_icon\']}" alt="{$lightbulb[\'altonoff\']}" title="{$lightbulb[\'altonoff\']}" class="ajax_mark_read" id="mark_read_{$forum[\'fid\']}" /><else /><img src="{$theme[\'imgdir\']}/{$lightbulb[\'folder\']}.gif" alt="{$lightbulb[\'altonoff\']}" title="{$lightbulb[\'altonoff\']}" class="ajax_mark_read" id="mark_read_{$forum[\'fid\']}" /></if><else /><img src="{$theme[\'imgdir\']}/{$lightbulb[\'folder\']}.gif" alt="{$lightbulb[\'altonoff\']}" title="{$lightbulb[\'altonoff\']}" class="ajax_mark_read" id="mark_read_{$forum[\'fid\']}" /></if>').'#s' , '<img src="{$theme[\'imgdir\']}/{$lightbulb[\'folder\']}.gif" alt="{$lightbulb[\'altonoff\']}" title="{$lightbulb[\'altonoff\']}" class="ajax_mark_read" id="mark_read_{$forum[\'fid\']}" />',0);
}
?>
Cevapla
Bunu Beğenenler:

İzinli devmybb
 Tarih: 13-08-2012, Saat:17:15
(Son Düzenleme: 13-08-2012, Saat:17:15, Düzenleyen: devmybb.)
#6
Eklediklerimi komple eklenti içeriğiyle değiştir.

Default Avatar
Kod:
<?php

/**
* MyBB 1.6
* Copyright 2010 MyBB Group, All Rights Reserved
*
* Default Avatar by Santiago Dimattia
* http://www.teleportz.com.ar
*
*/

if(!defined("IN_MYBB"))
{
    die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

$plugins->add_hook("member_do_register_end", "default_avatar_onsignup");
$plugins->add_hook("usercp_do_avatar_end", "default_avatar_onchange");
$plugins->add_hook("admin_config_settings_start", "default_avatar_update_current_users");

/**
* Plugin information
*
* @return bool
*/
function default_avatar_info()
{
    global $lang;

    $lang->load('default_avatar');
    
    $data = array(
            "name" => $lang->default_avatar_plugin_name,
            "description" => $lang->default_avatar_plugin_description,
            "website" => "http://mods.mybboard.net/view/default-avatar/",
            "author" => "Santiago Dimattia",
            "authorsite" => "http://teleportz.com.ar",
            "version" => "1.0",
            "guid" => "389824f8f3c7b9056bed9dc3ac0330da",
            "compatibility" => "16*"
        );
    
    $plugin_status = default_avatar_is_installed();

    if($plugin_status)
    {
        $data['description'] .= $lang->sprintf($lang->default_avatar_plugin_description_link, 'index.php?module=config&amp;defaultavatar=update_current_users');
    }
    
    return $data;
}

/**
* Install plugin
*
* @return bool
*/
function default_avatar_install()
{
    global $db, $lang;
    
    // Create settings
    $new_configs = array();
    
    $new_configs[] = array(
        'name' => 'default_avatar_url',
        'title' => $lang->default_avatar_setting_url,
        'description' => $lang->default_avatar_setting_url_description,
        'optionscode' => 'text',
        'value' => 'images/avatars/invalid_url.gif',
        'disporder' => 40,
        'gid' => '9'
    );
    
    $new_configs[] = array(
        'name' => 'default_avatar_width',
        'title' => $lang->default_avatar_setting_width,
        'description' => $lang->default_avatar_setting_width_description,
        'optionscode' => 'text',
        'value' => '84',
        'disporder' => 41,
        'gid' => '9'
    );
    
    $new_configs[] = array(
        'name' => 'default_avatar_height',
        'title' => $lang->default_avatar_setting_height,
        'description' => $lang->default_avatar_setting_height_description,
        'optionscode' => 'text',
        'value' => '84',
        'disporder' => 42,
        'gid' => '9'
    );
    
    foreach($new_configs as $key => $data)
    {
        $db->insert_query("settings", $data);
    }
    
    rebuild_settings();
    
    return TRUE;
}

/**
* Uninstall plugin
*
* @return bool
*/
function default_avatar_uninstall()
{
    global $db;
    
    $db->delete_query('settings', 'name = "default_avatar_url" OR name = "default_avatar_width" OR name = "default_avatar_height"');

    rebuild_settings();
    
    return TRUE;
}

/**
* Check if plugin is installed
*
* @return bool
*/
function default_avatar_is_installed()
{
    global $mybb;
    
    // If setting exists, plugin is installed
    if(isset($mybb->settings['default_avatar_url']))
    {
        return TRUE;
    }
    
    return FALSE;
}

/**
* Activate plugin
*
* @return bool
*/
function default_avatar_activate()
{
    // Delete "Delete Avatar" button
    require_once MYBB_ROOT . '/inc/adminfunctions_templates.php';

    find_replace_templatesets('usercp_avatar', '#' . preg_quote('<input type="submit" class="button" name="remove" value="{$lang->remove_avatar}" />') . '#', '<!-- DeleteAvatarButton -->');
    
    return TRUE;
}

/**
* Deactivate plugin
*
* @return bool
*/
function default_avatar_deactivate()
{
    // Add "Delete Avatar" button
    require_once MYBB_ROOT . '/inc/adminfunctions_templates.php';

    find_replace_templatesets('usercp_avatar', '#<!--\sDeleteAvatarButton\s--\>#is', '<input type="submit" class="button" name="remove" value="{$lang->remove_avatar}" />', 0);
    return TRUE;
}

/**
* Set a default avatar to all users
*
* @return bool
*/
function default_avatar_update_current_users()
{
    global $mybb, $db, $lang;
    
    $plugin_status = default_avatar_is_installed();
    
    if($mybb->input['defaultavatar'] == 'update_current_users' && $plugin_status)
    {
        $lang->load('default_avatar');
        
        $set_avatar = get_default_avatar_data();
        $db->update_query('users', $set_avatar, 'avatar = "" OR avatar = "images/avatars/clear_avatar.gif"');
        
        flash_message($lang->default_avatar_message_all_users_updated, 'success');
        admin_redirect('index.php?module=config-plugins');
        
        return TRUE;
    }
    
    return FALSE;
}

/**
* Set default avatar on signup
*
* @return bool
*/
function default_avatar_onsignup()
{
    global $mybb, $db, $user_info;
    
    $set_avatar = get_default_avatar_data();
    
    $db->update_query('users', $set_avatar, 'uid = ' . $user_info['uid']);
    
    return true;
}

/**
* Set default avatar when the user delete his current avatar
*
* @return bool
*/
function default_avatar_onchange()
{
    global $mybb, $db;
    
    if($mybb->input['remove'] OR ($mybb->input['gallery'] && $mybb->input['avatar'] == 'clear_avatar.gif'))
    {
        $set_avatar = get_default_avatar_data();
        
        $db->update_query('users', $set_avatar, 'uid = ' . $mybb->user['uid']);
    }
    
    return true;
}

/**
* Get default avatar data from MyBB Settings
*
* @return array Avatar data
*/
function get_default_avatar_data()
{
    global $mybb;
    
    $avatar = array(
        'avatar' => $mybb->settings['default_avatar_url'],
        'avatardimensions' => $mybb->settings['default_avatar_width'] . '|' . $mybb->settings['default_avatar_height'],
        'avatartype' => 'remote'
    );
    
    return $avatar;
}

Forum İkonları
Kod:
<?php

/**
* PL9 Forum Icons 1.0
*
* Copyright © 2009 Project Level 9, All Rights Reserved
*
* Website: http://www.projectlevel9.com
* Forum: http://forums.projectlevel9.com
* PHPTPL PROVIDED BY YUMI OF MYBBOARD.NET COPYRIGHT YUMI 2008 - 2009
*/

if(!defined("IN_MYBB"))

    die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
// BEGIN PHPTPL PROVIDED BY YUMI OF MYBBOARD.NET COPYRIGHT YUMI 2009
    if(!defined('IN_ADMINCP'))
{
    // gain control of $templates object
    
    eval('
        class phptpl_templates extends '.get_class($GLOBALS['templates']).'
        {
            function phptpl_templates(&$oldtpl)
            {
                $vars = get_object_vars($oldtpl);
                foreach($vars as $var => $val)
                    $this->$var = $val;
                
                $this->def_htmlcomments = $GLOBALS[\'mybb\']->settings[\'tplhtmlcomments\'];
                $this->def_htmlcomments = (($this->def_htmlcomments == \'yes\' || $this->def_htmlcomments == 1) ? 1:0);
            }
            function get($title, $eslashes=1, $htmlcomments=1)
            {
                if($eslashes && $this->def_htmlcomments == $htmlcomments)
                {
                    if(!isset($this->parsed_cache[$title]))
                    {
                        $this->parsed_cache[$title] = parent::get($title, $eslashes, $htmlcomments);
                        // parse the template
                        phptpl_parsetpl($this->parsed_cache[$title]);
                    }
                    
                    return $this->parsed_cache[$title];
                }
                else
                    return parent::get($title, $eslashes, $htmlcomments);
            }
        }
    ');
    $GLOBALS['templates'] = new phptpl_templates($GLOBALS['templates']);
}
// END PHPTPL PROVIDED BY YUMI OF MYBBOARD.NET COPYRIGHT YUMI 2009

function pl9forumicons_info()
{
    global $lang;
    
    $lang->load("forum_pl9forumicons");

    return array(
        "name"          => $lang->pl9_forum_icons,
        "description"   => $lang->pl9_forum_icons_desc,
        "website"       => "http://forums.projectlevel9.com",
        "author"        => "Steve Moore",
        "authorsite"    => "http://www.projectlevel9.com",
        "version"       => "1.1",
        "guid"             => "33a4ae3af077c412cb29c9bb578c826d",
        "compatibility" => "16*"
    );
}

// BEGIN PHPTPL PROVIDED BY YUMI OF MYBBOARD.NET COPYRIGHT YUMI 2009
function phptpl_parsetpl(&$ourtpl)
{
    $ourtpl = preg_replace(array(
        '#\<\?.+?(\?\>)#se', // '#\<\?.*?(\?\>|$)#se',
        '#\<if (.*?) then\>#sie',
        '#\<elseif (.*?) then\>#sie',
        '#\<else( /)?\>#i',
        '#\</if\>#i',
        '#\<func (htmlspecialchars|htmlspecialchars_uni|intval|file_get_contents|floatval|urlencode|rawurlencode|addslashes|stripslashes|trim|crc32|ltrim|rtrim|md5|nl2br|sha1|strrev|strtoupper|strtolower|my_strtoupper|my_strtolower|alt_trow|get_friendly_size|filesize|strlen|my_strlen|my_wordwrap|random_str|unicode_chr)\>#i',
        '#\</func\>#i'
    ), array(
        'phptpl_evalphp(\'$0\', \'$1\')',
        '\'".phptpl_iif(\'.phptpl_unescape_string(\'$1\').\',"\'',
        '\'",\'.phptpl_unescape_string(\'$1\').\',"\'',
        '","',
        '")."',
        '".$1("',
        '")."'
    ), $ourtpl);
}

function phptpl_unescape_string(&$str)
{
    return strtr($str, array('\\\\"' => '"', '\\\\' => '\\'));
}

function phptpl_evalphp(&$str, &$end)
{
    return '".eval(\'ob_start(); ?>'
        .strtr(phptpl_unescape_string($str), array('\'' => '\\\'', '\\' => '\\\\'))
        .($end?'':'?>').'<?php return ob_get_clean();\')."';
}

function phptpl_iif(&$condition, &$true)
{
    $args = func_get_args();
    for($i=1, $c=count($args); $i<$c; $i+=2)
        if($args[$i-1]) return $args[$i];
    return (isset($args[$i-1]) ? $args[$i-1] : '');
}
// END PHPTPL PROVIDED BY YUMI OF MYBBOARD.NET COPYRIGHT YUMI 2009

function pl9forumicons_install()
{
    global $mybb, $db;

    $db->write_query("ALTER TABLE `". TABLE_PREFIX . "forums` ADD `forum_icon` VARCHAR( 155 ) NOT NULL");

    global $db, $mybb;

     $group = array(
        "gid"            => "NULL",
        "title"          => "PL9 Forum İkonları",
        "name"           => "pl9forumicons",
        "description"    => "PL9 Forum İkon Ayarları.",
        "disporder"      => "1",
        "isdefault"      => "no",
    );
    
    $db->insert_query("settinggroups", $group);
    $gid = $db->insert_id(); //This will get the id of the just added record in the db
    
    
    $setting_1 = array(
        "sid"            => "NULL",
        "name"           => "enable_pl9ForumIcons",
        "title"          => "PL9 Forum İkonları Aktifleştirme",
        "description"    => "PL9 Forum İkonları Açık/Kapalı?",
        "optionscode"    => "yesno",
        "value"          => 'yes',
        "disporder"      => '1',
        "gid"            => intval($gid),
    );

    $db->insert_query("settings", $setting_1);
    rebuild_settings();
}

function pl9forumicons_is_installed()
{
    global $mybb, $db;

    return $db->field_exists("forum_icon", "forums");
}

function pl9forumicons_uninstall()
{
    global $db, $mybb;

    $db->write_query("ALTER TABLE `". TABLE_PREFIX . "forums` DROP `forum_icon`");

    $db->query("DELETE FROM ".TABLE_PREFIX."settings WHERE name='enable_pl9ForumIcons'");
    $db->query("DELETE FROM ".TABLE_PREFIX."settinggroups WHERE name='pl9forumicons'");
    rebuild_settings();
}

//All the activation processes go here
function pl9forumicons_activate()
{
    require_once MYBB_ROOT.'/inc/adminfunctions_templates.php';
    find_replace_templatesets("forumbit_depth2_forum", '#'.preg_quote('<img src="{$theme[\'imgdir\']}/{$lightbulb[\'folder\']}.gif" alt="{$lightbulb[\'altonoff\']}" title="{$lightbulb[\'altonoff\']}" class="ajax_mark_read" id="mark_read_{$forum[\'fid\']}" />').'#' , '<if $mybb->settings[\'enable_pl9ForumIcons\'] then><if $forum[\'forum_icon\'] then><img src="{$forum[\'forum_icon\']}" alt="{$lightbulb[\'altonoff\']}" title="{$lightbulb[\'altonoff\']}" class="ajax_mark_read" id="mark_read_{$forum[\'fid\']}" /><else /><img src="{$theme[\'imgdir\']}/{$lightbulb[\'folder\']}.gif" alt="{$lightbulb[\'altonoff\']}" title="{$lightbulb[\'altonoff\']}" class="ajax_mark_read" id="mark_read_{$forum[\'fid\']}" /></if><else /><img src="{$theme[\'imgdir\']}/{$lightbulb[\'folder\']}.gif" alt="{$lightbulb[\'altonoff\']}" title="{$lightbulb[\'altonoff\']}" class="ajax_mark_read" id="mark_read_{$forum[\'fid\']}" /></if>');
}

//All deactivation processes go here
function pl9forumicons_deactivate()
{
    require_once MYBB_ROOT.'/inc/adminfunctions_templates.php';
    find_replace_templatesets("forumbit_depth2_forum", '#'.preg_quote('<if $mybb->settings[\'enable_pl9ForumIcons\'] then><if $forum[\'forum_icon\'] then><img src="{$forum[\'forum_icon\']}" alt="{$lightbulb[\'altonoff\']}" title="{$lightbulb[\'altonoff\']}" class="ajax_mark_read" id="mark_read_{$forum[\'fid\']}" /><else /><img src="{$theme[\'imgdir\']}/{$lightbulb[\'folder\']}.gif" alt="{$lightbulb[\'altonoff\']}" title="{$lightbulb[\'altonoff\']}" class="ajax_mark_read" id="mark_read_{$forum[\'fid\']}" /></if><else /><img src="{$theme[\'imgdir\']}/{$lightbulb[\'folder\']}.gif" alt="{$lightbulb[\'altonoff\']}" title="{$lightbulb[\'altonoff\']}" class="ajax_mark_read" id="mark_read_{$forum[\'fid\']}" /></if>').'#s' , '<img src="{$theme[\'imgdir\']}/{$lightbulb[\'folder\']}.gif" alt="{$lightbulb[\'altonoff\']}" title="{$lightbulb[\'altonoff\']}" class="ajax_mark_read" id="mark_read_{$forum[\'fid\']}" />',0);
}
?>
Cevapla
Bunu Beğenenler: devrim

Çevrimdışı bilwars2
 Tarih: 13-08-2012, Saat:17:19
(Son Düzenleme: 13-08-2012, Saat:17:23, Düzenleyen: bilwars2.)
#7
Allah Senden Razı olsun. Siteyi Silip Tekrar Kurucaktım Az Daha Açık Ağızlı Gülümseme

Bu arada yetkililer konuyu kitleyebilirler arşiv felan varsa kaldırın belki benim gibi biri daha gelir konudan yararlanır!
Cevapla
Bunu Beğenenler:

İzinli devmybb
 Tarih: 13-08-2012, Saat:17:25
(Son Düzenleme: 13-08-2012, Saat:17:26, Düzenleyen: devmybb.)
#8
MyBB de bazı fonksiyonlar değiştiği için, Önceden yazılan bu eklentilerde de bazı değişiklikler yapılmak zorunda. Bu değişiklikler yapılmadığı taktirde bazı sunucularda hata verir.

Örneklerden sadece birisi: require fonksiyonu require_once şeklinde değiştirilmesi gerekir.
Geçmiş olsun..
Cevapla
Bunu Beğenenler:

 


Konu ile Alakalı Benzer Konular
Konular Yazar Yorumlar Okunma Son Yorum
  Avatar Çerçevesi İstek Corleone 4 440 21-02-2016, Saat:14:07
Son Yorum: Pheky
  Shoutbox'da avatar qorkew 10 1,769 31-03-2015, Saat:00:22
Son Yorum: bursabrs
  Mybb Forum İzinleri yardım beddua01 13 2,845 22-03-2015, Saat:12:44
Son Yorum: Hasanymkz
  Forum Spam Engelleme aloneking 2 864 11-03-2014, Saat:18:27
Son Yorum: 1st4n6uL
  [1.6] İlk/Son Mesaj Avatar Hatası Batuhan5 0 893 26-10-2013, Saat:18:02
Son Yorum: Batuhan5



Konuyu Okuyanlar: 1 Ziyaretçi