Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

User_Info_Panel modding help

Asked Modified Viewed 3,317 times
M
mattish91
M
Great regards Mattish91
  • Junior Member, joined since
  • Contributed 43 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
asked
Junior Member

Hello, i simply would like to add som links in the User_Info_Panel, the thing is that these link's should only show in some cases

like the navigation panel does, it adds the "Submit" links and i would like to have those links in the User_Info_Panel instead, in that way i can remove the Navigation links panel completly.

Thanks in advance.
0 replies

5 posts

C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Your welcome man!!! :)
0 replies
M
mattish91
M
Great regards Mattish91
  • Junior Member, joined since
  • Contributed 43 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
answered
Junior Member

Quote

Jib wrote:

Try this, it will hide the navigation part when in admin.

removed


Thanks :D this works just great! :)
Edited by PolarFox on 06-02-2014 07:38,
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Try this, it will hide the navigation part when in admin.

<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| Filename: user_info_panel.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licen... Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }

if (iMEMBER) {
   $msg_count = dbcount("(message_id)", DB_MESSAGES, "message_to='".$userdata['user_id']."' AND message_read='0' AND message_folder='0'");

   openside($userdata['user_name']);
   echo THEME_BULLET." <a href='".BASEDIR."edit_profile.php' class='side'>".$locale['global_120']."</a><br />\n";
   echo THEME_BULLET." <a href='".BASEDIR."messages.php' class='side'>".$locale['global_121']."</a><br />\n";
   echo THEME_BULLET." <a href='".BASEDIR."members.php' class='side'>".$locale['global_122']."</a><br />\n";

   if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
      echo THEME_BULLET." <a href='".ADMIN."index.php".$aidlink."' class='side'>".$locale['global_123']."</a><br />\n";
   }

   echo THEME_BULLET." <a href='".BASEDIR."index.php?logout=yes' class='side'>".$locale['global_124']."</a>\n";

   if ($msg_count) {
      echo "<div style='text-align:center;margin-top:15px;'>\n";
      echo "<strong><a href='".BASEDIR."messages.php' class='side'>".sprintf($locale['global_125'], $msg_count);
      echo ($msg_count == 1 ? $locale['global_126'] : $locale['global_127'])."</a></strong>\n";
      echo "</div>\n";
   }

   if (iADMIN && checkrights("SU")) {
      $subm_count = dbcount("(submit_id)", DB_SUBMISSIONS);

      if ($subm_count) {
         echo "<div style='text-align:center;margin-top:15px;'>\n";
         echo "<strong><a href='".ADMIN."submissions.php".$aidlink."' class='side'>".sprintf($locale['global_125'], $subm_count);
         echo ($subm_count == 1 ? $locale['global_128'] : $locale['global_129'])."</a></strong>\n";
         echo "</div>\n";
      }
   }
   $requesturi = isset($_SERVER['REQUEST_URI']) ? cleanurl($_SERVER['REQUEST_URI']) : "";
$current_dir = dirname($requesturi)."/";

if ($current_dir !=="/administration/") {
   $list_open = false;


$result = dbquery(
   "SELECT link_name, link_url, link_window, link_visibility FROM ".DB_SITE_LINKS."
   WHERE link_position='1' OR link_position='2' ORDER BY link_order"
);
if (dbrows($result)) {
   $i = 0;
   echo "<div id='navigation'>\n";
   while($data = dbarray($result)) {
      $li_class = ""; $i++;
      if (checkgroup($data['link_visibility'])) {
         if ($data['link_name'] != "---" && $data['link_url'] == "---") {
            if ($list_open) { echo "</ul>\n"; $list_open = false; }
            echo "<h2>".parseubb($data['link_name'], "b|i|u|color|img")."</h2>\n";
         } else if ($data['link_name'] == "---" && $data['link_url'] == "---") {
            if ($list_open) { echo "</ul>\n"; $list_open = false; }
            echo "<hr class='side-hr' />\n";
         } else {
            if (!$list_open) { echo "<ul>\n"; $list_open = true; }
            $link_target = ($data['link_window'] == "1" ? " target='_blank'" : "");
            if ($i == 1) { $li_class = "first-link"; }
            if (START_PAGE == $data['link_url']) { $li_class .= ($li_class ? " " : "")."current-link"; }
            if (preg_match("!^(ht|f)tp(s)?://!i", $data['link_url'])) {
               echo "<li".($li_class ? " class='".$li_class."'" : "").">\n";
               echo "<a href='".$data['link_url']."'".$link_target." class='side'>".THEME_BULLET."\n";
               echo "<span>".parseubb($data['link_name'], "b|i|u|color|img")."</span></a></li>\n";
            } else {
               echo "<li".($li_class ? " class='".$li_class."'" : "").">\n";
               echo "<a href='".BASEDIR.$data['link_url']."'".$link_target." class='side'>".THEME_BULLET."\n";
               echo "<span>".parseubb($data['link_name'], "b|i|u|color|img")."</span></a></li>\n";
            }
         }
      }
   }
   if ($list_open) { echo "</ul>\n"; }
   echo "</div>\n";
} else {
   echo $locale['global_002'];
}
}
   
   closeside();
} else {
   if (!preg_match('/login.php/i',FUSION_SELF)) {
      $action_url = FUSION_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : "");
      if (isset($_GET['redirect']) && strstr($_GET['redirect'], "/")) {
         $action_url = cleanurl(urldecode($_GET['redirect']));
      }

      openside($locale['global_100']);
      echo "<div style='text-align:center'>\n";
      echo "<form name='loginform' method='post' action='".$action_url."'>\n";
      echo $locale['global_101']."<br />\n<input type='text' name='user_name' class='textbox' style='width:100px' /><br />\n";
      echo $locale['global_102']."<br />\n<input type='password' name='user_pass' class='textbox' style='width:100px' /><br />\n";
      echo "<label><input type='checkbox' name='remember_me' value='y' title='".$locale['global_103']."' style='vertical-align:middle;' /></label>\n";
      echo "<input type='submit' name='login' value='".$locale['global_104']."' class='button' /><br />\n";
      echo "</form>\n<br />\n";

      if ($settings['enable_registration']) {
         echo $locale['global_105']."<br /><br />\n";
      }
      echo $locale['global_106']."\n</div>\n";
      closeside();
   }
}
?>
0 replies
M
mattish91
M
Great regards Mattish91
  • Junior Member, joined since
  • Contributed 43 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
answered
Junior Member

Quote

Jib wrote:

Admin >>> System >>> Panels and Disable Navigation Panel.



Then backup your old /infusions/user_info_panel/upload this to /infusions/user_info_panel/ overwriting your old one.

-code removed-

Now Navigation added to User Info Panel as requested.


Thanks smile

[EDIT]
Im having some troubbles accessing stuff in ACP when i have changed this, so i had to make sure edited everything i needed/wanted to edit before i changed this. Maybe there is some easy solution for it? Thanks
[/EDIT]
Edited by PolarFox on 06-02-2014 07:37,
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Admin >>> System >>> Panels and Disable Navigation Panel.



Then backup your old /infusions/user_info_panel/upload this to /infusions/user_info_panel/ overwriting your old one.


<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: user_info_panel.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }

if (iMEMBER) {
   $msg_count = dbcount("(message_id)", DB_MESSAGES, "message_to='".$userdata['user_id']."' AND message_read='0' AND message_folder='0'");

   openside($userdata['user_name']);
   echo THEME_BULLET." <a href='".BASEDIR."edit_profile.php' class='side'>".$locale['global_120']."</a><br />\n";
   echo THEME_BULLET." <a href='".BASEDIR."messages.php' class='side'>".$locale['global_121']."</a><br />\n";
   echo THEME_BULLET." <a href='".BASEDIR."members.php' class='side'>".$locale['global_122']."</a><br />\n";

   if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
      echo THEME_BULLET." <a href='".ADMIN."index.php".$aidlink."' class='side'>".$locale['global_123']."</a><br />\n";
   }

   echo THEME_BULLET." <a href='".BASEDIR."index.php?logout=yes' class='side'>".$locale['global_124']."</a>\n";

   if ($msg_count) {
      echo "<div style='text-align:center;margin-top:15px;'>\n";
      echo "<strong><a href='".BASEDIR."messages.php' class='side'>".sprintf($locale['global_125'], $msg_count);
      echo ($msg_count == 1 ? $locale['global_126'] : $locale['global_127'])."</a></strong>\n";
      echo "</div>\n";
   }

   if (iADMIN && checkrights("SU")) {
      $subm_count = dbcount("(submit_id)", DB_SUBMISSIONS);

      if ($subm_count) {
         echo "<div style='text-align:center;margin-top:15px;'>\n";
         echo "<strong><a href='".ADMIN."submissions.php".$aidlink."' class='side'>".sprintf($locale['global_125'], $subm_count);
         echo ($subm_count == 1 ? $locale['global_128'] : $locale['global_129'])."</a></strong>\n";
         echo "</div>\n";
      }
   }
   
   $list_open = false;


$result = dbquery(
   "SELECT link_name, link_url, link_window, link_visibility FROM ".DB_SITE_LINKS."
   WHERE link_position='1' OR link_position='2' ORDER BY link_order"
);
if (dbrows($result)) {
   $i = 0;
   echo "<div id='navigation'>\n";
   while($data = dbarray($result)) {
      $li_class = ""; $i++;
      if (checkgroup($data['link_visibility'])) {
         if ($data['link_name'] != "---" && $data['link_url'] == "---") {
            if ($list_open) { echo "</ul>\n"; $list_open = false; }
            echo "<h2>".parseubb($data['link_name'], "b|i|u|color|img")."</h2>\n";
         } else if ($data['link_name'] == "---" && $data['link_url'] == "---") {
            if ($list_open) { echo "</ul>\n"; $list_open = false; }
            echo "<hr class='side-hr' />\n";
         } else {
            if (!$list_open) { echo "<ul>\n"; $list_open = true; }
            $link_target = ($data['link_window'] == "1" ? " target='_blank'" : "");
            if ($i == 1) { $li_class = "first-link"; }
            if (START_PAGE == $data['link_url']) { $li_class .= ($li_class ? " " : "")."current-link"; }
            if (preg_match("!^(ht|f)tp(s)?://!i", $data['link_url'])) {
               echo "<li".($li_class ? " class='".$li_class."'" : "").">\n";
               echo "<a href='".$data['link_url']."'".$link_target." class='side'>".THEME_BULLET."\n";
               echo "<span>".parseubb($data['link_name'], "b|i|u|color|img")."</span></a></li>\n";
            } else {
               echo "<li".($li_class ? " class='".$li_class."'" : "").">\n";
               echo "<a href='".BASEDIR.$data['link_url']."'".$link_target." class='side'>".THEME_BULLET."\n";
               echo "<span>".parseubb($data['link_name'], "b|i|u|color|img")."</span></a></li>\n";
            }
         }
      }
   }
   if ($list_open) { echo "</ul>\n"; }
   echo "</div>\n";
} else {
   echo $locale['global_002'];
}

   
   closeside();
} else {
   if (!preg_match('/login.php/i',FUSION_SELF)) {
      $action_url = FUSION_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : "");
      if (isset($_GET['redirect']) && strstr($_GET['redirect'], "/")) {
         $action_url = cleanurl(urldecode($_GET['redirect']));
      }

      openside($locale['global_100']);
      echo "<div style='text-align:center'>\n";
      echo "<form name='loginform' method='post' action='".$action_url."'>\n";
      echo $locale['global_101']."<br />\n<input type='text' name='user_name' class='textbox' style='width:100px' /><br />\n";
      echo $locale['global_102']."<br />\n<input type='password' name='user_pass' class='textbox' style='width:100px' /><br />\n";
      echo "<label><input type='checkbox' name='remember_me' value='y' title='".$locale['global_103']."' style='vertical-align:middle;' /></label>\n";
      echo "<input type='submit' name='login' value='".$locale['global_104']."' class='button' /><br />\n";
      echo "</form>\n<br />\n";

      if ($settings['enable_registration']) {
         echo $locale['global_105']."<br /><br />\n";
      }
      echo $locale['global_106']."\n</div>\n";
      closeside();
   }
}
?>



Now Navigation added to User Info Panel as requested.
0 replies

Category Forum

Panels and Infusions

Labels

None yet

Statistics

  • Views 0 views
  • Posts 5 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

C
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
M
M
Great regards Mattish91
  • Junior Member, joined since
  • Contributed 43 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet