Jump to content

Matthew Bayliss

Members
  • Content Count

    298
  • Joined

  • Last visited

  • Days Won

    2

Matthew Bayliss last won the day on June 20

Matthew Bayliss had the most liked content!

About Matthew Bayliss

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Matthew Bayliss

    Output image filename from select list

    Perfect, thanks!
  2. I'm assuming this is possible just not sure of the correct code. Can we output the filename of the option image used in a single select list? Ie: not the path or the image, literally just the value such as "option-image.jpg"
  3. Matthew Bayliss

    Using st/rd/th in date field

    Ok sure, thanks!
  4. Matthew Bayliss

    Using st/rd/th in date field

    For the output on the custom date field is it possible to output the relevant 'st', 'rd' or 'th'. Eg: instead of Tuesday 7 August have it say Tuesday 7th August. Normally I would use S - eg: 'l jS F' - but the syntax for strftime seems to be different?
  5. Matthew Bayliss

    Expired listings still showing up in modules

    Ok great, thanks!
  6. Matthew Bayliss

    Expired listings still showing up in modules

    So this is what I've come up with based on the workaround idea I mentioned in the last post. It definitely works, just not sure if there's a better way? <?php $expired = $listing['Listing']['publish_down'] != NULL_DATE && strtotime($listing['Listing']['publish_down']) < time(); ?> <?php if($expired == "0"):?> <!–– listing template --!> <?php endif;?>
  7. Matthew Bayliss

    Expired listings still showing up in modules

    Yeah that sounds like what's happening. Only issue is that we need to be able to stop the listing outputting part way through the day as it relates to offers which we're not supposed to show after they've expired. Setting to end a day early would't work either as for big events they're only live for part of one day so they wouldn't show at all. Plus interest peaks closer to when the offer ends so again wouldn't want it to end early. We'd previously been using a butchered version of the joomla banner system to contain these but wanted to use the related listing functions of jreviews. What if we checked the current time in the module theme file and compared to the joomla expiration time field. We'd have the module on a short cache so there would be a bit of overlap (but we'd have that anyway with the cache, whichever way we did it) but means the database query could still be cached, right?
  8. Matthew Bayliss

    Expired listings still showing up in modules

    We've not upgraded to 3.x but it is the latest version of 2.7 (v2.7.26.1). So after doing a bit more digging it seems that they are expiring but the time is ignored - ie: ones expired yesterday are removed but ones expired earlier today are still showing. Is that by design?
  9. We've just noticed that on one site listings that have been set to expire using the default joomla field are still being included in the jreviews modules. The listing is identified as expired in both the joomla article manager and jreviews (see: https://snag.gy/L7kNnT.jpg). The 'Expiration Date' field is set to 'Yes' in the standard fields section of the relevant listing type settings. Have also cleared cache etc.. to make sure it's not that. The article also expires as expected within joomla modules. Any suggestions as to why they're still showing up in jreviews modules?
  10. Matthew Bayliss

    Manually insert related listing modules into listing

    Ah got you. Ok great, all works perfectly, thanks.
  11. Matthew Bayliss

    Manually insert related listing modules into listing

    Ok that makes sense. One final question for you. When loading a module manually using the $moduleParams = array method mentioned above, if there are no listings the "No entries were found" message is not outputting. I've not touched this in the module theme file so it still reads: <?php if(empty($listings)) { __t("No entries were found") . '<br /><br />'; return; } ?> The same theme file outputs correctly when used in a normal module though.
  12. Matthew Bayliss

    Manually insert related listing modules into listing

    Sorry that wording was a bit confusing. Possibly a bit difficult to explain. Say you're outputting a module manually within a theme file using code similar to: <?php $moduleParams = array( 'module_id'=>rand(1000,10000), 'module'=>array( 'listing_order'=>'latest', // rdate|rating|rrating|topratededitor|raviews|random|featuredrandom|rhits|proximity 'custom_where'=>"(Field.jr_eventrl LIKE '%*{$listing['Listing']['listing_id']}*%')", 'moduleclass_sfx' => '' // Module suffix ) ); echo $this->requestAction('module_listings/index',$moduleParams); ?> What I want to do is add a link in the on page menu at the start of the page if that module exists but leave it out if it isn't. Ie: Could I query $moduleParams somehow to see if anything is going to be returned or is that not possible? Within the listing unit I know I could check to see if there were any listings, but this is on a different part of the page
  13. Matthew Bayliss

    Manually insert related listing modules into listing

    Bit of an old thread but this question is related so thought it best to keep it all together. If you're inserting related listing modules directly into the theme file (as in the OP), is there any way to determine whether or not the module matches any listings and query that within the theme file? Basically we have a menu to navigate the page and ideally we would only output the menu link for that section if there were listings being output in the module.
  14. Matthew Bayliss

    Custom Where For Specific Year in Date Field

    Ah perfect, thanks!
  15. I've check through the docs on using date fields in the custom where section of a module but couldn't see anything relevant in the examples (https://docs.jreviews.com/?title=Using_Custom_Params,_Custom_Where_and_Custom_Order_settings#CUSTOM_WHERE_examples_using_dates). If we have a custom date field (jr_eventdate) is it possible to select all listings from a specific year. Ie: Where jr_eventdate = 2017. I want to use it to create an archive of events. Thanks!
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Please refer to our Privacy Policy.