Recent content by XboxUnlimited

  1. XboxUnlimited

    XF 2.2 how to check if record exists before saving with basicEntitySave

    Couldn't get it working with pre-save but I have got this working now by using the finder to check for the record before calling the basicEntitySave - might not be the "correct" way of doing it but it works (y)
  2. XboxUnlimited

    XF 2.2 Prevent double click on form submit?

    ** I worked out a solution to get around this - this thread can be deleted if needed **
  3. XboxUnlimited

    XF 2.2 Prevent double click on form submit?

    Does anyone know if there is a way prevent "double-click" on a form submit button? Is there anything build into Xenforo I could use? Thanks
  4. XboxUnlimited

    XF 2.2 Looking for guide to implement Alerts correctly

    Hi, I was just wondering if there are any guides on how to implement Alerts to add-ons correctly, I have looked around and haven't spotted anything yet Thanks
  5. XboxUnlimited

    XF 2.2 how to check if record exists before saving with basicEntitySave

    Thanks, redirect doesn't appear to work from the _preSave, it gives and error, the same redirect code does work from the controller not with in the entity - ** Update - you have to use "return \XF::app()->router('public')->buildLink(''$url);' **
  6. XboxUnlimited

    XF 2.2 how to check if record exists before saving with basicEntitySave

    Ok I have this working now (nearly) - this->error() does kill it so that works ok, but what I would like to do is kill it without any onscreen message and then redirect to another page, is that possible? Thanks
  7. XboxUnlimited

    XF 2.2 how to check if record exists before saving with basicEntitySave

    Yes, I am using basicEntitySave in my controller, however it's highly likely I'm doing something wrong here :) So basically I have a form in my template and the data is saved to the database once submitted, however is you click the submit quickly many times it will save the data multiple times...
  8. XboxUnlimited

    XF 2.2 how to check if record exists before saving with basicEntitySave

    Thanks, I'm getting there now kind of working, how do I stop it saving the record if duplicate exist, I get the warning but it still saves it. So basically if duplicate error is detected I want to skip the save
  9. XboxUnlimited

    XF 2.2 how to check if record exists before saving with basicEntitySave

    I have added this to my controller (is that right?), but it doesn't seem to do anything, looks like the _presave code is being ignored,
  10. XboxUnlimited

    XF 2.2 Can i use PHP date_diff in template?

    Hi, I'm trying to calculate the number of days between two dates and display the result in my template, does anyone know if the php function date_diff can be used?
  11. XboxUnlimited

    XF 2.2 how to check if record exists before saving with basicEntitySave

    Hi, I'm using $form->basicEntitySave to save inputs from a form into my database which all works well, the only problem is that it allows duplicates which I don't want, so I'm probably missing something obvious but how do you check if the record exists before saving? Is there a build in...
  12. XboxUnlimited

    XF 2.2 How do I add a form/button to template!

    Ok - I've worked out how to add the form to the template and I'm using hidden inputs to pass the variables I want to store in the database I just need to work out the correct way to submit the form and save the data in the hidden inputs to the database, again any advice on this would be a great...
  13. XboxUnlimited

    XF 2.2 How do I add a form/button to template!

    Hi, I'm looking to add a button to a custom template of mine and then when it's clicked data is written to a table in the database, I'm not sure what the best way would be to about that, using a form, or a button? I looked around the documentation etc but still not sure, if anyone has any...
  14. XboxUnlimited

    Xbox Unlimited

    * UPDATE * I have been working on a large update to my gamepass add-on, new features include. 1) New custom built homepage 2) New section for PC Games 3) Updated game info page 4) Gamepass history/graveyard page 5) Stats page Plus loads of behind the scenes to keep the game list and stats up...
Top Bottom