|
|
Joined: Aug 2001
Posts: 19
Junior Member
|
|
Junior Member
Joined: Aug 2001
Posts: 19 |
Hello,
can anyone help me how to print out the codeblock ([ code]..[ /code]) into a textarea. instead between <hr><pre> ... </pre><hr> into <textarea>...</textarea>.
thx for your help
|
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
I'm not quite sure what your asking for. You want to display code without the <hr /> and <pre></pre> tags?
|
|
|
|
|
Joined: Aug 2001
Posts: 19
Junior Member
|
|
Junior Member
Joined: Aug 2001
Posts: 19 |
Hi JustDave, if you write a message you can put some information into a container. So this information is shown in the thread inside <pre> ... </pre>. What i want ist to display this information inside a textarea: <textarea> ... </textarea>. The goal for this is, that my users can better read an copy this information. thx Rufnex
|
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
Oh ok. Well that should be a simple matter of changing the markup code and replace the <hr /> and <pre> tags with the <textarea> tags.
I don't have time to look at this right now but I will when I get a chance.
|
|
|
|
|
Joined: Aug 2001
Posts: 19
Junior Member
|
|
Junior Member
Joined: Aug 2001
Posts: 19 |
Do you know the filename i've to work for this? 
|
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
You can find the do_markup and undo_markup functions in your ubbt.inc.php file. 
|
|
|
|
|
Joined: Aug 2001
Posts: 19
Junior Member
|
|
Junior Member
Joined: Aug 2001
Posts: 19 |
Oki .. i will try it ..  thx a lot!
|
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
Your welcome 
|
|
|
|
|
Joined: Aug 2001
Posts: 19
Junior Member
|
|
Junior Member
Joined: Aug 2001
Posts: 19 |
Uah ... if i change this block to <textarea> ... </textarea> i got another problem  Everythink works fine but inside the block i got on every newline a <br /> but inside the textarea i have to filter it (instead of <br /> should be printet a \n). any ideas ?
|
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
Not off hand. regex's are not something that I'm well versed in. (I need to work on that)
Anyone else?
|
|
|
|
|
Joined: Aug 2001
Posts: 19
Junior Member
|
|
Junior Member
Joined: Aug 2001
Posts: 19 |
Ok ... i try again 
|
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Will this work for you: $variable = str_replace("<br />","\n",$variable); before you put it into a textarea. Thats how signatures, bios etc... are handled in the profiles. 
|
|
|
|
|
Joined: Aug 2001
Posts: 19
Junior Member
|
|
Junior Member
Joined: Aug 2001
Posts: 19 |
Hi JoshPet, can i change the code in ubbt.inc.php like this: <br /> preg_match_all("/(\[eDoC\])\n?\r?(.*?)(\[\/eDoC\])/is",$Body,$newmatches); <br /> reset($matches); <br /> for ($i=0; $i < count($newmatches['0']); $i++) { <br /> $Body = str_replace($newmatches[0][$i],$matches[0][$i],$Body); <br /> } <br /> <br />---> $Body = str_replace("<br />","\n",$Body ); <br /> $Body = str_replace("[ code]","<font class=\"small\">Code:</font><hr /><pre>",$Body); <br /> $Body = str_replace("[ /code]","</pre><hr />",$Body); <br /> or could this be a problem for the other information in a posting?
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 5,834
Joined: January 2000
|
|
|
Forums63
Topics37,583
Posts293,955
Members13,824
| |
Most Online151,614 Nov 14th, 2025
|
|
Currently Online 1731
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 20
|
|
|
|