Skip to content

Commit

Permalink
Merge pull request #529 from WoollyinWalesIT/nightly
Browse files Browse the repository at this point in the history
Nightly
  • Loading branch information
jomres authored Nov 16, 2022
2 parents 50d335d + a1eed5c commit 662e854
Show file tree
Hide file tree
Showing 1,139 changed files with 13,612 additions and 12,358 deletions.
60 changes: 60 additions & 0 deletions CHANGELOG_JOMRES
Original file line number Diff line number Diff line change
@@ -1,3 +1,63 @@
<h3>Jomres 10.6.0 08/11/2022</h3>

<span class="label label-success">Feature</span> Property switching dropdown re-added to Jomres, and significantly updated. This allows us to switch properties quickly when administering properties. This is a useful older feature that has been reintroduced and updated to be context sensitive.
<span class="label label-success">Feature</span> Shortcodes can now define custom templates. Example : {jomres asamodule_random &asamodule_random_listlimit=3&basic_module_output.html=basic_module_output_circular.html} If basic_module_output_circular.html exists in the override directory, it will be used instead. Allows individual shortcodes to be highly customised without needing to modify any code.
<span class="label label-success">Feature</span> An old friend returns to the stage, updated for BS5 : Slideshow images now show in property lists and basic module output areas. Works best with the BS5 carousel plugin installed. Works ok with the native Galleria slideshow plugin, but the slideshow heights aren't exactly right, slideshow images are cropped by Galleria. This slideshow feature can detect if more than 1 Main Property Image has been uploaded, and if so, then a slideshow is shown where previously just an image was shown. A new card_image.html template is the fallback template.
<span class="label label-success">Feature</span> Added a new feature to patTemplate where if the unused vars setting ( e.g. <patTemplate:tmpl name="pageoutput" unusedvars="import">) is set to import, then any missing definitions will be checked to see if they're language file definitions. If so, we can automatically replace them. This means that we don't need to add language definitions to scripts that call a template file, the definition will be automatically added. Older templates (including BS5 templates) will not have this "import" flag set. It's possible they contain items that shouldn't be there, but it's now an option to use this import ability in new template files. I have been trying unsuccessfully for ages to find a way to not constantly need to define language strings in calling scripts but all of the things I tried resulted in too much memory use. This solution is smaller and subsequentially faster.
<span class="label label-success">Feature</span> Added new menu options to Joomla plugin : Guest Bookings & My Profile
<span class="label label-success">Feature</span> Added (commented out but available) property features and room features to basic module output script.
<span class="label label-success">Feature</span> Add canonical tag to meta on Joomla
<span class="label label-success">Feature</span> Added a new script that allows site admins to show a property widget for a single property wherever they want, through a shortcode.
<span class="label label-success">Feature</span> Updated run_jomres_shortcode function so that WP style shortcodes can be used. Both older {} shortcode braces can be used, as well is [] (WP style) braces. Leads to simpler documentation.
<span class="label label-success">Feature</span> Added occupancy to basic module output html
<span class="label label-success">Feature</span> Added booking link
<span class="label label-success">Feature</span> Image uploading now defaults to using just max width setting, and implemented cropping for images.

<span class="label label-warning">Change</span> Tariff configuration mode switching disabled for properties using Micromanage, and all new properties will be using micromanage mode from now on. The big OTAs are moving to using rate plans like Micromanage mode, and having more than one tariff mode was making the booking engine overly complicated. So, now the old Guest Types functionality is disabled, we'll switch to everybody using the newer Adult and Child types and moving forward we only need to maintain the one mode. With this decision, I can now create more variations on that mode.
<span class="label label-warning">Change</span> Loads'a markup improvements in BS5.
<span class="label label-warning">Change</span> Set the timezone in the class calling the logger
<span class="label label-warning">Change</span> Catch abuse of redirect url and don't respond.
<span class="label label-warning">Change</span> Don't trigger webhook event scripts on error, as the event script itself could be the cause.
<span class="label label-warning">Change</span> Changed how old plugin update check works, now it shows where warnings show.
<span class="label label-warning">Change</span> Added a warning to Update feature so that users will be aware that they're updating to the Nightly branch if Dev mode enabled.
<span class="label label-warning">Change</span> Add region id to list regions page
<span class="label label-warning">Change</span> Added a class to add border radius to module data
<span class="label label-warning">Change</span> Added number accommodates to get_property_module_data function.
<span class="label label-warning">Change</span> Removed bootstrap warning as it's no longer applicable.
<span class="label label-warning">Change</span> noimage.gif updated to svg
<span class="label label-warning">Change</span> Added a new property_state_change webhook and caching feature to get_property_module_data function to create/use cache files. Caching is not yet used, as it needs a bit more work yet.
<span class="label label-warning">Change</span> Remove a previous change to route handling in api.
<span class="label label-warning">Change</span> Move property image and slideshow options so that they're first and second respectively in media centre.
<span class="label label-warning">Change</span> Fullscreen view and Video tutorials now fixed to bottom as most of the time they're not used.
<span class="label label-warning">Change</span> Ensure BS5 templates use lazy image loading.
<span class="label label-warning">Change</span> Removed buttons from room type/property feature output that typically appears in list properties (search results)
<span class="label label-warning">Change</span> Change how we check for an existing image so that the thumb is correctly returned and not the large image, should speed up the media centre.
<span class="label label-warning">Change</span> new css class card-img-height added to basic module output
<span class="label label-warning">Change</span> Comparison table received some love
<span class="label label-warning">Change</span> Updated default image upload sizes
<span class="label label-warning">Change</span> Check to see if the search function has been called as a shortcode. If it has, don't show the search header output. It's not designed to be there and won't work.
<span class="label label-warning">Change</span> Top and bottom templates don't show any output if menuoff is in url
<span class="label label-warning">Change</span> get property details function now returns menuoff by default as part of the url, but a new flag ensures that subsequent urls don't include menuoff
<span class="label label-warning">Change</span> Added full property description to property header script
<span class="label label-warning">Change</span> Property header disabled on all pages except viewproperty
<span class="label label-warning">Change</span> Added site address details to common strings
<span class="label label-warning">Change</span> Changed how emails are obsfucated. Older js didn't work well enough. Obsfucation is mostly theatre, any semi-smart bot will always unscramble the email address with ease.
<span class="label label-warning">Change</span> Improved markup in show property rooms template
<span class="label label-warning">Change</span> Added a definition that says that Jomres Core has been run. This helps Jomres scripts used as shortcodes to know if Jomres is shown on that particular page. Because Jomres isn't a traditional Joomla component which relies on Views, we can't just check the current active menu, so this is the next best thing.
<span class="label label-warning">Change</span> Project pups added to X-Clacks-Overhead-Jomres. Faithful companions will always be remembered. Yeah, I'm sentimental about my dogs.
<span class="label label-warning">Change</span> In BS5 we use property module data in show my reviews script
<span class="label label-warning">Change</span> If the guest has no profile information, we'll redirect them to Edit My Account to put that right when they try to view their profile page.
<span class="label label-warning">Change</span> Added usage of different comparison methods to new sleeps adults and sleeps children searches
<span class="label label-warning">Change</span> Sticky class removed from sidebar as it's effectiveness depends on the host template
<span class="label label-warning">Change</span> added a new wrapper script that will redirect a property to it's correct list tariffs xxx page when called.

<span class="label label-important label-danger">Fix</span> PHP8.1 adjustments
<span class="label label-important label-danger">Fix</span> Check that a presumed array is an array
<span class="label label-important label-danger">Fix</span> Disabled old qr code generation scripts are they're throwing errors in PHP8.1. I'll leave the old script in place for now as it can't be run by outside actors and it allows backward compatability for older sites if they want to continue using it.
<span class="label label-important label-danger">Fix</span> Tweaked db image importer to ensure that it always imports, it stopped working so I assume php8.1 is at fault but I couldn't track it down.
<span class="label label-important label-danger">Fix</span> Added random identifier for an id that was missing. Basic module output.
<span class="label label-important label-danger">Fix</span> Added a check in case a property type has been modified and a new room didn't get added.

<h3>Jomres 10.5.5 02/10/2022</h3>

<span class="label label-success">Feature</span> Updated the no-Bootstrap code so that Jomres itself uses Bootstrap 5 for layout if the theme doesn't support it.
Expand Down
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
# Jomres
# Jomres Core - Online Booking Engine for WordPress and Joomla

Jomres is the only PHP Online Booking engine with PMS features and built-in REST API for the Joomla and WordPress Content Management Systems.
Jomres is the only Joomla & WordPress Online Booking engine with PMS features and built-in REST API.

It is 100% Open Source.

Best installed through the CMS's install from web feature.
Install it through the CMS's install from web feature, just search for Jomres and follow the onscreen instructions. Do not download the zip file in the Releases section and attempt to install it, it won't work, you *must* use the install from web process in the CMS.

[Installation Guide ](https://www.jomres.net/documentation)


For more information, please see https://www.jomres.net

Most recent changes : See the [Nightly commits list](https://github.com/WoollyinWalesIT/jomres/commits/nightly)

Tech : PHP/Mysql/Apache/JavaScript

## Mature

Started in 2005 and consistently maintained ever since Jomres has evolved to be a powerful online booking engine for both WordPress and Joomla.

## Powerful

Every website wants to be a little different, every designer and developer looks at Booking.com and AirBNB and thinks "I can do better", and rightly so. Jomres has been designed from the ground up to be flexible so that designers and developers can build the way they want.

Using it's own plugin system code can be inserted and overridden easily to change how it works allowing developers to customise it's functionality to suit their own requirements.

## Free

There's no hook or catch. This Core system is available completely free.
31 changes: 2 additions & 29 deletions admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @author Vince Wooll <[email protected]>
*
* @version Jomres 10.5.5
* @version Jomres 10.6.0
*
* @copyright 2005-2022 Vince Wooll
* Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly
Expand Down Expand Up @@ -113,7 +113,7 @@
if (!AJAXCALL) {
$pageoutput = array();
$output = array();

//generate the cpanel menu
$MiniComponents->specificEvent('19997', 'menu', array());
$output[ 'CONTROL_PANEL_MENU' ] = $MiniComponents->miniComponentData[ '19997' ][ 'menu' ];
Expand All @@ -137,13 +137,6 @@
//bootstrap
$output[ 'USING_BOOTSTRAP' ] = 'true';


// Review message
$output['REVIEW_REQUEST'] = $MiniComponents->specificEvent('16000', 'show_reviews_message', array('output_now' => false));

// Feedback message
$output['FEEDBACK_REQUEST'] = $MiniComponents->specificEvent('16000', 'show_feedback_message', array('output_now' => false));

//output top area
$pageoutput[ ] = $output;
$tmpl = new patTemplate();
Expand Down Expand Up @@ -173,26 +166,6 @@
}
}

if ($jrConfig['development_production'] != 'development') {
if (
get_showtime('task') != 'save_site_settings' &&
get_showtime('task') != 'site_settings' &&
get_showtime('task') != 'showplugins' &&
get_showtime('task') != 'addplugin' &&
get_showtime('task') != 'removeplugin' &&
get_showtime('task') != 'updates'
) {
//jomres plugin update check
$output['PLUGIN_UPDATES_AVAILABLE'] = $MiniComponents->specificEvent('16000', 'jomres_plugin_update_check', array('output_now' => true));
if ($output['PLUGIN_UPDATES_AVAILABLE'] != false) {
return;
}
}
}




//output bottom area
if (!AJAXCALL) {
// $pageoutput[] = $output;
Expand Down
2 changes: 1 addition & 1 deletion api/classes/all_api_features.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @author Vince Wooll <[email protected]>
*
* @version Jomres 10.5.5
* @version Jomres 10.6.0
*
* @copyright 2005-2022 Vince Wooll
* Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly
Expand Down
2 changes: 1 addition & 1 deletion api/classes/call.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @author Vince Wooll <[email protected]>
*
* @version Jomres 10.5.5
* @version Jomres 10.6.0
*
* @copyright 2005-2022 Vince Wooll
* Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly
Expand Down
2 changes: 1 addition & 1 deletion api/classes/call_self.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @author Vince Wooll <[email protected]>
*
* @version Jomres 10.5.5
* @version Jomres 10.6.0
*
* @copyright 2005-2022 Vince Wooll
* Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly
Expand Down
9 changes: 7 additions & 2 deletions api/classes/logging.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @author Vince Wooll <[email protected]>
*
* @version Jomres 10.5.5
* @version Jomres 10.6.0
*
* @copyright 2005-2022 Vince Wooll
* Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly
Expand Down Expand Up @@ -127,24 +127,29 @@ public static function log_message($message, $channel = 'Core', $level = 'DEBUG'
$stream_handler = new StreamHandler($jrConfig['log_path'].$log_file, Logger::DEBUG);
$stream_handler->setFormatter($formatter);

$timezone = new \DateTimeZone(date_default_timezone_get() ?: 'UTC');
if ( defined('AJAXCALL') && !AJAXCALL && !defined("API_STARTED") ) {
if ($jrConfig['development_production'] == 'development' ) {

$logger = new Logger($channel);
$logger->setTimezone($timezone);
$logger->pushProcessor(new \Monolog\Processor\WebProcessor); // pushing the web server preprocessor
$browserHandler = new \Monolog\Handler\BrowserConsoleHandler(\Monolog\Logger::DEBUG);
$logger->pushHandler($browserHandler);
$logger->addDebug($message, array ("info_dump" => $further_info_dump) );
$logger->debug($message);
}
}

$message = $username.' ~~ '.$message.' ~~ '.session_id().' ~~ '.$url;

$loggerTimeFormat = "Y-m-d H:i:s.u";
$loggerFormat = "[%datetime%] %level_name% %message% %context% %extra%\n";
$formatter = new LineFormatter($loggerFormat, $loggerTimeFormat);

$logger = new Logger($channel);
$logger->setTimezone($timezone);

$logger->useMicrosecondTimestamps(true);
$logger->pushProcessor(new \Monolog\Processor\WebProcessor());

Expand Down
2 changes: 1 addition & 1 deletion api/classes/validate_property_access.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @author Vince Wooll <[email protected]>
*
* @version Jomres 10.5.5
* @version Jomres 10.6.0
*
* @copyright 2005-2022 Vince Wooll
* Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly
Expand Down
2 changes: 1 addition & 1 deletion api/classes/validate_scope.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @author Vince Wooll <[email protected]>
*
* @version Jomres 10.5.5
* @version Jomres 10.6.0
*
* @copyright 2005-2022 Vince Wooll
* Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly
Expand Down
2 changes: 1 addition & 1 deletion api/custom_methods.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @author Vince Wooll <[email protected]>
*
* @version Jomres 10.5.5
* @version Jomres 10.6.0
*
* @copyright 2005-2022 Vince Wooll
* Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly.
Expand Down
8 changes: 4 additions & 4 deletions api/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
* @author Vince Wooll <[email protected]>
*
* @version Jomres 10.5.5
* @version Jomres 10.6.0
*
* @copyright 2005-2022 Vince Wooll
*
Expand Down Expand Up @@ -118,15 +118,15 @@
$_POST['client_id'] = '';
}

$client_id = filter_var($_POST['client_id'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);
$client_id = filter_var($_POST['client_id'], FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH);
logging::log_message('Received a token request from '.$client_id, 'API', 'INFO');
require_once __DIR__.'/oauth/token.php';
} else if (isset($_GET['client_id'])) {
$client_id = filter_var($_GET['client_id'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);
$client_id = filter_var($_GET['client_id'], FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH);
logging::log_message('Received a token request from '.$client_id, 'API', 'INFO');
require_once __DIR__.'/oauth/token.php';
} else {
$request = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);
$request = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH);
logging::log_message(' Received a token which sent '.$request, 'API', 'INFO');
require_once __DIR__.'/oauth/resource.php';
}
Expand Down
2 changes: 1 addition & 1 deletion api/language/en-GB.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @author Vince Wooll <[email protected]>
*
* @version Jomres 10.5.5
* @version Jomres 10.6.0
*
* @copyright 2005-2022 Vince Wooll
* Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly
Expand Down
2 changes: 1 addition & 1 deletion api/oauth/inc_configs.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @author Vince Wooll <[email protected]>
*
* @version Jomres 10.5.5
* @version Jomres 10.6.0
*
* @copyright 2005-2022 Vince Wooll
* Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly
Expand Down
2 changes: 1 addition & 1 deletion api/oauth/resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @author Vince Wooll <[email protected]>
*
* @version Jomres 10.5.5
* @version Jomres 10.6.0
*
* @copyright 2005-2022 Vince Wooll
* Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly
Expand Down
2 changes: 1 addition & 1 deletion api/oauth/server.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @author Vince Wooll <[email protected]>
*
* @version Jomres 10.5.5
* @version Jomres 10.6.0
*
* @copyright 2005-2022 Vince Wooll
* Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly
Expand Down
Loading

0 comments on commit 662e854

Please sign in to comment.