Jump to content

Recommended Posts

Posted

Hey, I've read the Thread "Editing the Admin Skin [sOLVED]" but this solution doesn't work for me...

I've a main content sector and there I've to put the code in, to display it in the top of the site.

But the full content of phpvms (new site, pilots etc) is on the bottom...

<section class="content">

<!-- Content goes here..you know? -->

</section>

That is on the site code bottom:

 <div id="mainContent">
<div id="results"></div>
<div id="bodytext">

Help me please ^^

Here a screenshot: http://prntscr.com/b21l7b

Posted (edited)

Ok, by the looks of things you are using AdminLTE.

Try placing it like this

<section class="content">
<div id="mainContent">
<div id="results"></div>
<div id="bodytext">
<!-- Content goes here..you know? -->
</section>

I believe it's just adding the content to the div but just using the <div id="mainContent"> as a main anchor or something. But from what I know, it's just placing the content on the page for the templates.

If that doesn't work, try just closing one div, it looks like your content is in your footer, if you provide more code, we can have a look to see what you've done wrong.

Edited by web541
Posted (edited)
  Reveal hidden contents
Edited by MrDonutButter
Posted

Wow, a lot of cleaning up here.

Try this:

Header.php

  Reveal hidden contents

Footer.php

  Reveal hidden contents
Posted (edited)

@web541

It works! The content is in the top.

And e.g. the pilots list werent shown ...also the "Viewing Active Schedules" and other sites...maybe it's cause the .json which creates the list?

Edited by MrDonutButter
Posted (edited)

Not a JSON problem (JSON loading fine), it's a jQuery problem. (If you find that accepting PIREPS doesn't work, then also let us know, you would have to change some things)

Pilots & Schedules don't show up anymore,

to fix this, go to public_html/lib/js/jqgrid/js/jquery.jqGrid.min.js and copy/rename it to jquery.jqGrid_orig.min.js

then, replace the original file with this one

https://raw.githubusercontent.com/web541/phpVMS-Admin-Panel-Skin/php/lib/js/jqgrid/js/jquery.jqGrid.min.js

Then go into the relevant template files e.g. pilots_list.tpl/.php and ops_schedules.php and place this at the very top of the file

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>

And this at the very bottom of the file

<script type="text/javascript">
jQuery.noConflict(true);
</script>

The tables should now work, the pagination arrows on the bottom are still there, but are for some reason invisible so you'd have to change something in the js/css to make it work again but I haven't found a fix for that one yet.

Keep going, it takes a while but you get a good end result.

-- are you using the phpvms php or tpl version?

Edited by web541
Posted

Ok, go to admin/lib/layout/header.php

find this

<!-- Header Scripts -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
jQuery(document).ready(function( $ ) {
       $('.counter').counterUp({
               delay: 10,
               time: 4000
       });
});
</script>

Delete it

go to admin/lib/layout/footer.php

find this

<!-- jQuery 2.1.4 -->
<script src="<?php echo SITE_URL?>/admin/lib/layout/plugins/jQuery/jQuery-2.1.4.min.js"></script>

Delete it

go to admin/templates/core_htmlhead.php

find this

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

Change it to this

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

go to admin/templates/core_navigation.php

at the very top of the file

(under this line if you have it <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?>)

Paste this

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
jQuery(document).ready(function( $ ) {
$('.counter').counterUp({
delay: 10,
time: 4000
});
});
</script>
<script type="text/javascript">
jQuery.noConflict(false);
</script>

The jQuery calls should be working now (Accepting PIREPS, deleteing news, etc.)

Posted

Hmm, it worked on my end. Have you edited any jQuery code recently? Are there any more references to jQuery other than core_htmlhead.php and core_navigation.php? Are there any errors in your console?

Posted (edited)

No. I've implemented the jQuery Code from google.

header:

<link rel="stylesheet" href="<?php echo SITE_URL?>/admin/lib/layout/plugins/jvectormap/jquery-jvectormap-1.2.2.css">

navigation:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
jQuery(document).ready(function( $ ) {
$('.counter').counterUp({
delay: 10,
time: 4000
});
});
</script>
<script type="text/javascript">
jQuery.noConflict(false);
</script>

There is ONE error on the NEWS site but not jquery:

header("Content-type:text/html; charset=utf-8");

(The news site is the site where I cant delete news... on the "pages" site it works..)

Edited by MrDonutButter
Posted

It works!!!

I opened the admin\templates\news_list.tpl and deleted at the top this:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>

Now the delete works! :)

but.... I hope I annoy you guys not too much.....

the "Viewing Active Schedules" site doesnt show the content...

The files content:

  Reveal hidden contents
Posted
  Reveal hidden contents

Just add the top line and bottom three lines to the pilots_list.tpl/.php as well to make it show up

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...