Welcome, Guest. Please login or register.
Did you miss your activation email?
05/21/12, 04:28
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Recent Tutorial Support
| |-+  Flash GuestBook Support (Moderators: Flash-db, vesa kortelainen, Ronald Wernecke, Mohsin Sumar, Jorge Solis)
| | |-+  How can i delete
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: How can i delete  (Read 2265 times)
sam
Server what's that
*
Posts: 4



View Profile Email
« on: 02/14/02, 00:41 »

hello all
can anyone show me how can i delete some topic in Guestbook ,, like some one have sign the GuestBook but they talk some words bad .. and they submit ...so
how can i delete it ... .. if anyone know please help me .... thank you ... Cry
Logged
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #1 on: 02/17/02, 14:36 »

Here's how to filter out bad words:

This is probably the least elegant way but will work, you can use the PHP string replace function.  Place this on the first couple lines of the script:

$Comments = str_replace("Shit", "", $Comments);

This is the basic idea - it will replace Shit with nothing if you want to do a search and replace you can use something like this:

$Comments = str_replace("Shit", "****", $Comments);

With the above any occurance of the characters Shit will be replaced by ****

You can just add the ones you want to replace line by line, for example:
$Comments = str_replace("Crap", "****", $Comments);

Note that str_replace(); replace is case sensitive - which will cause problems.


An incase sensitive alternative would be to use the eregi function:

$Comments = eregi_replace("Shit", "****", $Comments);

This function is slower then the str_replace function but you probably will not notice it.

For more information:

http://www.php.net/manual/en/function.eregi-replace.php
and
http://www.php.net/manual/en/function.str-replace.php


But eventually you'll want to but all the bad words into an array then loop through this function replacing each one all at once.

Logged

-Jeff.
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #2 on: 02/17/02, 14:39 »

Currently the only way you can delete an entire entry and edit the file - Is to open up the text file  GuestBook.txt from the server.  And edit that actual text file.  - Look through the contents of that text file and remove any parts that you don't want to appear on the text file.

Logged

-Jeff.
sam
Server what's that
*
Posts: 4



View Profile Email
« Reply #3 on: 02/17/02, 20:55 »

THank a lot i get it ...
do any one know how can we change the font and color in guestbook i dont like the color black so how can i change it ...
                 by the way thank a lot to help me do  GuestBook
Logged
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #4 on: 02/18/02, 13:00 »

You can change the font by opening up the fla - then selecting the Text area called GuestBook (the main area).  Then using the text box controls - change the font with the font Drop down Menu.  Then you can also change the font color and size - this will change/affect any text that is loaded into this text box area.  

You can change the color of the background for the guestbook - as you normally would - just edit the symbol and use the color chooser and paint bucket to change any of that around.
Logged

-Jeff.
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything