MyBB Hacks

Full Version: Updated allow html
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
My ulitmate goal is to some how wrap a block of text so that the line breaks with in it are not replaced by <br />.

How ever i've got half a work around by trying to add a mycode that

replaced /n 

with 

(blank nothing nada zip)

which when i use the tester helpfully provided works...but when i hit save it says that i need to replace it with something which in this case doesnt work at all for me. 
 
[color=#cc0000]The following errors were encountered:[/color]
  • You did not enter a replacement.


Here is my site.

http://thehubrp.com/mybb/showthread.php?tid=4

as you can see on the top post some how some way i managed to get the change to stick for a hot second but then when i clicked save again like an idiot it was lost and all subsequent trials have failed. 

Conversely if someone can point me to where the heck in the code that /n is being replaced with <br /> so i can comment that bugger out i'd be happy with that work around. 

And even better if someone could point me to how to wrap a section of a posted message so NOTHING DOES ANYTHING TO IT (besides posting lol) i'd be eternally grateful. 

user:testuser

pw:testuser1


*for testing purposes this is the code i'm trying to insert. 

Code:
 



<link href='https://fonts.googleapis.com/css?family=Anaheim' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Raleway:900,800,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">

<style type="text/css">

.ntitle { width: 512px; background: #000; color: #fff; font-family: raleway; font-weight: 800; font-size: 30px; text-transform: uppercase; padding: 50px 30px 50px 30px; }
.nstuff { height: 345px; width: 330px; overflow: auto; text-align: justify; padding: 0px 5px 0px 0px; font-family: arial; font-size: 10px; line-height: 100%; }
thing { font-family: anaheim; font-size: 8px; text-transform: uppercase; margin-left: -15px; font-weight: normal; letter-spacing: 1px; color: #373737; }
.nstuff2 { height: 345px; overflow: auto; text-align: justify; font-family: arial; font-size: 10px; padding: 5px; }
.nstuffff { margin-left: 15px; }
.head { color: #ccc; font-family: raleway; font-weight: 900; text-transform: uppercase; font-size: 15px; padding: 5px; border-bottom: solid 1px #eee; margin: 5px; text-align: left; }
.ndetails { width: 541px; padding: 15px; raleway; font-weight: 700; background: #000; color: #fff; text-transform: uppercase; font-size: 8px; letter-spacing: 1px; margin-left: 20px; margin-top: -10px; text-align: center; }
.nshipper { background-color: #fafafa; border: 1px solid #eee; width: 550px; height: 400px; padding: 10px 10px 10px 10px; }
.Ncontainer {
height: 400;
width: 550;
}
.Ntabs {
position: relative;
width: 550px; 
height:  400px;
}
.Ntab {
float: left; }
.Ntab label {
display: block;
width: 90px;
height: 20px;
background: #fff;
padding: 10px; 
margin: 0px;
position: relative;
left: 0px;
top: 0px;
z-index: 3;
font-family: anaheim;
text-transform: uppercase; }
.Ntab input[type=radio]:checked ~ label {
border-bottom: 5px solid #ccc;
z-index: 2; }
.Ntab input[type=radio] {
display: none; }
.Ncontent {
position: absolute;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
background: white;
padding: 45px 0px 0px 0px;
opacity: 0; 
-webkit-transition-duration: 1s; 
-moz-transition-duration: 1s;
 -o-transition-duration: 1s; }
.Ntab input[type=radio]:checked ~ label ~ .Ncontent {
z-index: 1; 
opacity: 1; }
</style>

<center>
<div class="ntitle" style="background: MEMBER GROUP HEX">

first last

</div>
<div class="nshipper">
<div class="Ncontainer">

<div class="Ntabs">


<div class="Ntab">
<input type="radio" id="Ntab-1" name="Ntab-group-1" checked>
<label for="Ntab-1"> <i class="fa fa-home fa-fw" style="font-size: 10px;margin-top:5px"></i>&nbsp; image</label>
<div class="Ncontent">
<img src="http://placehold.it/550x355/eee" width="550" height="355">
</div>
</div>


<div class="Ntab">
<input type="radio" id="Ntab-2" name="Ntab-group-1">
<label for="Ntab-2"> <i class="fa fa-heartbeat" style="font-size: 10px;margin-top:5px"></i>&nbsp; in depth</label>
<div class="Ncontent">
<table cellpadding="5" cellspacing="0"><tr><td>

<img src="http://placehold.it/200x345/eee/" width="200" height="345">

</td><td>

<div class="nstuff">
<div class="nstuffff">
<div class="head">basics</div>
<thing>full name:</thing> here
<br>
<thing>nicknames/aliases:</thing> here
<br>
<thing>age:</thing> in letters
<br>
<thing>date of birth:</thing> ##day month, ## year
<br>
<thing>zodiac sign:</thing> here
<br>
<thing>place of birth:</thing> here
<br>
<thing>current residence:</thing> here
<br>
<thing>hometown:</thing> here
<br>
<thing>nationality:</thing> here
<br>
<thing>ethnicity:</thing> here
<br>
<thing>gender:</thing> here
<br>
<thing>pronouns:</thing> here
<br>
<thing>occupation:</thing> here
<br>
<thing>languages:</thing> here
<br>
<thing>member group:</thing> here
<br>
<thing>for a request?:</thing> here

<div class="head">appearance</div>

<thing>playby:</thing> here
<br>
<thing>height:</thing> here
<br>
<thing>weight:</thing> here
<br>
<thing>build:</thing> here
<br>
<thing>hair color:</thing> here
<br>
<thing>eye color:</thing> here
<br>
<thing>tattoos:</thing> here
<br>
<thing>piercings:</thing> here
<br>
<thing>scars:</thing> here
<br>
<thing>glasses/contacts:</thing> here
<br>
<thing>distinguishing features:</thing> here
<br>
<thing>best feature:</thing> here
<br>
<thing>demeanor:</thing> here

<div class="head">relationships</div>

<thing>sexual orientation:</thing> here
<br>
<thing>romantic orientation:</thing> here
<br>
<thing>parents:</thing> here
<br>
<thing>siblings:</thing> here
<br>
<thing>children:</thing> here
<br>
<thing>other family:</thing> here
<br>
<thing>relationship status:</thing> here
<br>
<thing>current partner:</thing> here
<br>
<thing>past partners:</thing> here
<br>
<thing>future partners:</thing> here
<br>
<thing>sex life:</thing> here
<br>
<thing>turn ons:</thing> here
<br>
<thing>turn offs:</thing> here

<div class="head">health</div>

<thing>physical ailments:</thing> here
<br>
<thing>neurological ailments:</thing> here
<br>
<thing>allergies:</thing> here
<br>
<thing>current addictions:</thing> here
<br>
<thing>past addictions:</thing> here
<br>
<thing>smoking:</thing> here
<br>
<thing>drugs:</thing> here
<br>
<thing>alcohol:</thing> here
<br>
<thing>scars:</thing> here

<div class="head">personality</div>

<thing>negative traits:</thing> here
<br>
<thing>positive traits:</thing> here
<br>
<thing>alignment:</thing> here
<br>
<thing>myers-briggs:</thing> here
<br>
<thing>element:</thing> here
<br>
<thing>hogwarts house:</thing> here
<br>
<thing>divergent faction:</thing> here
<br>
<thing>pet peeves:</thing> here
<br>
<thing>bad habits:</thing> here
<br>
<thing>fears:</thing> here
<br>
<thing>hopes and dreams:</thing> here
<br>
<thing>likes:</thing> here
<br>
<thing>dislikes:</thing> here

<div class="head">favorites</div>

<thing>television show:</thing> here
<br>
<thing>movie:</thing> here
<br>
<thing>book:</thing> here
<br>
<thing>character:</thing> here
<br>
<thing>author:</thing> here
<br>
<thing>song:</thing> here
<br>
<thing>food:</thing> here
<br>
<thing>school subject:</thing> here
<br>
<thing>holiday:</thing> here
<br>
<thing>season:</thing> here
<br>
<thing>color:</thing> here
<br>
<thing>feeling:</thing> here
<br>
<thing>location:</thing> here
<br>
<thing>person:</thing> here

</div></div></td></tr></table></div></div>


<div class="Ntab">
<input type="radio" id="Ntab-3" name="Ntab-group-1">
<label for="Ntab-3"> <i class="fa fa-pencil fa-fw" style="font-size: 10px;margin-top:5px"></i>&nbsp; freeform</label>
<div class="Ncontent">

<div class="nstuff2" style="padding: 10px 40px 10px 40px">
<div class="head">this is a header</div>
Tacos retro drinking vinegar, next level intelligentsia mixtape umami. Poutine pork belly cornhole vice pabst locavore. Blue bottle flannel pork belly, chicharrones cornhole humblebrag readymade. Bushwick pickled intelligentsia heirloom master cleanse locavore, echo park affogato fixie. Mlkshk chartreuse normcore butcher, flexitarian pop-up XOXO tilde chambray PBR&B. Hashtag drinking vinegar whatever, bespoke paleo cliche +1 chicharrones chia fixie you probably haven't heard of them intelligentsia. Blog pug four loko kinfolk disrupt, banjo portland celiac normcore narwhal franzen you probably haven't heard of them authentic.
<p>
Letterpress deep v gluten-free hella umami put a bird on it single-origin coffee godard. 8-bit post-ironic hammock forage four loko sriracha gastropub, lo-fi gentrify everyday carry. Wayfarers gluten-free organic 90's, letterpress small batch wolf kitsch. Synth salvia blog, pork belly plaid shoreditch 3 wolf moon. Flannel lumbersexual yuccie authentic, austin disrupt crucifix normcore meditation. Flannel helvetica church-key mlkshk. Fingerstache artisan tattooed raw denim, asymmetrical hoodie cred roof party tilde freegan mlkshk migas.
<p>
Pork belly meh banh mi kombucha trust fund. Normcore echo park cred, 8-bit cold-pressed waistcoat cardigan cornhole pour-over four loko blue bottle lumbersexual tote bag gochujang. Messenger bag wayfarers viral keffiyeh, banh mi letterpress cardigan pug celiac food truck. Hoodie retro organic poutine salvia, gluten-free vinyl. Distillery drinking vinegar schlitz biodiesel slow-carb listicle normcore, 8-bit franzen farm-to-table mixtape gluten-free helvetica flannel knausgaard. Chillwave quinoa four loko XOXO, mustache pork belly stumptown. Slow-carb flannel YOLO craft beer.
<p>
DIY quinoa chicharrones brooklyn VHS ethical. Butcher authentic freegan slow-carb. Celiac organic selvage art party fashion axe. Quinoa austin mustache intelligentsia ethical vinyl trust fund ugh cray whatever disrupt, listicle 90's. Four loko pop-up affogato, PBR&B vinyl austin DIY next level +1 literally flannel freegan tumblr williamsburg. Pinterest organic asymmetrical kickstarter mumblecore. Sartorial bushwick asymmetrical, mlkshk shoreditch occupy photo booth chambray hella affogato gastropub.
<p>
Tacos retro drinking vinegar, next level intelligentsia mixtape umami. Poutine pork belly cornhole vice pabst locavore. Blue bottle flannel pork belly, chicharrones cornhole humblebrag readymade. Bushwick pickled intelligentsia heirloom master cleanse locavore, echo park affogato fixie. Mlkshk chartreuse normcore butcher, flexitarian pop-up XOXO tilde chambray PBR&B. Hashtag drinking vinegar whatever, bespoke paleo cliche +1 chicharrones chia fixie you probably haven't heard of them intelligentsia. Blog pug four loko kinfolk disrupt, banjo portland celiac normcore narwhal franzen you probably haven't heard of them authentic.
<p>
Letterpress deep v gluten-free hella umami put a bird on it single-origin coffee godard. 8-bit post-ironic hammock forage four loko sriracha gastropub, lo-fi gentrify everyday carry. Wayfarers gluten-free organic 90's, letterpress small batch wolf kitsch. Synth salvia blog, pork belly plaid shoreditch 3 wolf moon. Flannel lumbersexual yuccie authentic, austin disrupt crucifix normcore meditation. Flannel helvetica church-key mlkshk. Fingerstache artisan tattooed raw denim, asymmetrical hoodie cred roof party tilde freegan mlkshk migas.
<p>
Pork belly meh banh mi kombucha trust fund. Normcore echo park cred, 8-bit cold-pressed waistcoat cardigan cornhole pour-over four loko blue bottle lumbersexual tote bag gochujang. Messenger bag wayfarers viral keffiyeh, banh mi letterpress cardigan pug celiac food truck. Hoodie retro organic poutine salvia, gluten-free vinyl. Distillery drinking vinegar schlitz biodiesel slow-carb listicle normcore, 8-bit franzen farm-to-table mixtape gluten-free helvetica flannel knausgaard. Chillwave quinoa four loko XOXO, mustache pork belly stumptown. Slow-carb flannel YOLO craft beer.
<p>
DIY quinoa chicharrones brooklyn VHS ethical. Butcher authentic freegan slow-carb. Celiac organic selvage art party fashion axe. Quinoa austin mustache intelligentsia ethical vinyl trust fund ugh cray whatever disrupt, listicle 90's. Four loko pop-up affogato, PBR&B vinyl austin DIY next level +1 literally flannel freegan tumblr williamsburg. Pinterest organic asymmetrical kickstarter mumblecore. Sartorial bushwick asymmetrical, mlkshk shoreditch occupy photo booth chambray hella affogato gastropub.
</div></div></div>

<div class="Ntab">
<input type="radio" id="Ntab-4" name="Ntab-group-1">
<label for="Ntab-4"> <i class="fa fa-user-plus" style="font-size: 10px;margin-top:5px"></i> &nbsp; plotting</label>
<div class="Ncontent">

<table cellpadding="3" cellspacing="0"><tr>

<td><div class="nstuff">

<div class="head">about</div>

Tacos retro drinking vinegar, next level intelligentsia mixtape umami. Poutine pork belly cornhole vice pabst locavore. Blue bottle flannel pork belly, chicharrones cornhole humblebrag readymade. Bushwick pickled intelligentsia heirloom master cleanse locavore, echo park affogato fixie. Mlkshk chartreuse normcore butcher, flexitarian pop-up XOXO tilde chambray PBR&B. Hashtag drinking vinegar whatever, bespoke paleo cliche +1 chicharrones chia fixie you probably haven't heard of them intelligentsia. Blog pug four loko kinfolk disrupt, banjo portland celiac normcore narwhal franzen you probably haven't heard of them authentic.
<p>
Letterpress deep v gluten-free hella umami put a bird on it single-origin coffee godard. 8-bit post-ironic hammock forage four loko sriracha gastropub, lo-fi gentrify everyday carry. Wayfarers gluten-free organic 90's, letterpress small batch wolf kitsch. Synth salvia blog, pork belly plaid shoreditch 3 wolf moon. Flannel lumbersexual yuccie authentic, austin disrupt crucifix normcore meditation. Flannel helvetica church-key mlkshk. Fingerstache artisan tattooed raw denim, asymmetrical hoodie cred roof party tilde freegan mlkshk migas.

<div class="head">friendly</div>

Pork belly meh banh mi kombucha trust fund. Normcore echo park cred, 8-bit cold-pressed waistcoat cardigan cornhole pour-over four loko blue bottle lumbersexual tote bag gochujang. Messenger bag wayfarers viral keffiyeh, banh mi letterpress cardigan pug celiac food truck. Hoodie retro organic poutine salvia, gluten-free vinyl. Distillery drinking vinegar schlitz biodiesel slow-carb listicle normcore, 8-bit franzen farm-to-table mixtape gluten-free helvetica flannel knausgaard. Chillwave quinoa four loko XOXO, mustache pork belly stumptown. Slow-carb flannel YOLO craft beer.
<p>
DIY quinoa chicharrones brooklyn VHS ethical. Butcher authentic freegan slow-carb. Celiac organic selvage art party fashion axe. Quinoa austin mustache intelligentsia ethical vinyl trust fund ugh cray whatever disrupt, listicle 90's. Four loko pop-up affogato, PBR&B vinyl austin DIY next level +1 literally flannel freegan tumblr williamsburg. Pinterest organic asymmetrical kickstarter mumblecore. Sartorial bushwick asymmetrical, mlkshk shoreditch occupy photo booth chambray hella affogato gastropub.

<div class="head">romantic</div>

Tacos retro drinking vinegar, next level intelligentsia mixtape umami. Poutine pork belly cornhole vice pabst locavore. Blue bottle flannel pork belly, chicharrones cornhole humblebrag readymade. Bushwick pickled intelligentsia heirloom master cleanse locavore, echo park affogato fixie. Mlkshk chartreuse normcore butcher, flexitarian pop-up XOXO tilde chambray PBR&B. Hashtag drinking vinegar whatever, bespoke paleo cliche +1 chicharrones chia fixie you probably haven't heard of them intelligentsia. Blog pug four loko kinfolk disrupt, banjo portland celiac normcore narwhal franzen you probably haven't heard of them authentic.
<p>
Letterpress deep v gluten-free hella umami put a bird on it single-origin coffee godard. 8-bit post-ironic hammock forage four loko sriracha gastropub, lo-fi gentrify everyday carry. Wayfarers gluten-free organic 90's, letterpress small batch wolf kitsch. Synth salvia blog, pork belly plaid shoreditch 3 wolf moon. Flannel lumbersexual yuccie authentic, austin disrupt crucifix normcore meditation. Flannel helvetica church-key mlkshk. Fingerstache artisan tattooed raw denim, asymmetrical hoodie cred roof party tilde freegan mlkshk migas.

<div class="head">antagonistic</div>

Pork belly meh banh mi kombucha trust fund. Normcore echo park cred, 8-bit cold-pressed waistcoat cardigan cornhole pour-over four loko blue bottle lumbersexual tote bag gochujang. Messenger bag wayfarers viral keffiyeh, banh mi letterpress cardigan pug celiac food truck. Hoodie retro organic poutine salvia, gluten-free vinyl. Distillery drinking vinegar schlitz biodiesel slow-carb listicle normcore, 8-bit franzen farm-to-table mixtape gluten-free helvetica flannel knausgaard. Chillwave quinoa four loko XOXO, mustache pork belly stumptown. Slow-carb flannel YOLO craft beer.
<p>
DIY quinoa chicharrones brooklyn VHS ethical. Butcher authentic freegan slow-carb. Celiac organic selvage art party fashion axe. Quinoa austin mustache intelligentsia ethical vinyl trust fund ugh cray whatever disrupt, listicle 90's. Four loko pop-up affogato, PBR&B vinyl austin DIY next level +1 literally flannel freegan tumblr williamsburg. Pinterest organic asymmetrical kickstarter mumblecore. Sartorial bushwick asymmetrical, mlkshk shoreditch occupy photo booth chambray hella affogato gastropub.

<div class="head">other</div>

Tacos retro drinking vinegar, next level intelligentsia mixtape umami. Poutine pork belly cornhole vice pabst locavore. Blue bottle flannel pork belly, chicharrones cornhole humblebrag readymade. Bushwick pickled intelligentsia heirloom master cleanse locavore, echo park affogato fixie. Mlkshk chartreuse normcore butcher, flexitarian pop-up XOXO tilde chambray PBR&B. Hashtag drinking vinegar whatever, bespoke paleo cliche +1 chicharrones chia fixie you probably haven't heard of them intelligentsia. Blog pug four loko kinfolk disrupt, banjo portland celiac normcore narwhal franzen you probably haven't heard of them authentic.
<p>
Letterpress deep v gluten-free hella umami put a bird on it single-origin coffee godard. 8-bit post-ironic hammock forage four loko sriracha gastropub, lo-fi gentrify everyday carry. Wayfarers gluten-free organic 90's, letterpress small batch wolf kitsch. Synth salvia blog, pork belly plaid shoreditch 3 wolf moon. Flannel lumbersexual yuccie authentic, austin disrupt crucifix normcore meditation. Flannel helvetica church-key mlkshk. Fingerstache artisan tattooed raw denim, asymmetrical hoodie cred roof party tilde freegan mlkshk migas.
</div></td>
<td>

<img src="http://placehold.it/200x345/eee/" width="200" height="345">

</td></tr></table>

</div>
</div>

<div class="Ntab">
<input type="radio" id="Ntab-5" name="Ntab-group-1">
<label for="Ntab-5"> <i class="fa fa-cog fa-fw" style="font-size: 10px;margin-top:5px"></i> &nbsp; player</label>
<div class="Ncontent">
<table cellpadding="5" cellspacing="0"><tr><td>
<img src="http://placehold.it/200x160/eee" width="200" height="160">
<p>
<img src="http://placehold.it/200x160/eee" width="200" height="160">
</td><td>
<div class="nstuff">
<div class="nstuffff">
<div class="head">alias</div>
<thing>nicknames:</thing> here
<br>
<thing>age:</thing> here
<br>
<thing>pronouns:</thing> in letters
<br>
<thing>timezone:</thing> ##day month, ## year
<br>
<thing>contact:</thing> here
<br>
<thing>triggers:</thing> here
<br>
<thing>mature threading:</thing> here
<br>
<thing>other characters:</thing> here
<thing>about:</thing> write a lil' bout yourself here!
</td></tr></table>

</div></div></div></div></div> </div>
<div class="ndetails" style="background: MEMBER GROUP HEX">
age. occupation. group. playby.
</div>
<a href="http://shine.jcink.net/index.php?showuser=11594">thanks♥︎</a>
</center>


Thank you all very much! I know i'm super newbish here!

(usecase: running an RP site where the users are trusted to post templates for their posts, which include css and JS possibly all need to run with out interference. I'm happy to hack the files, just keep running into dead ends when i try and find what exactly is causing this. )

Just search inc/class_parser.php for "<br" and you'll eventually find it.
An alternative is to just strip out newlines before the MyBB parser gets to it - that way, nothing gets replaced with <br> because there's no newlines.
Stopping the parser doing anything can be a bit tricky as the parser doesn't really understand 'exclusion zones' or the like.
Reference URL's