Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

BBcode in Shoutbox / Chat

Featured Replies

Hey people ! 43.gif

I'd like to make some BBcode options for the shoutbox on my page ( like to be able to use smilies, write text in any color, bold text, italic text etc ), but I don't know how !

 

I searched for "How to bbcode shoutbox", "How to make bbcode for shoutbox", "shoutbox bbcode php" and stuff like that in Google, but didn't find anything.

 

I guess it should work like for Bulletin Boards, BBcode is converted to HTML, but how ? uglyconfused2.gif

 

Please help me, I'd appreciate it !

 

Cheers,

Revs.

You can use a variety of functions, the most common are str_ireplace and preg_replace. I'll do a str_ireplace() example. The function stands for string case-insensitive replace and it does exactly what it says on the tin.

 

<?php
$form1=$_POST['form'];
echo str_ireplace("find","replace",$form1);
?>

 

Here's an example using arrays:

 

<?php
$find=array("find","find1");
$replace=array("replace","replace1");
$search="find find1";
echo str_ireplace($find,$replace,$search);	
?>

what he said, so just change the variables to be the input from the user... www.php.net is very helpful for finding out about different functions which are available to you out of the box with php installs ;)

  • Author

Okay, I think I understand how it works :). Thanks guys :p.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.