Enhancements and Fixes
Posted on 16 Nov '25 filed under Enamour.nu, Update
This will be the final update for November, as most of my time this month has been dedicated to addressing various fixes. This update is based on the script nested within Enamour.nu. I have added several new features that were missed by Listing Admin, which I find beneficial from Enthusiast. Moving forward, I will continue updating all fanlistings with these minor improvements.
- {country_count} now injected into templates where it was previously left unreplaced.
- show-stats.php: Computes the distinct country count for the current listing and applies
str_replace('{country_count}', $la_fl_country)in the template path. - For non-template paths, the
$la_fl_countryvariable is now set for downstream code when templates are not used.
- show-stats.php: Computes the distinct country count for the current listing and applies
- Enhanced
show-owned.phpto render templates with the country count.- Replaced the direct echo of
getTemplate_Listings($id)with template rendering andstr_replace('{country_count}', $la_fl_country, $tmpl). - Each listing object is now retrieved, and the distinct-country SQL is computed per listing before injection.
- Resolved issue with
membersSort()country case handling.
- Replaced the direct echo of
- Corrected
membersSort()country case handling.- Fixed incorrect variable usage (
$listing->dblistused instead of$listing->dbtabl). - Replaced misuse of
mysqli_num_rows()with the proper scorpions wrapper andCOUNT(*)query to return the total across all pages (not just the paged result). - Separated the paged
SELECTquery (withLIMIT) from theCOUNT(*)query to ensure the displayed total reflects the full count. - Corrected member identifier/format argument selection for cross-listed database types (Enthusiast, Fanbase, ListingAdmin), ensuring correct rendering of member rows.
- Fixed incorrect variable usage (
- Improved per-country counting in
membersDefault().- Utilizes the correct table name and DB-type-aware
COUNT(*)SQL query. - Escapes country values appropriately and reads the count via
scorpions->obj, ensuring reliable display of per-country totals.
- Utilizes the correct table name and DB-type-aware
- Miscellaneous improvements.
- Consistent usage of
scorpions->query,scorpions->obj, andscorpions->totalwhere applicable. - Applied basic SQL escaping and branching for different external database types (Enthusiast, Fanbase/Fanupdate, ListingAdmin).
- Consistent usage of


