demonlord
Mar 6 2008, 10:12 PM
| | Hello, is there a way for me to allow bbcode to be used on my site, i'm not running a forum or a cms or anything like that it's just a plain website. if some one could help me that would be great. |
Reply
jlhaslip
Mar 6 2008, 10:41 PM
Where on your site? in a Comments field? or in a chat box? or when you add your own content? Regardless, you will need to use php (probably) to change the values from bbcode to html code so it displays properly. you might as well just use html code. They are quite similar. [ b ] == <b>, etc
Reply
demonlord
Mar 8 2008, 12:59 AM
hi jlhaslip, thanks for the reply, i'm wanting to be able to use these in comment fields and in a guest book that i'm making
Reply
jlhaslip
Mar 8 2008, 01:42 AM
well, search:bbcode parser and you just might hit one. First Result looks promising: http://elouai.com/bbcode-sample.php
Reply
demonlord
Mar 8 2008, 02:19 AM
thanks i found a couple of them i like
Reply
galexcd
Mar 8 2008, 04:34 AM
Haslip. That first bbcode parser is terrible. It uses str_replace and is completely exploitable. Just see what happens when you try this bbcode in it: CODE [img]http://www.trap17.com/forums/style_images/logo.gif" onload="while(true){alert('this parser sucks');}[/img]
Reply
jlhaslip
Mar 8 2008, 10:55 AM
The string parsing from bbcde to html is one thing, security is another and they should be separate functions in your code, depending on the 'threat', the level of security you desire, and the importance of the transaction . I think we both agree that the security of data is important and the first rule of site security is to "Never Trust User Input". Let me say that one more time: "Never Trust User Input". The input should be 'sanitized' before the code is placed through the parser. And thanks Alex for reminding us of this important point. There are many methods that can be used to sanitize code. For example, you could use the following snippet (or similar) to sanitize User Input before processing the code, and there are other methods to make user input more secure. This is only one example: CODE $allowedtags = "<strong><em><ul><li><pre><hr><blockquote><span>"; $cstring = strip_tags($val, $allowedtags); $cstring = nl2br($cstring); There are other functions you can arrange for the 'cleansing of data. This is merely an example of one method. For Cross site scripting threats, there is a good one to be found at http://quickwired.com/kallahar/smallprojec...er_function.php . I think it would eliminate the threat you proposed as an example. Not tested.
Reply
alex1985
Mar 8 2008, 12:25 PM
What is the way that I can put BBCode on my own site?
Reply
galexcd
Mar 8 2008, 04:13 PM
QUOTE(jlhaslip @ Mar 8 2008, 02:55 AM)  The string parsing from bbcde to html is one thing, security is another and they should be separate functions in your code, depending on the 'threat', the level of security you desire, and the importance of the transaction . I think we both agree that the security of data is important and the first rule of site security is to "Never Trust User Input". Yes, it is a good idea mostly to have them separate, but remember, in my example, you may not want to escape or delete all quote in a post, just ones within certain tags which would have to be done with preg_replace rather than str_replace, or if you were going to program your own bbcode parser that would pass over and recognize your bbcode and then would modify it on the second pass.
Reply
demonlord
Mar 10 2008, 12:02 AM
so is the one that jlhaslip recomend safe to use, because that is the one i picked, and i dont want to use anything unsafe on my site. if it is not safe, which one would you recomend. Oh and i dont know if it matters but the tags that i want to use are: - center
- url
- email
- youtube
- right
so if someone could help me out that would be great Thanks
Reply
Latest Entries
rvalkass
Mar 24 2008, 10:56 AM
Both the opening of the Fast Reply box, and the buttons for adding BBCodes work by using Javascript. The Fast Reply box is opened and closed by using HTML and CSS properties to display and hide elements. The Javascript just toggles between displaying the box, and not displaying it. Getting the BBCodes inserted is a bit trickier, and notoriously hard to get working in IE, FF, Opera, Konqueror, Safari and all the other browsers. The code can get quite complex to work across all the browsers, and rather than try to write it myself and replicate it here, I'll point you to a Google search that contains many different ways of achieving this, each with their own pros and cons: http://www.google.co.uk/search?hl=en&q...earch&meta=
Reply
alex1985
Mar 24 2008, 08:03 AM
All right. How to integrate the complicated BB Code Parsing like the one on this forum, with pictures, a user just click the picture and the action will follow. You can take the quick form reply as an exemple for that.
Reply
galexcd
Mar 10 2008, 06:29 PM
Did you use the function I wrote? The function doesn't automatically parse it for you, you actually need to call it  instead of something like this: CODE echo mysql_result($result,0,"post"); Try this: CODE echo bbReplace(mysql_result($result,0,"post"));
Reply
alex1985
Mar 10 2008, 05:58 PM
So, how do I plug such BB Codes on my site's page?!
Reply
demonlord
Mar 10 2008, 05:40 PM
no there was no error message it just gave me the tags that i put in the comment field when i submitted, it. i tryed using the center tag so in the comment fields i pu the following: CODE [center]this is a test to see if the bbcodes are working[/center] and when it submitted the info, all i saw was what i put in the box center tags and all.
Reply
Similar Topics
Keywords : bbcodes, websites
- When Trap17 Will Host Non-english Sites?
"All websites must be in English to qualify for free hosting"- (5)
Problems Logging Onto Some Websites
(4) Recently, I've been having problems staying logged in on certain forums. when i fill up my
username and password, the page reloads and goes to the member page, but when i try to click
something only applicable to members, it brings me to the guest pages and asks me to log in again.
This has happened to me on the Credit system on Trap17 and a couple of other forums as well.
I've cleared the cookies, reloaded the pages and stuff but to no avail. Any ideas?....
Websites Like Trap17?
are there any? (2) Are there any websites that give out different things other than free website hosting? if so please
post.....
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....
How To Download Youtube Videos
without softwares or websites (23) With this how to you'll find out how to download videos from youtube without using any software
or website. 1. Retrieve the id video from the link (the code after ‘v=’) example:
http://www.youtube.com/watch?v=muP9eH2p2PI => muP9eH2p2PI 2. In your favourite browser go to
http://youtube.com/v/{ID video} example: http://youtube.com/v/muP9eH2p2PI 3. Link in the address
bar will change. Replace ’swf/l.swf’ with ‘get_video’ and press Enter 4.
Save your file /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="bi....
Make $$$ And Backlinks With Pr 2 Or Higher Websites
(0) Some of the members over here know about the www.tnx.net site. They are link exchange site. Iam
just get into this site, just for testing the site. But actually the site opens me a way to earn
money with PR 2 and higher websites. The site also offeres path for making money by PR 0 sites, but
that is little difficult. You can earn more money from the program if your site includes large
number of web pages. The more the pages are, the more income (points) you will get. You can also buy
backlinks for your sites with their money. Actually this site opens me a new way t....
Websites In Your Mobile
(0) There are lots of sites that do not have support to be accessed via mobile devices. Some sites do
provide support like m.yahoo.com (yahoo customized for mobile devices...). But most of the sites do
not have support and looks distorted when accessed by devices. http://www.google.com/gwt/n The
above link helps you in converting webpages suitable to mobile devices. Mobile browsers do help in
converting web-pages sometimes... when it does not, this tool comes in handy. ....
List Of Free Directories To Submit Your Websites
(7) Hi: Submission in free directories is a world-known way to increase ranking and traffic. But most
of you don't know a good source of that list of directories. Here is a great source of free
directories list . Just start submission in those directories in your free time, and see you
ranking.......
Server Problem?
Website not Loading (11) Hi There, Is there a problem with the Qupis server? My website (http://disneyreporter.qupis.com)
as well as other websites hosted with Qupis are not loading. When will this problem be fixed?....
Toolbars
why many websites are begging you to install their browser toolbar, wh (2) some websites are asking you to download their toolbar from a useful one like google toolbar to
harmful one like websearch toolbar and some provide service only if their toolbar is installed
(example: mega upload). QUOTE whats browser toolbar? Third-party toolbars for browsers are
best known for adding functionality and ease-of-use options to the end user. While the browser
itself handles basic browsing navigation (Back, Stop, Reload, etc) using its own toolbars, external
toolbars often add additional functionality to browsers (additional search fields, form-fil....
The Best Websites
(0) http://www.thefwa.com/ Brillant site, I've looked at alot of the winners and i'm in
amazment in how good they are. Best that i've seen is the Halo 3 Believe website, very indepth
and detailed. Check that site out for inspiration and that.....
Can't Receive Emails To My Websites Google Apps
(4) I can send emails no problem from chris@scottishdreamteam.trap17.com however everytime someone sends
me something they get this in return. - This is an automatically generated Delivery Status
Notification Delivery to the following recipient failed permanently:
chris@scottishdreamteam.trap17.com Technical details of permanent failure: PERM_FAILURE: SMTP Error
(state 13): 550-rv-out-0910.google.com :5462 is currently not permitted to 550-relay through this
server. Perhaps you have not logged into the pop/imap 550-server in the last 30 minutes or do not
have SMTP....
How Can I Create Websites With Free Software?
A challenge given to me by David of Essex (not David Essex) (16) OK I've done it! made a selection of tutorials and programs I'm Going to be making a CD
with all this on if anyone is interested... So The Challenge! To Find Open Source/Free
software and build a website with it Flash NO Javascript YES HTML YES PHP YES The Software
KompoZer in the end its the best! it has ftp WYSIWYG and Raw code editing so its satisfying
everyone /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
FTPcommander is brilliant! GIMP An excellent image editing program and as alw....
A New And Revolutionary Way To Earn Money With Your Blog And Websites!
Google adsense is a thing of the past... here's new one! (10) A revolutionary blog and site monetization is coming this FEBRUARY!!!!! TV
advertisers pour a lot of investment in advertising... imagine if they would transfer that into the
internet and share all the money with bloggers and webmasters??? GOT THE PICTURE? NOW IT WILL COME
TRUE!!!! Just PM me for more details about this.... Earn money from your blogs and
websites, with no CLICKING involved.......
Creating Navigation For Html Websites
Have a common navigation menu for the whole website! (12) Pre-requisite: HTML, inline frame tags 1 Attachment(.zip) included. Updates : 29-12-07: Doctype
added in example files (Advised by jlhaslip) Designing a whole website takes a lot of planning
and organization. Designing a proper navigation system is a basic step in building your website. If
you are developing webpages in html you would have observed that as you go on creating pages it
becomes difficult to maintain the links to the pages. This article will guide you in developing a
common navigation menu for your website. It describes three ways, so if you don'....
How I Design Websites Using Free Software
This weeks challenge as set by david-essex (17) Ok so i'm starting a 3 Monthly challenge your welcome to give me ideas, however, this one in
particular keep your eye on this as i will be putting Video tutorials, links and all sorts for the
new web designer (with a very little budget) Think you've got a challenge for me (be realistic)
leave a comment here on this board as I've mucked my board up /sad.gif"
style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> Look Forward to hearing from
you....
My Websites Don't Work [resolved]
(12) This is really strange, but after adding an add-on domain, my websites hosted on trap17 aren't
showing up at all. At first, they showed up fine after I added the addon domain, but after awhile,
they don't show up anymore. I tried on both firefox and ie. These are my websites:
www.princesstimes.com (http://bishoujo.trap17.com tried both and they don't work)
www.celestial-delinquent.com (http://bishoujo.trap17.com/cd tried both and they don't work) I
don't even know why www.princesstimes.com is affected. I didn't do anything to the domain.
I....
New Websites Discovered...
(9) QUOTE For the past few weeks i have been sending some links to all my contacts. Have also got
some feedback from very few online active people... so...i thought i would add these links in the
here too.. Search Engine Try this new search engine powered by Yahoo. The results are good.. (i
have been using this for past 1 month). http://www.alltheweb.com/ Its really fast and gives
suggestions (this suggestion feature is already available in google suggest ... but very few people
are using, rather they prefer Google in general.) Definition Engine Here is another....
Best Websites
The best Web sites (0) i think the best Non gaming webistes are
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bebo like
my space but cooler(not Html code compatalbe). my website when its online it is going to b
www.Megadome.net,.co.nz,com.au or sumthing and any more please qoute or sumthang....
Gpt Websites
Earn Money Online (8) Over the past year I've been earning a decent side-income via Get Paid To(GPT) websites. For
those that don't know, in a nutshell these GPT sites pay you to complete offers, which more or
less involves joining other websites. Usually earning between $1-$5 for each site you
join. The best part about most of these websites is that you can earn a lot more money by referring
others. I recently found what I think is the best GPT site I've used so far, and I've
been a meber of around 50 GPT sites. Its called XSVCASH. http://www.xsvcash.....
List Of Scam Ppc Websites
A list of PPC websites that aren't trustworthy (2) I thought it might be a good idea to have a list of PPC websites that people SHOULDN'T use
because they aren't trustworthy. Don't post that adsense isn't good because you got
kicked off for stupid reasons. Only post sites that are really out to scam people. You can just post
the url to the site. Hopefully this will keep a few people from signing up with the wrong people.
www.bidclix.com - I signed up for them and got nothing back from them. I'm pretty sure I gave
them my SSN too which I regretted from the very moment I clicked submit... /sad.gif" st....
Get A "certified Domain Seal" For Websites
A good way to attract visitors (3) www.fxdomains.com offer a Domain Certified Seal in 2.99 USD a great way to show your security to
your clients in a much cheaper way.....
Paid Hosting Vs. Trap17 Free Web Hosting
Trap17 : Free Hosting for websites (9) Hey peoples, after a long while of absence I've returned to T17. I have concluded that some
paid hosting servers can never beat T17. I will not mention the name of the server, unless I have a
fiat for that, but here's the conclusion: About one and a half year ago I had my site(s) hosted
at Trap 17 for about a 9 to 12 months, in this period I had all... A server wich only costs posting
on a forum, 99% uptime (I never experienced a downtime longer then 2 hours, mostly my own bad
/tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif"....
New Custom Bbcodes Called [google] [define] [imgalign]
to help you better format your posts (8) Hello Trap17 members, After much needed tests we are happy to introduce 3 more bbcodes (yeah~). I
know, I know it's not that exciting. My observation is that some tutorials involving graphics
may need IMGALIGN to add an extra personal touch to your own. Furthermore, to help and serve
members in general, GOOGLE and DEFINE were also added to aid the reply process--if there is any
/tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" /> The first is
GOOGLE Using this bbcode is simple. To suggest searching a keyword or phrase simpl....
Make Money With Your Own Websites.
(14) Make money with your own websites.Keep 100% of all profits. E mail for further details. :
bpoatcia@yahoo.com ....
Which Proxy Sites Can Be Used To Access The Websites?
when in a firewall enviornment (27) My university lately instaled a firewall that prevents us from accessing certain websites I heard
there are some proxy websites that will enable us to circumvent this firewall can you post some
links of such websites? /laugh.gif" style="vertical-align:middle" emoid=":lol:" border="0"
alt="laugh.gif" /> /laugh.gif" style="vertical-align:middle" emoid=":lol:" border="0"
alt="laugh.gif" /> Edited topic title & description ....
Web War
a tale of two websites (8) well, it's a "unique" ongoing web war... so i'm posting it here to solicit your thoughts.
/tongue.gif' border='0' style='vertical-align:middle' alt='tongue.gif' /> once upon a time, there
were two websites: itchysquirrel and lastofthedotcoms. the latter admired the former and considered
it a "funny" site, so it asked the former for a link exchange. yup, "add our site link on your site,
we add yours" kind of deal. /tongue.gif' border='0' style='vertical-align:middle' alt='tongue.gif'
/> it went well for a while, until it was later discovered by the latter t....
The Funniest Websites On The Net
Suggest The Funniest Site On The Net (11) I Am Going To Start Of This Topic By Suggesting miniclip.com (Games Site) ....
Rss Builder V2, Create And Download Rss Feeds For Your Websites
Start building your website rss material, completely free! (14) QUOTE RSS Builder ** free ** RSS Builder is an easy to use program to create RSS feeds for your
web site. It provides a simple interface that lets you add topics, links and content, and then
publish the RSS (v2.0) feed to your web server, using the built-in FTP client. What is RSS? RSS is
an abbreviation of either Really Simple Syndication or Rich Site Summary; it depends who you talk
to. RSS is the new standard for distributing news and information via the Internet. The information
is published via RSS News Feeds. What is an RSS News Feed? An RSS news feed is a li....
Hey Does Anyone Know Of Any Really Funny Websites?
(9) I know a couple like: Ebaumsworld.com and starterupsteve.com but i want more so gimme some links....
Looking for bbcodes, websites
|
|
Searching Video's for bbcodes, websites
|
advertisement
|
|