MyBB Community Forums

Full Version: Add to Ignore List template
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi,
Can you tell me in which template the following parts are located?
AdminCP -> Templates & Style -> Templates -> Your Theme's Templates -> Member Templates -> member_profile

It's:
{$buddy_options}

It's hardcoded in member.php:

http://dev.mybb.com/issues/1469

Line 2010 - 2031:
      if($mybb->user['uid'] != $memprofile['uid'] && $mybb->user['uid'] != 0)
      {
          $buddy_list = explode(',', $mybb->user['buddylist']);
          if(in_array($mybb->input['uid'], $buddy_list))
          {
              $buddy_options = "<br /><a href=\"./usercp.php?action=do_editlists&amp;delete={$mybb->input['uid']}&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/remove_buddy.gif\" alt=\"{$lang->remove_from_buddy_list}\" /> {$lang->remove_from_buddy_list}</a>";
          }
         else
          {
             $buddy_options = "<br /><a href=\"./usercp.php?action=do_editlists&amp;add_username=".urlencode($memprofile['username'])."&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/add_buddy.gif\" alt=\"{$lang->add_to_buddy_list}\" /> {$lang->add_to_buddy_list}</a>";
          }
  
          $ignore_list = explode(',', $mybb->user['ignorelist']);
          if(in_array($mybb->input['uid'], $ignore_list))
          {
              $buddy_options .= "<br /><a href=\"./usercp.php?action=do_editlists&amp;manage=ignored&amp;delete={$mybb->input['uid']}&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/remove_ignore.gif\" alt=\"{$lang->remove_from_ignore_list}\" /> {$lang->remove_from_ignore_list}</a>";
          }
          else
          {
              $buddy_options .= "<br /><a href=\"./usercp.php?action=do_editlists&amp;manage=ignored&amp;add_username=".urlencode($memprofile['username'])."&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/add_ignore.gif\" alt=\"{$lang->add_to_ignore_list}\" /> {$lang->add_to_ignore_list}</a>";
          }
      }
TNKs and where is member.php?
It's a core file in your root directory (where you installed MyBB). Smile
ok, but can i access to these codes from "Templates & Style" section?
You can't access this in templates:

if($mybb->user['uid'] != $memprofile['uid'] && $mybb->user['uid'] != 0)
      {
          $buddy_list = explode(',', $mybb->user['buddylist']);
          if(in_array($mybb->input['uid'], $buddy_list))
          {
              $buddy_options = "<br /><a href=\"./usercp.php?action=do_editlists&amp;delete={$mybb->input['uid']}&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/remove_buddy.gif\" alt=\"{$lang->remove_from_buddy_list}\" /> {$lang->remove_from_buddy_list}</a>";
          }
         else
          {
             $buddy_options = "<br /><a href=\"./usercp.php?action=do_editlists&amp;add_username=".urlencode($memprofile['username'])."&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/add_buddy.gif\" alt=\"{$lang->add_to_buddy_list}\" /> {$lang->add_to_buddy_list}</a>";
          }
  
          $ignore_list = explode(',', $mybb->user['ignorelist']);
          if(in_array($mybb->input['uid'], $ignore_list))
          {
              $buddy_options .= "<br /><a href=\"./usercp.php?action=do_editlists&amp;manage=ignored&amp;delete={$mybb->input['uid']}&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/remove_ignore.gif\" alt=\"{$lang->remove_from_ignore_list}\" /> {$lang->remove_from_ignore_list}</a>";
          }
          else
          {
              $buddy_options .= "<br /><a href=\"./usercp.php?action=do_editlists&amp;manage=ignored&amp;add_username=".urlencode($memprofile['username'])."&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/add_ignore.gif\" alt=\"{$lang->add_to_ignore_list}\" /> {$lang->add_to_ignore_list}</a>";
          }
      }

It'd require you editing the member.php file directly. Smile
Thanks very muchHeartHeartHeart

+1 Sweet reputation