DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • April 24, 2018, 02:11:09 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: NPC Bugfix  (Read 2205 times)
0 Members and 1 Guest are viewing this topic.
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« on: August 27, 2005, 12:43:44 PM »

Rather than searching for each of the NPC mods, and writing in each thread, spamming the board, I shall post it here and hope it finds the ears and nimble fingers of the coders.

When a NPC posts into commentary a person's name, the italics and bold tags get carried with it. To take care of this, I have created a nice little file.

It is called: special characters sanitize or sc_sanitize. Basically, it will strip off all over the bold and italic tags, replacing them with nothing. This will prevent those ugly things appearing in the commentary, when an NPC posts.

Steps that will need to be taken:
  • Download sc_sanitize.zip
  • Upload it to the lib folder, that is containted in your modules folder, not the one in your root directory.
  • Go into said lib folder (or if you have the older NPCs, the actual file itself in the modules folder) At the top, add after the <?php
    Code:
    require_once("sc_sanitize.php");
    Or if it is the whole file, and not "libulated":
    Code:
    require_once("/modules/lib/sc_sanitize.php");
  • Easy part comes next. Find all occurences of $session['user']['name'] and replace them with:
    Code:
    sc_sanitize($session['user']['name'])
    It would be best done if you have a Text Editor that can replace all occurences of them in a single file.
That is about it. It should prevent all italics and bold tags, that are filtered and just appear in the commentary.

Have fun with it.
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
33 Guests, 1 User
pharis
Home Forums News Downloads Login Register Advanced Search