Jump to content

Recommended Posts

Alright, I am starting on a PHP, CSS and HTML project today, and I need some help with some PHP things. I will post them all in this Thread!!

 

Yes, some of this stuff is simple, but I'm learning PHP through looking at different scripts, and none of them have had this yet.

 

So, 1st question:

How do I, using PHP, convert BBCode Tags into HTML Tags?

 

Example: I have a Forum using BBCode tags, and I have a PHP Script that grabs the posts from the forums, and displays them on the homepage. How do I convert the BBCode into HTML?

 

I have a SMF Forum' date=' and they have an... awkward DB Structure for PHPers (me, atleast). I want to make it so that there is a list of all Topics created in the Forum with the ID of "1", but [b']ONLY[/b] topics, not messages, which have the same ID.

 

Example: Right now, I have the list and it shows:

Re: News 4

Re: News 4

Re: News 4

News 4

 

What I want it to be is:

News 4

News 3

News 2

News 1

 

Please only answer if you know PHP, thanks. ;)

Link to comment
https://forums.phpfreaks.com/topic/149190-blackboy0s-php-questions/
Share on other sites

well youll have to use regex to read through the post and convert it to html, its your choice if you do this before you put it into the database or after,

 

but regex is the way to go,

 

with regards to the SMF database structure, it may seem akward, its not. its simply practical. once you get some more experience with database go look over the structure again and youll see what i mean.

I suggest you post your 2nd question on the smf board.  At the very least, you'll probably get a faster answer on where to look, as far as them telling you to do it yourself.  But if you're lucky, there might already be a mod for that, or someone willing to make one, since that's what they focus on, there. 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.