2011-05-14, 08:47 PM
Installation goes as listed on the plugin page:
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:
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:
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:
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.
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:
- 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?)
- Go into a new .css file. (How is this done without producing errors? See updates below for some additional info.)
- 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.