• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Something similar to Replacement Variables in vB

#1
Hello All,

I was relying on Replacement Variables in vB to replace some letters in old and new messages.
I have seen an add-on but I think it replaces only for old posts, not new ones (needs to run again).

Any idea how to do this?

Thank you.
 

Chris D

XenForo developer
Staff member
#2
Do you have a specific example?

It actually sounds like something that can be done using the censoring system but I'm not totally sure what your use case in.
 
#3
Do you have a specific example?

It actually sounds like something that can be done using the censoring system but I'm not totally sure what your use case in.
Well, it something has to do with apple devices in the middle east.
In the middle east we use Hindi numerals instead of Arabic numerals. (strange, right?!)
I think apple differentiates between numerals in all languages. For example, if your password contains '1' in Hindi form, and you set it by an apple device, you will not be able to log in if you used the usual form '1'. This is not the case in Microsoft devices, where numerals are treated the same in the system.
Anyway!
My problem is that if a user enters a number (from apple device) using Hindi form, it will be displayed as special chars. For example, if you entered the number '8' in the Hindi form (https://en.wikipedia.org/wiki/Eastern_Arabic_numerals if you are interested) it will show ظ¨ instead of ٨.

Therefore Replacement Variables were useful.
I hope it is clear.

Thank you.
 

Chris D

XenForo developer
Staff member
#5
If I recall correctly, replacement variables in vBulletin were a bit more far reaching, I believe being applied before the final output of the page is displayed.

The censor system in XF only applies to content within posts (conversations, profile posts - basically any user generated content), but if that's sufficient then it should be usable.

Admin CP > Options > Censoring:

upload_2016-6-28_23-15-48.png

(I appreciate that's not the exact example)

But you get the idea. In this example any time 8 is used within a post, it is replaced with ٨.