Post by Kami on Jan 4, 2020 9:46:43 GMT -8
Jan 4, 2020 2:45:01 GMT -8 JD said:
Sorry, this request has become very convoluted. You say that its on the members page but you are also talking about censored words and "normal" tags which sounds like a very different request from what you originally stated.
Let's back this up a bit; forget about UBBC and censored words and posts and whatever else you use in conjunction with this.
1. Do you want a script to change @ tags in the templates to change into a properly linked URL to a member account?
Or
2. Do you want a script to change @ tags in the templates into properly linked member account OR a custom page, whichever is appropriate?
Or
3. Neither [please explain in as short a description as possible: where you want the script, what you want it to target, and where you would want the linked text to lead]
[Please note that we cannot affect the admin panel with a plugin, so regardless of your answers you will have to manually update both your templates and the censored words list]
Okay, bottom line is....
I would like to be able to type @theodora (for example) into a Layout Template in HTML and IF there is an account by that username, it auto becomes the tag/link to that member's account. If there is NOT an account by that username, I want it to auto become a link to the /page/npctheodora with the wording Theodora of Leventi (eg. <a href="/page/npctheodora">Theodora of Leventi</a> ). And I want this to auto adjust back and forth if and when an account with the username @theodora is created or deleted, so that it doesn't have to be edited every time someone takes up the character.
I would also like this to work in exactly the same way in custom pages.
And exactly the same in Headers and Footers coding.
I basically, would like this to be a global thing on the forum. I am already using the Censored Words function in order to do this to the BBcode of posts (but I have to update it every time an account is created/deleted).
Is that clearer? >..<" I'm so sorry - I clearly don't know the proper info/jargon to make myself clear and am confusing the situation - sorry!!! >..<"
So unfortunately, as a whole this isn't possible. In order for this to automatically know if a user account exists / have the links automatically update between NPC page or user account, we would need access to the database of your membership which we do not have. As part of the developer guidelines, we are also disallowed from sending automatic requests to the server, which would be required for this to update the way you're asking for (otherwise, the script would not be able to "know" if a tag should lead to a user acct or custom page).
Scripts and plugins can only affect or manipulate information that is readily available on a page OR that leads to a consistent, user-end result; so, you can manipulate an @ tag to consistently lead to a particular type of link (eg: an @ tag always leading to /user/ID or always leading to /page/ID) but you cant manipulate an @ tag to lead to content based on information you would have to request from the server (ie, the code would automatically have to "ask" the server if X account exists on a constant basis).
So to sum up: the code you are requesting would not be possible because we can only use javascript, which is a user-end language, meaning that we can only affect information / content we have access to. It's against developer guidelines to make codes that request information from PB servers, and we do not have access to the member database that houses this information.