Preferences (Game Settings)
Customize your HogwartsLive experience. Change password, email, timestamps, notifications, bio, and module-specific settings. Make the magical world yours.
What Are Preferences?
The Preferences page (prefs.php) is your personal control panel for customizing how HogwartsLive looks, behaves, and communicates with you. Think of it as the magical equivalent of a Remembrall crossed with a wardrobe mirror crossed with a very organized filing cabinet - except instead of remembering what you've forgotten, it remembers exactly how you want your game experience configured. Change your password, adjust email notifications, select visual themes, set timezone offsets, edit your character bio, and configure dozens of module-specific options.
Preferences are divided into categories: Account Preferences (password, email), Display Preferences (UI layout), and Game Behavior Preferences (notifications, timestamps, commentary behavior). Modules can add their own preference sections, creating a dynamic system that grows with the features you use. All changes are saved immediately when you click Submit and take effect right away.
Accessing Preferences
How to Get There:
- Navigation Link: "Preferences" appears in main navigation menu
- Alive Players: Can access from village navigation
- Dead Players: Can still access preferences (return link goes to news)
- Public Profile Link: "View Your Public Profile" link also provided (alive players only)
- Direct URL: prefs.php
Account Preferences
Security & Contact:
Password:
- Two Fields: "Password" and "Retype" must match
- Minimum Length: 4 characters (will show error if shorter)
- Encryption: MD5 hashed before submission (network sniffing protection)
- Double Hash: Server applies second MD5 hash for storage
- Leave Blank: If you don't want to change password, leave both fields empty
- Confirmation: "Your password has been changed." on success
- Error Messages: "Your passwords do not match." or "Your password is too short. It must be at least 4 characters."
- JavaScript Validation: Client-side check before submission
Email Address:
- Validation: Must be valid email format (checked by is_email() function)
- Server Restrictions: If Config::requirevalidemail=1, email changes blocked
- Locked Email Message: "Your email cannot be changed, system settings prohibit it. Use the Petition link to ask the server administrator to change your email address if this one is no longer valid."
- Purpose: Used for Owl Post notifications, password recovery, system announcements
- Privacy: Email never displayed publicly to other players
- Optional: If Config::requireemail=0, email can be invalid/blank
- Confirmation: "Your email address has been changed." on success
Display Preferences
Visual Customization:
Show Config Sections in Tabs:
- Type: Boolean (checkbox)
- Default: True (enabled)
- Purpose: Organizes preference form into tabbed sections
- When Disabled: All preferences show as single long form
- Recommendation: Keep enabled for easier navigation
Game Behavior Preferences
Gameplay Customization:
Email Notifications:
- Send email when you get new owl?: Boolean - receive email notifications for Owl Post
- Send email for system generated messages?: Boolean - receive emails for system messages
- Use Case: Stay notified of messages even when not logged in
- Note: Requires valid email address set
Allow Profanity in Received Owls:
- Field: dirtyemail
- Type: Boolean (checkbox)
- When Enabled: Profanity filter disabled for mail you receive
- When Disabled: Profanity in received Owl Post censored
- Default: Usually disabled (censored)
- Note: Doesn't affect outgoing mail or commentary
Timestamp Display:
- Type: Enum (dropdown with 3 options)
- Option 0 - None: No timestamps shown in commentary
- Option 1 - Real Time: Shows actual date/time (e.g., "12/25 1:27pm")
- Option 2 - Relative Time: Shows time elapsed (e.g., "1h35m", "2 days ago")
- Affects: Commentary timestamps across all chat areas
- Personal Preference: Doesn't affect what others see
Timestamp Format:
- Field: timeformat
- Type: String (20 character max)
- Default: "[m/d h:ia]" (e.g., "12/25 1:27pm")
- PHP date() Format: Uses standard PHP date formatting codes
- Preview: Shows current time in your format
- Examples: "[Y-m-d H:i:s]" = "2025-12-27 15:30:45", "[l, F j]" = "Saturday, December 27"
- Brackets: Typically wrapped in square brackets by convention
- Advanced: Requires knowledge of PHP date formatting
Time Offset:
- Type: Integer (hours)
- Purpose: Adjust timestamps for your timezone
- Format: Number of hours to offset (positive or negative)
- Example: Server is UTC, you're EST (-5), set offset to -5
- Preview: Shows current time and offset time
- Affects: All timestamp displays throughout game
- Math: Server time + (offset * 60 * 60) seconds
Don't Jump to Comment Areas:
- Field: nojump
- Type: Boolean (checkbox)
- When Enabled: Page doesn't auto-scroll to commentary after posting/refreshing
- When Disabled: Automatically scrolls to commentary section (default behavior)
- Use Case: Prefer to stay at top of page after commenting
- Anchor Tags: Disables #commentary anchor jumping
Character Biography
Bio Editing:
Short Character Biography:
- Field: bio
- Type: String (255 character maximum)
- Display: Shows on your player biography page (bio.php)
- Public: Visible to all players
- Content: Character description, personality, backstory, RP preferences
- Sanitization: comment_sanitize() removes unsafe content
- Color Codes: Supports LoGD backtick color formatting
- Timestamp: biotime updated when bio changes
Bio Blocking:
- Admin Lock: Admins can block bio editing (biotime > "9000-01-01")
- Blocked Message: "You cannot modify your bio. It has been blocked by the administrators!"
- Reason: Usually for inappropriate content violations
- Appeal: Use Petition system to request unblock
Module Preferences
Dynamic Module Settings:
How Module Prefs Work:
- Auto-Discovery: System queries modules with 'prefs' infokey
- Namespace: Module prefs prefixed with "modulename___setting"
- Types: user_* (user-editable) and check_* (permission-based)
- Sections: Modules can add titled sections to form
- Storage: Saved in module_userprefs table
- Per-User: Each player has own module preference values
Module Pref Examples:
- Combat Modules: Auto-use healing items, preferred spell selection
- Notification Modules: Alert preferences, spam filtering
- UI Modules: Display options, layout preferences
- Feature Modules: Feature-specific toggles and settings
Hooks:
- checkuserpref Hook: Modules can validate/modify pref before display
- notifyuserprefchange Hook: Called when module pref changes
- Dynamic Defaults: Modules can set conditional defaults
- Permission Checks: check_* prefs can be gated by permissions
Strategy & Tips
Preferences Optimization
- Change Password Regularly: Good security practice, especially if account shared
- Valid Email Important: Needed for password recovery and notifications
- Timestamp Format: "[m/d h:ia]" is readable, "[H:i:s]" is precise, pick your style
- Time Offset: Set correctly for accurate timestamps (calculate server - your timezone)
- Relative Timestamps: "1h35m ago" more useful than "12/25 1:27pm" for active chat
- Email Notifications: Enable for Owl Post if you want offline notifications
- Disable System Emails: If you get too many, turn off system message emails
- Profanity Filter: Keep enabled unless you prefer uncensored mail
- No Jump Pref: Enable if commentary auto-scroll annoys you
- Tab Config: Keep enabled for organized preference display
- Bio Editing: Use all 255 characters - make your character memorable
- Color Codes in Bio: Backtick codes work - use sparingly for emphasis
- Module Prefs: Explore module sections - they often have useful options
- Save After Each Section: Submit button saves all changes at once
- Password Length: 4 character minimum is low - use longer for security
- JavaScript Required: Password encryption requires JS enabled
Preferences Summary: Access via prefs.php to customize game settings. Account: Password (4+ chars, MD5 hashed), Email (validated, may be locked). Display: Tab Config (default true). Game Behavior: Email on Owl Post, System mail, Profanity filter (dirtyemail), Timestamps (None/Real/Relative), Format ([m/d h:ia] default), Time offset (hours), No jump to comments. Bio: 255 char max, public, can be admin-blocked. Module prefs: user_* and check_* settings, modulename___setting namespace, stored in module_userprefs. Save process: Change detection via serialized oldvalues, selective updates, Settings Saved confirmation. Security: Client MD5 hash, server double-hash md5(md5(pass)), comment_sanitize() for bio, is_email() validation. Form uses showform(), JavaScript md5pass() for password encryption.