Skip to content

Jquery to display images - phpBB 3.3.x - Hide for no prosilver styles - #7

Closed
Galixte wants to merge 3 commits into
phpbbmodders:masterfrom
Galixte:jQuery-to-display-images
Closed

Galixte wants to merge 3 commits into
phpbbmodders:masterfrom
Galixte:jQuery-to-display-images

Conversation

@Galixte

@Galixte Galixte commented Dec 15, 2020

Copy link
Copy Markdown
Contributor

Hi @rmcgirr83,

Could you merge this please?

Regards.

@rmcgirr83

Copy link
Copy Markdown
Contributor

No sorry I can't I'm no longer associated with phpbbmodders. I also note that the files in the pull request have issues like using type="text/javascript" and not utilizing twig syntax.

@Galixte Galixte changed the title Jquery to display images - phpBB 3.3.x - Gode for no prosilver styles Jquery to display images - phpBB 3.3.x - Hide for no prosilver styles Dec 17, 2020
bonelifer added a commit that referenced this pull request Sep 23, 2026
…install)

The ../theme/ prefix in every INCLUDECSS/INCLUDEJS reference across
all four styles was wrong -- phpBB registers an extension's theme/
directory as its own root within the Twig namespace (alongside
template/), so referencing it as ../theme/xmas.css tries to escape
outside the configured directories entirely and throws
Twig\Error\LoaderError, a fatal 500 on every page load once the
extension is enabled.

This predates this branch: the original master's overall_header_head_append.html
used the identical ../theme/hohohatcorner.css pattern, and PR #7 copied
it unchanged into the three additional styles. Nobody had apparently
ever actually run this extension in a live phpBB install -- caught by
enabling it against a real phpBB 3.3.18-dev + SQLite install and
watching it 500 on the very first page load.

Fix: drop the ../theme/ prefix entirely (@phpbbmodders_holidayflare/xmas.css,
@phpbbmodders_holidayflare/js/xmas.js). Re-verified live: Christmas and
Valentine both render correctly (header-corner icon + Christmas's
forum-list mini icon), migration round-trip (fresh install and
simulated upgrade from the old enable_hohohatcorner config) both
confirmed against a real SQLite-backed install, no PHP errors or
warnings in phpBB's own log.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
bonelifer added a commit that referenced this pull request Sep 23, 2026
Matt Friedman (MattF) for the original Valentine's Day theme (#5),
Rich McGirr (RMcGirr83) for the original jQuery banner technique (#6),
and Galixte (Raphael M.) for extending it to additional styles (#7).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
bonelifer added a commit that referenced this pull request Sep 27, 2026
* Modernize extension; merge and reconcile PRs #5, #6, #7

Brings the extension up to current phpBB/PHP support and reconciles
three long-open, overlapping PRs into one coherent change:

Version support:
- composer.json: PHP >=5.3.3 -> >=7.1, phpbb soft-require bumped to
  <3.3.*@dev, GPL-2.0 -> GPL-2.0-only (current SPDX identifier), added
  version-check block so phpBB's ACP can detect new releases, version
  bumped to 2.1.0.
- config/services.yml: quoted service references and added
  `_defaults: public: true`, required for the newer Symfony versions
  phpBB 3.3.x ships.

Feature: Christmas theme (from PR #7, the more complete and more
recent of the two competing jQuery-image-display PRs; #6 is an
earlier, superseded revision of the same idea and also had an
unrelated .gitattributes regression -- `text=auto` accidentally
changed to `text=false` -- that is not adopted here):
- Corner-hat banner and a new "mini hat" icon on the forum list are
  now injected via jQuery instead of being hardcoded into one style's
  template, so they work across every style the extension ships
  events for (prosilver, Green-Style-Slim, pro_ubuntu_lucid, proflat)
  instead of prosilver only.

Feature: Valentine's Day theme (from PR #5), reworked:
- Config, ACP field, event listener, and template events renamed from
  the single enable_hohohatcorner flag to enable_xmas / enable_valentine
  so the two themes are independently selectable (matching PR #5's
  intent), applied consistently across all four styles' event files,
  not just prosilver.
- New migrations/xmas_valentine_split.php (depends_on config_data)
  adds enable_valentine and renames an existing install's
  enable_hohohatcorner value to enable_xmas, preserving the setting
  instead of silently losing it on upgrade -- neither open PR included
  a migration for this rename.
- Dropped PR #5's unfinished styles/prosilver/theme/*.forumbg,.forabg
  background-image override and unused .hat class (no template
  references either), and its committed changes.md scratch file.
- Added en/fr/ar strings for the renamed and new theme toggles
  (existing languages this repo already ships); kept PR #5's new nl
  translation.

Dead tooling removed, not migrated: .travis.yml, travis/ helper
script, phpunit.xml.dist (configured a ./tests/ suite that doesn't
exist in this repo), composer.lock (stale, minimal real dependency
tree to lock), and the committed composer.phar binary. Replaced with
.github/workflows/ci.yml: PHP syntax lint across PHP 7.1/7.4/8.0/8.1
and composer.json validation -- meaningfully checkable without a full
phpBB integration-test harness, which the old Travis config also only
partially provided (several of its own referenced scripts came from a
phpBB-core checkout it cloned at CI time, not from this repo).

README updated: CI badge, features list, ACP settings names.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Address phpBB.com validation findings

[valdeny] Inline JavaScript in template event files -> extracted to
real .js files (styles/prosilver/theme/js/xmas.js, valentine.js),
included via <!-- INCLUDEJS --> per the validation policy
("Include JavaScript files with the template function: <!--
INCLUDEJS -->"). One shared script per theme, referenced by all four
styles the same way the CSS already is -- this also gives
Green-Style-Slim, pro_ubuntu_lucid, and proflat the full banner+mini-icon
treatment for Christmas and the header banner for Valentine, which
they were previously missing (jQuery .insertBefore() on a selector
that doesn't exist in a given style is a harmless no-op, so this is
lower-risk than it sounds).

[valinfo] composer.json: added extension-level homepage and William's
author email/homepage (already used consistently in every file's
header comment, not new information); bumped composer/installers to
^1.0 matching the current Extension Skeleton. Left Matt (VSE)'s
email/homepage out -- no verified real value for them anywhere in
this codebase, and an empty placeholder field is a known composer.json
schema-validation trap.

[valinfo] license.txt: trimmed to end at "END OF TERMS AND CONDITIONS",
matching the Extension Skeleton's license.txt.twig exactly (confirmed
via diff, ignoring trailing whitespace). Dropped the GPLv2 boilerplate's
"How to Apply These Terms to Your New Programs" section, which the
skeleton doesn't include -- inert instructional text, not a change to
the actual license terms.

[valinfo] .github/workflows/ci.yml: re-indented from 2-space to
4-space, matching the coding guidelines' YAML exception to the tabs
rule.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Fix composer.json author details

William's homepage -> the phpbbmodders community site, not a GitHub
org URL. Matt's name -> Matt Friedman (VSE) -- VSE was his old phpBB
username, not his name; matches how he's already credited elsewhere
in this repo (language/fr/holidayflare_acp.php's copyright line).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Fix Matt's author identifier: VSE -> MattF

Confirmed via his real phpBB.com Customisation Database author
profile (https://www.phpbb.com/customise/db/author/mattf): MattF is
his current username there, VSE is a former one ("Formerly known as
VSE" per his own profile signature). Added his author profile as his
composer.json homepage, now that a real verified URL exists for it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Fix broken INCLUDECSS/INCLUDEJS paths (verified against a real phpBB install)

The ../theme/ prefix in every INCLUDECSS/INCLUDEJS reference across
all four styles was wrong -- phpBB registers an extension's theme/
directory as its own root within the Twig namespace (alongside
template/), so referencing it as ../theme/xmas.css tries to escape
outside the configured directories entirely and throws
Twig\Error\LoaderError, a fatal 500 on every page load once the
extension is enabled.

This predates this branch: the original master's overall_header_head_append.html
used the identical ../theme/hohohatcorner.css pattern, and PR #7 copied
it unchanged into the three additional styles. Nobody had apparently
ever actually run this extension in a live phpBB install -- caught by
enabling it against a real phpBB 3.3.18-dev + SQLite install and
watching it 500 on the very first page load.

Fix: drop the ../theme/ prefix entirely (@phpbbmodders_holidayflare/xmas.css,
@phpbbmodders_holidayflare/js/xmas.js). Re-verified live: Christmas and
Valentine both render correctly (header-corner icon + Christmas's
forum-list mini icon), migration round-trip (fresh install and
simulated upgrade from the old enable_hohohatcorner config) both
confirmed against a real SQLite-backed install, no PHP errors or
warnings in phpBB's own log.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Add screenshots of both themes, taken from the runtime-verified install

Real screenshots (headless Chromium against the actual running phpBB
3.3.18-dev harness install, not mockups) showing each theme rendered:
the Christmas Santa hat in the header corner plus the smaller matching
icon on the forum list, and the Valentine's Day heart in the header
corner. Excluded from the packaged extension archive (docs
export-ignore), matching .github.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Link docs/screenshots from README

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Modernize README: Requirements, Contributing, Acknowledgments, License

Filled in the gaps against this project's standard README shape:
no Requirements section (PHP/phpBB version support was only in
composer.json), no Contributing section, no Acknowledgments, no
License section despite a real license.txt already in the repo.
Support section reworked to route bug reports to Issues (enabled on
this repo) and everything else to the existing phpBB.com support
thread, since Discussions isn't enabled here.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Acknowledge the contributors whose PRs this branch reconciled

Matt Friedman (MattF) for the original Valentine's Day theme (#5),
Rich McGirr (RMcGirr83) for the original jQuery banner technique (#6),
and Galixte (Raphael M.) for extending it to additional styles (#7).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Add docs/screenshots/README.md

Explains what the two screenshots are and how they were captured.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Link the filenames in docs/screenshots/README.md to the images

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Fix misattribution: Valentine's Day theme was TWEagle's, not Matt Friedman's

Verified against PR #5's actual commit author, not just guessed from
context. Matt Friedman (MattF/VSE) is still credited correctly
elsewhere (composer.json, as one of the extension's two original
authors) -- he just wasn't the one who added Valentine's Day. Also
linked rmcgirr83 and Galixte's GitHub profiles for consistency.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Modernize file headers and composer metadata

Use the standard phpBB Modders header in every PHP file while keeping
the original author, copyright and translator lines. composer.json:
phpBB Modders as Extension Developer, earlier contributors as Past
Developer, phpbbmodders.com homepage, and keywords.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Sep 27, 2026
@bonelifer

Copy link
Copy Markdown
Contributor

Thanks for this. Its changes are now merged as part of #8, which combines #5, #6 and #7 into one update. See #8's description for what was kept and what was adjusted. Closing this one.


Investigated and written by Claude on behalf of William Jacoby (bonelifer).

@bonelifer bonelifer closed this Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants