Recent content by hoks

  1. H

    XF 2.2 Censoring entire words that match wildcards?

    Hi, Suppose I have a censor word with wildcard fish* And someone makes a post containing the words fisherman fishing That words become ****erman ****ing Is there a way to censor the whole word so that it becomes ********* *******
  2. H

    XF 2.2 how to moderate a new post

    nvm, I'll use entity_pre_save instead :p
  3. H

    XF 2.2 how to moderate a new post

    I am writing an add-on to send a new post into moderation if it met certain criteria. I am currently using the entity_post_save event listener, to set the post's message_state to 'moderated', by using the $entity->set. But it doesn't work. What is the proper way to update the message_state...
  4. H

    [Xen-Soluce] User Upgrade Duration [Paid]

    Currently, the duration is not added to the remaining duration for a user upgrade. For example, the duration of an upgrade is 12 months. If a user pays for the upgrade 1 month before it's due, the upgrade is only valid for 12 months. Meaning the 1 month is "lost". Is is possible to add on to...
  5. H

    XF 2.2 Sending emails via Amazon SES, but using IAM role in place of SMTP authentication

    My site is currently using AWS SES to send mails, using the SMTP credentials. My security guys require me to rotate the SMTP key every 90 days, but soon my access to IAM may be revoked. Hence, I would like to find out if there is a way to configure Xenforo to send mail via SES API, so that we...
  6. H

    XF 2.2 storing temporary global data?

    i am writing an addon that connects to an external API using oauth2. The oauth token expires after an hour. Instead of refreshing the token with each api call, I would like to store this token somewhere in xenforo. Does XF have a temporary global storage that I can use to save the oauth token?
  7. H

    XF 2.2 Redirect then show a message?

    It is possible to save a "system message", and then redirect the user to another to display the message? For example, I am using a custom connected account. If the authentication fails at /connected_account.php, I want to redirect the user back to /login/ and then display the error...
  8. H

    How to handle error messages on callback for Custom connected account

    I created an add-on for a custom connected account using OAuth 2, based on Xenforo's LinkedIn connector The log-in works fine for valid accounts. But if there are some errors returned from the OAuth server, Xenforo will return a plain text error message like "An error occurred while connecting...
  9. H

    Ignore Content [Paid]

    I am using version 3.0.5 I found out that when I use the "Unignore All" button, the data is deleted correctly from xf_tic_ignore_content, but the data in xf_tic_ignore_content_cache is not updated. This causes the content that I have ignored to remain ignored, but the lists in...
  10. H

    Logging out of Xenforo from different site with same domain

    I have xenforo hosted on forums.xxxxxxxx.xxx And a regular site on www.xxxxxxxx.xxx The cookie domain is xxxxxxxx.xxx, so that both sites share some cookies. I am using the XF2 API to synchronize the session on forums and www via the xf_session cookie. I want to add a "log out" link on the...
  11. H

    XF 2.2 How to sort Notices in admin?

    I have hundreds of Notices (mostly imported from vbulletin) When I add a new notice, it will appear at some random position in the list, making it quite troublesome to locate. How do I sort the notices in chronological order? so that the newest notices always appear at the bottom of the list.
  12. H

    Not a bug SQL Error when searching using certain search keywords

    when the search terms include "AND" all caps Example when I search for "apples AND oranges", I get this error XF\Db\InvalidQueryException: MySQL query error [1064]: syntax error, unexpected '+' src/XF/Db/AbstractStatement.php:228 there is no error if I search "apples and oranges"
  13. H

    XF 2.2 Execute custom code when custom user field is saved?

    I created a checkbox custom user field in Preferences. Whenever a user save his preferences, I wish to check the status of the checkbox, then run some code depending on the checkbox's value. Do I create a new event listener? If so, which event do I select? Or do I create a class extension...
  14. H

    XF 2.2 Allow anonymous Report Content?

    Is there an option to allow a non-member to report content? We wish to let public users report offending posts.
  15. H

    XF 2.2 External redirect on login

    Hi Mike, I have 2 sites on the same domain (home.somedomain and forums.somedomain) Possible to allow users from home.somedomain to log in to forums.somedomain, then redirect them back to home.somedomain? Is there a hostname whitelist that I can configure?
Top Bottom