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?

Moving Panels and Admin Panel

Asked Modified Viewed 3,879 times
D
d4m3k
D
d4m3k 10
  • Junior Member, joined since
  • Contributed 13 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
asked
Junior Member

Hello there,

I've got a question about (see the title). For some reason I can not move any of the Panels, I am using Chrome and JS is enabled and still no success, I have also tried to replace the appropriate file (panels.php) and still nothing, anybody has got any ideas on what it might be?

Another question that I have is;
Is it possible to move the default admin panel/navigation (found here: /administration/index.php) from side to side? If so how?

Regards!
0 replies

9 posts

P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

Reupload all the JS files. (/includes/ maybe)

There are only left side.
0 replies
D
d4m3k
D
d4m3k 10
  • Junior Member, joined since
  • Contributed 13 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
answered
Junior Member

I have reinstalled all JAVA still nothing..
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

Hello man,

You know it's Drag N Drop rite? Not click!!


What's your site link?
Send me a pm with admin login and I'll take a look for ya!

Regards
Craig
0 replies
D
d4m3k
D
d4m3k 10
  • Junior Member, joined since
  • Contributed 13 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
answered
Junior Member

Ok I have managed to solve this:

I have added some additional JS libraries before I have noticed a problem with the panels.

In order to use multiple JS (jQuary) you should add the following line below the script load you use. Also always replace the numbers with the version you are using.

Like so:
echo "<script type='text/javascript' src='".THEME."jcarousel_panel/js/jquery-1.4.2.min.js'></script>";
echo "<script type='text/javascript'> var jQuery_1_4_2 = $.noConflict(true);</script>";


Hopefully this helps!
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

Hi there,

Thing is mate, you do not need to include that since jquery is already in the core you do not need to have it again so if you remove...

<script type='text/javascript' src='".THEME."jcarousel_panel/js/jquery-1.4.2.min.js'></script>


I bet it still works and I bet your panels will also work and all other jQuery. ;)

Regards
Craig
0 replies
D
d4m3k
D
d4m3k 10
  • Junior Member, joined since
  • Contributed 13 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
answered
Junior Member

Thanks Craig!, last time I use Fusion was 4/5 yrs ago - such a things didn't exist back then :D
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

Yeah, no problem man, happy to help. Now you know for next time. :)

Have fun!
0 replies
D
d4m3k
D
d4m3k 10
  • Junior Member, joined since
  • Contributed 13 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
answered
Junior Member

Quote

Craig wrote:

Yeah, no problem man, happy to help. Now you know for next time. :)

Have fun!


Craig,

Perhaps you would know how to change an Admin Panel from left to right at Administration Section. There must be a function in the code responsible for this.

It would be great if you could help me with this one.

Thanks,
0 replies
— 1 year later —
M
MiChAeLoKGB
M
Sorry for my English.
Im from Slovakia wink
  • Junior Member, joined since
  • Contributed 24 posts on the community forums.
  • Started 6 threads in the forums
answered
Junior Member

Hello, Im trying to move the admin panel from left side to be at the top.
I know the themes/remplates/panels.php is responsible for that (as this one is loading it in). Is there some way to move it? It cant be on either side, just on top. Thanks for help.

Ps.: Sorry for resurrecting the old thread, but its the first one google throws out, so people in future can find it.

Merged on Dec 05 2014 at 12:56:46:
Ok,

so I managed to edit it. it might not be the best way to do it, but I dont really give a crap anymore. If somebody has better solution, then please, tell me :)

/themes/remplates/panels.php
<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: panels.php
| Author: PHPFusion Development Team
+--------------------------------------------------------+
| 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"); }

// Add admin message
$ad_mess = array(); $admin_mess ='';
if (iADMIN && !defined("ADMIN_PANEL")) {
   $admin_mess .= "<a id='content' name='content'></a>\n";
   if (iSUPERADMIN && file_exists(BASEDIR."setup.php")) $ad_mess[] = $locale['global_198'];
   if ($settings['maintenance']) $ad_mess[] = $locale['global_190'];
   if (!$userdata['user_admin_password']) $ad_mess[] = $locale['global_199'];
   if (!empty($ad_mess)) {
      $admin_mess .= "<div class='admin-message'>";
         foreach ($ad_mess as $message) {
            $admin_mess .= $message."<br />\n";
         }
      $admin_mess .= "</div>\n";
   }
}

$admin_mess .= "<noscript><div class='noscript-message admin-message'>".$locale['global_303']."</div>\n</noscript>\n<!--error_handler-->\n";


// Declare panels side
$p_name = array(
   array('name' => 'LEFT', 'side' => 'left'),
   array('name' => 'U_CENTER', 'side' => 'upper'),
   array('name' => 'L_CENTER', 'side' => 'lower'),
   array('name' => 'RIGHT', 'side' => 'right')
);

// Get panels data to array
$panels_cache = array();
$p_result = dbquery("SELECT panel_name, panel_filename, panel_content, panel_side, panel_type, panel_access, panel_display, panel_url_list, panel_restriction FROM ".DB_PANELS." WHERE panel_status='1' ORDER BY panel_side, panel_order");
while ($panel_data = dbarray($p_result)) {
   if (checkgroup($panel_data['panel_access'])) { $panels_cache[$panel_data['panel_side']][] = $panel_data; }
}

$panels_cache[2][] = array(
   "panel_name" => "Admin navigation",
   "panel_filename" => "navigation",
   "panel_content" => "",
   "panel_side" => 2,
   "panel_type" => "file",
   "panel_access" => 0,
   "panel_display" => 1,
   "panel_url_list" => "",
   "panel_restriction" => 0
);

$url_arr = array();
foreach ($p_name as $p_key => $p_side) {
   if (isset($panels_cache[$p_key + 1])) {
      ob_start();
      if (check_panel_status($p_side['side'])) {
         foreach ($panels_cache[$p_key + 1] as $p_data) {
            $url_arr = explode("\r\n", $p_data['panel_url_list']);
            if ($p_data['panel_url_list'] == ""
               || ($p_data['panel_restriction'] == 1 && (!in_array(TRUE_PHP_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : ""), $url_arr) && !in_array(TRUE_PHP_SELF, $url_arr)))
               || ($p_data['panel_restriction'] == 0 && (in_array(TRUE_PHP_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : ""), $url_arr)  || in_array(TRUE_PHP_SELF, $url_arr))))
            {
               if (($p_data['panel_side'] != 2 && $p_data['panel_side'] != 3)
                  || $p_data['panel_display'] == 1 || $settings['opening_page'] == START_PAGE)
               {
                  if (!defined("ADMIN_PANEL")) {
                     if ($p_data['panel_type'] == "file") {
                        if (file_exists(INFUSIONS.$p_data['panel_filename']."/".$p_data['panel_filename'].".php")) {
                           include INFUSIONS.$p_data['panel_filename']."/".$p_data['panel_filename'].".php";
                        }
                     } else {
                        eval(stripslashes($p_data['panel_content']));
                     }
                  }else{
                     if ($p_data['panel_type'] == "file") {
                        if(file_exists(ADMIN.$p_data['panel_filename'].".php")) {
                           include ADMIN.$p_data['panel_filename'].".php";
                        }
                     }
                  }
               }
            }
         }
         unset($p_data);
      }
      define($p_side['name'], ($p_side['name'] === 'U_CENTER' ? $admin_mess : '').ob_get_contents());
      ob_end_clean();
   } else {
      define($p_side['name'], ($p_side['name'] === 'U_CENTER' ? $admin_mess : ''));
   }
}
unset($panels_cache);

if (defined("ADMIN_PANEL") || LEFT && !RIGHT) {
   $main_style = "side-left";
} elseif (LEFT && RIGHT) {
   $main_style = "side-both";
} elseif (!LEFT && RIGHT) {
   $main_style = "side-right";
} elseif (!LEFT && !RIGHT) {
   $main_style = "";
}
?>


Ps.:

Line 54. - 61. does not have to be there, if you manualy add panel to your DB of panels.
Edited by MiChAeLoKGB on 05-12-2014 13:58,
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 9 posts
  • Votes 0 votes
  • Topic users 4 members

4 participants

C
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
P
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
M
M
Sorry for my English.
Im from Slovakia wink
  • Junior Member, joined since
  • Contributed 24 posts on the community forums.
  • Started 6 threads in the forums
D
D
d4m3k 10
  • Junior Member, joined since
  • Contributed 13 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet