Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Problems changing default stylesheet (0.9.2.6)
First off, great piece of work. I have enjoyed exploring the interface and code and foresee being able to use it for great things.
However, I am having trouble specifying a different "Default style folder" via the "Global Application Settings" page. When I change the value and save the page, the constant value is modified in `appg/settings.php`, but this value is being overridden by `StyleID` data that comes from the `Session` object. Therefore, I continue to see the default "Vanilla" style.
Poking around in the code has been enlightening. Correct me if I'm wrong, but the handler that saves the "Global Application Settings" page does little else than save the values to the constant file. No database transactions (i.e. inserting a style or changing user's styles) are carried out. And that makes sense to me, given that one does not collect all of the necessary information to properly create a new style record. And it's probably a good idea to leave user-specific style IDs alone, given the existence of the "Custom Styles" extension.
It looks like my problem lies in the `UserManager` class, where the `StyleID` is hardcoded to '1' at the time of account creation.
I don't think I want to use the "Custom Styles" extension, because I don't want to allow user-defined styles.
So as a workaround, I did the following:
1. Added a new style to the `LUM_Style` table and pointed it to my new subdirectory in `styles`.
2. Modified the `Vanilla.User.class.php` file (Line 515) so that the default style ID was that of the style I added in step 1. Subsequently, any new user will default to using the custom default style.
Is this the suggested way to go about doing something like this? I saw a lot of discussion about this topic, but no one seemed to be having quite the same problem I was having. Or am I missing something completely obvious?
One other question: I'm still in the exploratory phase and have yet to deploy the forum. Would I be best served to wait for 0.9.3 to come out? From the limited reading I have done thus far, it looks like it introduces some pretty big changes?
Again, thanks for making such a great product.
Jake Krohn
0
This discussion has been closed.
Comments
The "Default Style Folder" is a folder defined so that people who aren't in the user table can have a style to look at even if they don't have a StyleID.
If you want everyone, including both registered and non-registered members, to see your custom style, do this:
1. Use the Global Application Settings form to specify the path to your custome style for Default Style Folder (as you've already done).
AND, EITHER
2. Edit the LUM_Style table so that StyleID 1 points to your custom style
OR
3. Alter the core to give new users a different StyleID, and add a new entry to the LUM_Style folder for your custom style (as you've already done). Finally, to ensure that existing users use your new custom style, change their styleID manually. Assuming that your custom style has a StyleID of 2, this would be the query:
update LUM_User set StyleID = 2