MyBB Community Forums

Full Version: Plugin placement
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Lately I've been playing around with my theme and wanted some changes.
I have an Ajax PM notification installed but wanted to change the placement.

I myself know my way around in CSS so this will be no problem.
How ever I don't know how to include it only to the header.

<?php

define('IN_MYBB',1);
define('NO_ONLINE',1);
require('./global.php');
$plugins->run_hooks('ajaxpmnotice_start');

if(defined('AJAXPMNOTICE'))
{
	echo ''; 
}

?>

Now this gets included on the index but I want it on the header as stated before. If you need anymore information then leave a comment below.

Thank you for your time and effort.

Kind regards,

Senethic
Are you talking about including templates in the header template? Or do you want to include that file?
(2013-01-18, 07:19 PM)JordanMussi Wrote: [ -> ]Are you talking about including templates in the header template? Or do you want to include that file?

Well the thing is that this is a PHP file, not a template.
I want to turn this into a template and then include it to the header I guess.
OK, I think I understand what you require. Is the php file from this plugin http://mods.mybb.com/view/ajax-pm-notification? Because if it is it should be working on all pages.
(2013-01-18, 07:35 PM)JordanMussi Wrote: [ -> ]OK, I think I understand what you require. Is the php file from this plugin http://mods.mybb.com/view/ajax-pm-notification? Because if it is it should be working on all pages.

Correct, but I don't want the position to be fixed. I want it to be set to relative and be put in a div that is only included in the header.

How would I be able to do this?
When you say fixed what exactly do you mean by that, the pop up stays at the top of the page even if the user has scrolled down to the bottom of a long page? I don't have any experence with this plugin so why don't you try contacting querschlaeger. But having said that you could try adding the following code to global.css
Admin CP -> Templates & Style -> *Theme* -> global.css -> Advanced Mode -> Add Following code
.ajaxpmnotice {
position: fixed;
right: 50px;
top: 50px;
}
(2013-01-19, 01:17 PM)JordanMussi Wrote: [ -> ]When you say fixed what exactly do you mean by that, the pop up stays at the top of the page even if the user has scrolled down to the bottom of a long page? I don't have any experence with this plugin so why don't you try contacting querschlaeger. But having said that you could try adding the following code to global.css
Admin CP -> Templates & Style -> *Theme* -> global.css -> Advanced Mode -> Add Following code
.ajaxpmnotice {
position: fixed;
right: 50px;
top: 50px;
}

Well the thing is that I want the plugin to be only placed in the header.
When I put the css to relative it just floats at the bottom of the page. I want it to float in the header.

I hope you understand what I mean.
Thanks for the help so far.

Kind Regards,

Senethic