News (Daily Bulletin)
Read about daily events in the magical world. Player achievements, deaths, level gains, and major accomplishments. Nothing of note happened this day. All in all a boring day.
What Is the News?
The News page (news.php) is Hogwarts Live's daily bulletin - a chronological feed of everything noteworthy that happened on a given day. Think of it as the Daily Prophet crossed with a town crier crossed with a very thorough gossip column. Every forest fight won, every death suffered, every level gained, and every major achievement gets immortalized in the News feed. It's part historical record, part bragging rights, and part "wow, that person died a LOT today" entertainment.
News entries are organized by date, with the most recent items appearing first. Each day gets its own page showing up to 50 news items, with pagination if there are more. You can browse backwards through time using the "Previous News" link, or forward with "Next News" if you've gone back. The News is accessible to everyone - logged in players, dead players, and even anonymous visitors can read about the daily chaos unfolding at Hogwarts. And if nothing happened? You'll get the cheerfully sarcastic message: "Nothing of note happened this day. All in all a boring day."
Accessing the News
How to Get There:
- Navigation Link: "News" appears in navigation (all players)
- Alive Players: Access from village navigation
- Dead Players: News available from Shades navigation
- Anonymous Access: ALLOW_ANONYMOUS = true (non-logged-in users can read)
- Direct URL: news.php (defaults to today)
- Specific Date: news.php?offset=N (N days ago)
- Page Number: news.php?page=X (pagination)
News Display Format
Page Layout:
Header:
- Page Title: "News - Page X (Items Y-Z of Total)"
- Example: "News - Page 1 (Items 1-50 of 127)"
- Date Banner: "News for [Day, Month Date, Year] (Items X-Y of Z)"
- Format: "Wed, Dec 27, 2025"
- Centered: Bold red date display
News Entries:
- Separator: -=-=-=- pattern (green/cyan alternating)
- Format: `c`2-=-`@=-=`2-=-`@=-=`2-=-`@=-=`2-=-`0`c
- Entry Text: News item content (colored, formatted)
- Newest First: ORDER BY newsid DESC (reverse chronological)
- Translation: All entries use translate_inline() for multilingual support
Empty Day:
- No News: When no entries for that date
- Message: "`1`b`c Nothing of note happened this day. All in all a boring day. `c`b`0"
- Style: Centered bold blue text
- Still Shows: Separator lines and date header
Superuser Controls:
- Delete Link: [ Del ] appears before each entry (staff only)
- Permission: Requires SU_EDIT_COMMENTS superuser flag
- Action: Links to superuser.php?op=newsdelete
- Return Path: Includes URLEncoded return to current news page
Navigation & Browsing
Moving Through Time:
Date Navigation:
- Previous News: Go back one day (offset+1)
- Next News: Go forward one day (offset-1)
- Only Shows "Next": If offset > 0 (you've gone back)
- Offset Parameter: Number of days before today
- Timestamp Calculation: strtotime((0-$offset)." days")
- Default: offset=0 (today)
- Example: news.php?offset=7 = news from 7 days ago
Pagination:
- Items Per Page: 50 news entries
- Page Parameter: news.php?page=2 for second page
- Offset Calculation: (page - 1) * 50
- Item Range Display: "(Items 51-100 of 150)"
- Only Shows: If more than 50 items that day
- SQL LIMIT: LIMIT offset, 50
Combined Navigation:
- Both Parameters: news.php?offset=3&page=2
- Meaning: Page 2 of news from 3 days ago
- Use Case: Very busy days with hundreds of news entries
What Appears in News
News Entry Types:
Common Events:
- Forest Fights: "[Player] defeated a [Creature] in the Forbidden Forest"
- Deaths: "[Player] was slain by [Creature/Player]"
- Resurrections: "[Player] was resurrected by [Method]"
- Level Gains: "[Player] advanced to level [X]"
- Voldemort Encounters: "[Player] defeated Voldemort!"
- PvP Battles: "[Player] attacked [Player] and [won/lost]"
- House Joins: "[Player] joined [House]"
Module Events:
- Module Hooks: Modules add custom news via addnews()
- Examples: Quest completions, special event participation, achievement unlocks
- Varied Content: Depends on active modules
System Announcements:
- Admin Posts: Server maintenance, events, rule changes
- Automatic Events: Holiday activations, competition results
- Milestones: Server anniversaries, player count records
News Creation & Storage
Behind the Scenes:
Database Structure:
- Table: news (newsid, newsdate, newstext, arguments, tlschema, accountid)
- newsdate: DATE field (YYYY-MM-DD) for grouping by day
- newstext: The news content (may contain sprintf placeholders)
- arguments: Serialized array of sprintf arguments
- tlschema: Translation schema for multilingual support
- accountid: Player ID associated with news (0 for system news)
addnews() Function:
- Usage: addnews(newstext, arguments)
- Auto Date: Uses today's date (date("Y-m-d"))
- sprintf Support: newstext can have %s placeholders filled by arguments
- Example: addnews("%s defeated %s", array($playername, $creaturename))
- Translation: Stores translation schema for localization
Auto-Expiration:
- Config::expirecontent: Number of days to keep news
- Cleanup: DELETE FROM news WHERE newsdate < (today - X days)
- Runs: Every time news.php loads
- Purpose: Prevent database bloat, clear old news
- Typical Setting: 30-90 days
- Zero = Disabled: If Config::expirecontent = 0, keeps all news forever
Translation & Localization
Multi-Language Support:
How It Works:
- tlschema(): Each entry stores its translation schema
- translate_inline(): Translates newstext when displayed
- sprintf_translate(): Combines translation with sprintf arguments
- Dynamic: News appears in viewer's selected language
- Fallback: If no translation available, shows original text
Argument Handling:
- Serialized Array: unserialize($row['arguments'])
- Array Construction: Prepend newstext, append all arguments
- call_user_func_array: Calls sprintf_translate with constructed array
- Result: Translated text with argument substitution
- Example: "%s defeated %s" + ["Harry", "Troll"] = "Harry defeated Troll"
Dead Player Access
News in the Afterlife:
Navigation Differences:
- Alive: Village navigation + "News" link
- Dead: Shades navigation (Land of Shades, Graveyard)
- Dead Links: Prefect's Lounge, Site Points, Logout
- Companions Suspended: allowinshades check for dead players
- Same News: See the same news feed as living players
- Purpose: Stay informed of game events while dead
Why It Matters:
- Track Resurrections: See when others come back to life
- PvP Awareness: Know who's getting killed (avoid them when resurrected)
- Community: Stay connected to game events while earning favor
- Entertainment: Death doesn't mean boredom - news keeps you engaged
Strategy & Tips
News Reading Mastery
- Daily Check: News is the pulse of the server - check regularly
- PvP Intelligence: See who's actively fighting (potential targets/threats)
- Death Frequency: Many deaths = new player or reckless high-level
- Level Tracking: Monitor when players level up (know their progression)
- Voldemort Encounters: Major milestone announcements - congratulate players
- Previous News: Browse back to catch up if you've been offline
- Empty Days: Slow server activity or very early morning hours
- Pagination: Really busy days might need page 2, 3+ to see all news
- Module Events: Custom news hints at what modules are active
- System Announcements: Don't miss admin posts about events/changes
- Anonymous Access: Non-players can see news (good for recruiting)
- Historical Record: News documents your accomplishments permanently
- Bragging Rights: Every achievement immortalized in public feed
- Death Notifications: Your deaths are public - embrace the embarrassment
- Separator Lines: Visual organization makes scanning easier
- Translation: If multilingual server, news appears in your language
- Auto-Expiration: Old news eventually deleted (30-90 days typical)
- Bio Link Context: News entries appear in player bios (recent accomplishments)
Common Questions
News FAQ:
Q: Can I delete my own news entries?
A: No. Only staff with SU_EDIT_COMMENTS can delete news. Your achievements (and failures) are permanent public record until auto-expiration kicks in.
Q: How far back can I browse news?
A: As far back as Config::expirecontent days (typically 30-90). Older news is automatically deleted. There's no hard limit on the offset parameter, but you'll see empty days once you go past retention period.
Q: Why does it say "Nothing of note happened this day"?
A: That day genuinely had zero news entries - no fights, no deaths, no level gains, nothing. This typically happens on very slow days, very early in the morning before anyone's played, or on days before the server launched.
Q: Do I show up in news for everything I do?
A: Most significant actions create news: forest fights (if you win), deaths, resurrections, level gains, Voldemort Encounters, PvP battles. Minor actions (healing, shopping, chatting) don't. It's public achievements, not a minute-by-minute log.
Q: Can I filter news to see only my entries?
A: Not on the main news page. However, your player biography (bio.php) shows your "Recent accomplishments (and defeats)" - which is news filtered to just your accountid. Check there for your personal feed.
News Summary: Access via news.php to read daily bulletin of game events. Shows 50 items per page, newest first. Navigate: Previous News (offset+1 days back), Next News (offset-1). Date header: "News for [Day, Month Date, Year]". Separator: -=-=-=- pattern. Empty day: "Nothing of note happened this day. All in all a boring day." Content: Forest fights, deaths, resurrections, level gains, Voldemort Encounters, PvP, module events. Database: news table (newsid, newsdate, newstext, arguments, tlschema, accountid). Translation: sprintf_translate() with serialized arguments. Auto-expire: Config::expirecontent days. Anonymous access allowed. Superuser delete requires SU_EDIT_COMMENTS. Dead players see same news with Shades navigation. Personal feed available in player bio (last 100 entries).