A Script To Close All Bbcode Tags In Php - can you help me write one?

free web hosting
Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

A Script To Close All Bbcode Tags In Php - can you help me write one?

galexcd
ok, ive got a chat that I made from scratch in flash. Its actually pretty damn cool! I just coded it so bbcode is allowed, but ive got a sligt problem. if sobody dosnt close a tag, then the tag stays active for the following messges. sad.gif , so i thout, why not add the end of every tag, at the end of every message
example:
CODE
[/b][/u][/i][/url][/color]


but then i relized, flash's html encoding is very propor, and all tags must be closed in the order that they were opened!
CODE
[b][u]text[/u][/b] << works
[b][u]text[/b][/u] << dosn't work


AND if sombody opens the same tag twice, the tag must be closed twice!
CODE
[b][b]text[/b][/b] << works
[b][b]text[/b] << dosn't work


I need a php script that can take a string, and add close tags to every line, in the same order they were opend. I was thinking of how to approach this, but i just can't come up with a script. Any ideas?

Thanks!

edit: put code in code tags

 

 

 


Reply

galexcd
This post was offering hosting credits for helping me write the code, but i have recently found out that you must be hosted to transfer hosting credits. But i still really need this code or anything that can help me!

Any input would help as well!!!

Thanks!!

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : script, close, bbcode, tags, php, write

  1. Seeking Help With Javascript
    Need help with drag and drop type script (1)
  2. Browser Compatibility Problem With Firefox - Javascript + Css
    Having trouble making a script work right - any suggestions? (3)
    Hi, Im working on a website, and im trying to make a right-click menu, which opens on right click,
    wherever the cursor is, and closes on mouse out. I wrote the code below, and when i ran it in IE it
    ran fine, just how i wanted it to work. However in firefox, the menu just opened in the top left. im
    presuming this is because it doesnt like my style changing in the javascript. Any ideas, and
    suggestions? If i cant make this work, i will just make it so it works slightly differently when
    viewev in firefox so that it can just open in one place. All ideas appreciated. ....
  3. Close Own Topics
    (4)
    Could we have the opportunity to close our own topics, if we want to? This would be a good thing,
    if we could. -Kel /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif"
    />....
  4. How To Make Php Newsletter Script
    (3)
    I have seen a post on here somewhere which shows how to make a simple newsletter php script. I
    cvant find it anywhere and I wanted to ask some questions of the author. Does anyone know the one I
    mean? Cheers ....
  5. Php Guest Online Script
    (3)
    make an index.php copy and paste this code CODE <?php $db_host = "localhost";
    $db_user = "root"; $db_pass = ""; $db_name = "test";
    $dbc = mysql_connect($db_host, $db_user, $db_pass); $dbs =
    mysql_select_db($db_name); $tm = time(); $timeout = $tm -
    (30*60);
    if($_SERVER["REMOTE_ADDR"]){$ip=$_SERVER["REMOTE_ADDR
    "];} else{$ip=$_SERVER["HTTP_X_FORWARDED_FOR"];}....
  6. Phpizabi Social Network Script
    (1)
    Hello everyone not been on for AGES! we had net problems and i had to move to qupis and now
    I've got problems. I'm making a social networking site using this script and I cant get it
    to install Everytime I go to the install page i get this QUOTE Warning: session_start() :
    open_basedir restriction in effect. File(/home/kasiks1/tmp) is not within the allowed path(s):
    (/home/karlos:/usr/lib/php:/usr/local/lib/php:/tmp) in
    /home/karlos/public_html/phpazi/install/index.php on line 1 Fatal error: session_start() : Failed
    to initialize storage module: file....
  7. How To Make A View New Post Script?
    (5)
    Ok so i'm still working on the forum software i posted about a while back, but I have no idea
    how to do this. I want to make a view new post script, as this is one of the main things that my
    forum software dose not have that all other forums have. so does any body have an idea on how i
    would do this? Thanks.....
  8. Weird Write Problem
    (3)
    Any ideas whats up with this error? It just started appearing now. ....
  9. Guessing Php Script
    (2)
    I am looking for: freeware php quess the person in the photo game script....
  10. Learn Html, Css, C And C++ Online For Free
    Wanna learn to write programs and/or make websites? You can do it fre (12)
    Have you ever used an application or played a game and thought, "If you could only..." or "If I knew
    how I would add..." but didn't know where to start? I did and decided to do a lil research. I
    came across a site with great tutorials. There are many ranging from beginner all the way to
    advanced. After each tutorial there is a test to practice what you just learned. I dunno if I am
    allowed to post the url to these sites here due to spam filters but I will say that if you search
    for "c programming" in any major search engine it should be the first link (after the....
  11. Beat Finder That Fills In Mp3 Tags
    (1)
    Does anyone know if there is something out there that will 'find beats' for music (MP3, AAC
    etc) and write the values to the tags? I was thinking something iTunes plugin, or possibly another
    app. I run OS X tiger, on a macbook (intel processor) I could go and use my metronome, but when
    i've got a music library of 2200+ it would be very time consuming....
  12. Do You Close The Javascript?
    about browser's secruity (4)
    hi folks i'm learning that the javascript and cookies sometimes leak your real ip and actions on
    surf , some expert advice me close javascript ,stop the function of my opera and IE. so i did.then
    everytime i log into a forum i need opend it manually so i can log in. /sad.gif"
    style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> and lots of website's using
    javascript as a necessary then i opened it manually..oh my life got boring. /dry.gif"
    style="vertical-align:middle" emoid=" how your guys doing with that? is it really necessary or
    not? bt....
  13. Login Script For Vbulletin.
    (9)
    For some reason when I try to logon from the main page it doesnt work, it just brings me to the
    forums unlogged. Anyone here have any ideas whats wrong with my coding? Heres the webpage:
    www.ageofilluminati.com Heres the coding im Using: QUOTE
    Forgot password? Register for free! ....
  14. How Often Do You Use Css?
    As opposed to using simple <font> and <div> tags (12)
    CSS is basically made to make your html coding a heck of a lot easier. However, sometimes I prefer
    to use html instead of CSS since it sometimes gets frustrating to refer to the same old style sheet
    and use an old font ID you made about a week ago. I find it a lot more efficient to just type out
    the specified font color/style/size in the tag than to use an individual or for certain fonts
    you'd like to use. Sure, it's very helpful a lot of the time to use CSS in most cases, since
    it's kind of like a very simplified version of PHP but in a different case,....
  15. Php Downloads Script
    (4)
    I've been looking all over the net for a PHP script which can provide an interface to browse a
    downloads database. The database could be powered by MySQL. If you know a script like this, please
    post it here. Thanks in advance, Ironchicken.....
  16. Loaing Script
    (3)
    hello, I'm looking for a preloader script for my site. like it will display an loading
    image while the site is loading and the once the page has loaded the image will disapear. i tryed
    searching for one on google but i could not find one, i think i searched for the worng thing. if
    some one knows how to make one or where i can find one that would be great. Thanks....
  17. How To Write And Deliver A Good Short Speech
    (2)
    The key to a good speech is to make it brief and straight to the point. If you do not take the time
    to craft a tight, focused presentation for a short talk, you will lose your audience and possibly,
    your reputation. A common misconception is that one does not need to practise a five-minute talk
    because it is just a short speech, but this is the wrong mentality. Here are some guidelines on how
    to write a good, short speech: 1. The writing for short speeches has to be better than for long
    ones. You have less time to get your critical message across. 2. You must make sure....
  18. Invite Script..
    (2)
    I didn't know where else to put it /sad.gif" style="vertical-align:middle" emoid=":("
    border="0" alt="sad.gif" /> If moderators find another forum more suitable plz move this one
    /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> I am looking
    for some sort of sript or program that let's people on your website invite friends. Like they
    put in their Emailadress and mails are send to everyone in their list.. I hope someone can help me
    /sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> Greetzz....
  19. Background Image Swap Script
    Change a Background Image based on clock time (15)
    Background Image Changer Script To swap the background image from your CSS file according to the
    Server Clock Time. 1.) In your CSS file, add the following rule: CODE body {
        background: url(time.png); } 2.) Create a "folder" named time.png. 3.) Into the
    folder, place three images named morning.png, day.png, night.png. 4.) Also, in the same folder,
    create an index.php file and copy/paste the following script. CODE <?php $hour =
    date('H'); if ($hour < 12 ) {     $image =
    "morning.png"; } ....
  20. Html Code Tester. Online Script
    (15)
    Yes, yes. I have another script that I have written and I am distributing. I am not entirely sure if
    this works. I have not tested it yet, but I will later and post back with a demo and fix it up.
    Current script: CODE <?php //Save this as something like htmltest.php function
    CheckForm() { $html_unsafe=$_POST['code']; //Gives us our user
    input $html_safe=str_replace("<?php"," ",$html_unsafe);
    //Starts security measures $html_safe=str_replace("?>","
    ",$html_sa....
  21. Watermark Your Image With Simple Php Script
    found it on the net (35)
    This script was found on the net http://tips-scripts.com/?tip=watermark#tip B&T's Tips &
    Scripts site. Just in case the site may not show, I will include the code here: List of things
    needed: 1. your image in any format 2. watermark image--in gif format with transparent background 3.
    script below with name (i.e. watermark.php) CODE <?php // this script creates a watermarked
    image from an image file - can be a .jpg .gif or .png file // where watermark.gif is a mostly
    transparent gif image with the watermark - goes in the same directory as this script // ....
  22. Rap Lyrics
    Can somebody write me some? plz..! (11)
    Ok I need someone to write me some rap lyrics. Basically what I want to say in the song is that i
    love you, do you believe in destiny, that we'll be together, and kind of saying I'm not good
    enough for you, you'll never be mine. Really hope someone can write me something with these
    messages in. No not exactly like that but you know.. as I'm going to give it someone special to
    me. Thanks.. /sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /> /ph34r.gif'
    border='0' style='vertical-align:middle' alt='ph34r.gif' /> Oh I forgot.. Please....
  23. Meta Tags
    Sum general questions (7)
    1. Are the meta tags really working? which search engines actually use them? 2. Do i have to declare
    description and abstract meta tags in every page? and What are the differences between them? 3. Can
    Keywords be the same across all pages? 4. What exactly is the content that should come inside a
    copyright meta tag? (I use the name of the site and a full URL with the path to the "Legal Advice"
    or something) 5. Language meta tag for spanish from mexico is just "es"? 6. What are the most common
    and recomendable meta tags that we must try to include in our sites? These are....
  24. Verifying Email Addresses
    Using a simple PHP script (9)
    This simple script will allow you to run some basic checks to make sure that any email address
    entered is actually an email address. There is no guarantee offered that this will stop every single
    fake email address, but it'll provide some protection. Now, the code! First we need to get
    the email address to verify. Here, I get it using POST from an HTML form. CODE <?php //Load
    email address from web form $email = $_POST['email']; Now, we move on
    to our first check. Does the text that has been entered look like it could b....
  25. Javascript Close Window
    Javascript close window (12)
    Hi does anyone have a code to close the browser window. This code needs to be used to close an
    actual full sized window, not a pop-up window.....
  26. Delay X Seconds In Flash
    how to action script that (1)
    How do i have to do, to tell a frame to wait x seconds after it continues playing? In Macromedia
    Flash, of course... Like: CODE stop(); "wait  x seconds"; play();
    Thanks....
  27. Anyone Write Rap Lyrics?
    (38)
    hry anyone here write rap lyrics? i made some beats and still making but i can't write lyrics
    for u no what..... cany anyone write me like 2 or 3 verses? just wanna see if i can make it work
    with my beats.......
  28. Web Surfing- Script Needed
    (2)
    We all know of anonymouse web surfing, Sites like http://anonymouse.ws/cgi-bin/anon-www.cgi Offer
    peope to surf the internet anonymousely, The site has baners and ads showing up and does not support
    all links. Does anyone know what script they use or where i could get one from, What script do they
    use? Also if anyone jnows how to make my own? I really want this as a addon for my site, So all help
    would be appriciated. Thanks, Mbd5882....
  29. What Is Respect?
    an essay I had to write. (15)
    I had to write a 200 wrod essay on what respect is due to my classes behavior in front of a teacher
    and a priest. Respect Respect is something that has to be earned. Teachers, priests, authority
    figures and many other groups of people are classified as people who are supposed to be given
    respect. Not only are people supposed to be given respect, but people's decisions are also
    supposed to be respected. The Merriam- Webster Dictionary defines respect as "to consider deserving
    of high regard." The president of the United States should be given respect wether people t....
  30. Could Someone Make A Php Script For Me?
    Script to manage clans and players (3)
    Does someone know a script where you can 1. Add clans to a roster 2. Edit clans on a roster 3. Add
    players too a clan 4. Edit players 5. Schedule matches 6. Add clan Leaders to manage their own clan
    + members 7. Add members to edit their own information And maybe some sort of scoreboard integrated
    where you can put Wins, Draws and loses and that automaticly puts best clans on the top? If there
    isnt such a script could someone create 1 for me? (its for a league ^^)....

    1. Looking for script, close, bbcode, tags, php, write

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for script, close, bbcode, tags, php, write

*MORE FROM TRAP17.COM*
advertisement



A Script To Close All Bbcode Tags In Php - can you help me write one?



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE