MyBB Community Forums

Full Version: ModNoticePlus v1.3 Install Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Installation goes as listed on the plugin page:

Quote:Installation:
1. Extract the php file from the .zip file.
2. Upload to inc/plugins.
3. Activate plugin via ACP.
4. Open your theme(s) and add this css:

.modnotice {
background: #ADCBE7;
padding: 8px;
margin: auto auto;
border: 1px solid #0F5C8E;
color: #000000;
font-size: 12px;
}

I. On step #2, As per the file layout inside the .zip there was a duplicate(?) "modnotice.php" file that went into the forum root directory (the other one went into the plugins directory). I see that they are different file sizes so I assume they are both supposed to uploaded. My guess is that step #2 should have been stated as "Upload to your forum root." If this is incorrect please let me know.
This is the folder/file layout inside the zip file:
zip-root > inc > plugins > modnotice.php
zip-root > modnotice.php

II. On step #4, this plugin seems to require getting your fingers dirty with a little hand editing of your internal files. I went through ACP into my themes (still using default) and found a short list of six .css files. Some of the .css files are "attached to all pages" and some are "attached to file_name_here.php" files.

This plugin does not indicate whether the above snippet must:
  1. Go into one of the existing .css files. (If so, does it matter which one? And, when editing a .css file, there is a "Selector" dropdown menu with options from which to choose. On global .css files there are MANY choices. Which one should be used?)
  2. Go into a new .css file. (How is this done without producing errors? See updates below for some additional info.)
  3. Go into either 1 or 2 because it doesn't matter.

I started putting the code snippet into one of the existing .css files, however when did this there was an alert informing me of this:
Quote:This stylesheet is currently being inherited from MyBB Master Style. Any changes you make will break the inheritance, and the stylesheet will be copied to this theme.
I have no wish to break things or interfere with inheritance. Because of that I backed out of editing an existing .css file and instead made one of my own.

I gave it the name "modnotice+.css" and "attached to all pages". I clicked save at the bottom of the page and was instantly greeted with this error:
Quote:You have selected an invalid stylesheet.
I can see it in the list of .css files, however whenever I attempt to interact with it I am given the above error. I cannot even delete it by using the dropdown box to the right of it's name.

By bouncing around names I have created a new Default theme, set it as the default, and moved all users to it. The original Default theme is now renamed to "Default-old". I am expecting (hoping) that by deleting the entire "Default-old" theme that the "modnotice+.css" file will also get deleted. I would have already done so, except I am curious about what the issue is with it. Did I go wrong by having the "+" character in the name? Or was there something else that I did incorrectly that caused this error to occur?

UPDATE 1: I have done some additional testing, and have been able to duplicate that the "+" character does indeed produce this error. I don't know if all special characters will do this, or just the "+" character. It's probably best to avoid all such characters in your names. By not blocking problem causing characters from being used in file names, I consider this to be a bug in MyBB. As soon as I have a chance, I intend to pass this information along to the MyBB bug trackers area.

UPDATE 2: After my above testing I decided to delete the "Default-old" theme in hopes that it would also delete the .css files that I was unable to access by any means that I could find. The theme was successfully deleted and along with it all of the offending .css files.

UPDATE 3: I created a .css file named "modnotice.css" and gave it global status (attached to all files). It processed correctly and I am able to access it as expected. I performed some tests and everything seems to be working properly, with the exception of sending a PM to the author of the post that is being edited. The PM option is enabled in ACP, it just doesn't function. This is on MyBB v1.6.3.
For step 2: One of the file is suppose to be uploaded to the root folder while ther other folder is suppose to be uploaded to the plugin page. Both of them don't belong in the root folder. The first folder that is 14.4KB is suppose to be uploaded to the root folder. The other folder which is 7.96KB is suppose to be uploaded to the plugin page. So for the first one, upload it to your root folder. As for the second one, go to your root folder & you will see "inc" folder. Click on that and then you will see "plugins" folder. Upload it there.

For Step 4: Put that code in the global.css. It can be located here:
ACP > Styles & Templates > Theme > Edit Theme > global.css.

It can be put any where in the file. To be more specific, put it at the end of the code that start with "." . Or if you want, you can put it any where you want as long as it is inside the global.css file

Hope that helps Smile
Thank you for the reply, and I apologize for not being more clear.

There was an "inc > plugins > modnotice.php" folder/file structure inside the zip. That is where one "modnotice.php" file went. The other I kept with the same folder/file structure which indicated that it should be placed into the root of the forum.

My .css experience is what you might refer to as "lacking". With that being said it is good to hear that I was at least targeting the proper existing .css file. I just did not want to break inheritance.

After some wrestling with this plugin, I have it mostly working. Sending a PM to the author of the post that is being edited is the only function of this plugin that does not appear to be working.