AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Convert BBCode to HTML
Goto page Previous  1, 2
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
PhiLho



Joined: 27 Dec 2005
Posts: 6723
Location: France (near Paris)

PostPosted: Sun Dec 31, 2006 10:22 am    Post subject: Re: Convert BBCode to HTML Reply with quote

dori wrote:
I understood most of your code but i wonder if you have something ready that i can use on a ASP page.

I am looking for a function that i can send her a bbcode text (the post from the forum) and get HTML back
So you need some VB code instead.
Real BBCode to HTML is slightly more complex than what is shown above.
I compiled a list of rules to make a more thorough converter (to be done), I can put them here, you will then have to write the corresponding code in VB, which shouldn't be so hard.
Does the VB used in ASP (not ASP.NET, I suppose) have access to regular expressions?
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
Dori
Guest





PostPosted: Sun Dec 31, 2006 5:19 pm    Post subject: VB Script Reply with quote

Hi all and thank you....

I think regular expressions is a subset of VB Script 5 or higher.
So i have access to it.
I read a bit about it but i need to read it more in order to start using it.....

here is an short article abou it
http://authors.aspalliance.com/brettb/SubstitutionsInVBScriptRegularExpressions.asp

Confused
Back to top
dori
Guest





PostPosted: Sun Dec 31, 2006 6:00 pm    Post subject: CreatePreview Reply with quote

AGU wrote:
Quote:
I am looking for a function that i can send her a bbcode text (the post from the forum) and get HTML back
Don't know if it's of help, but maybe you can take my CreatePreview subroutine from my BBCodeWriter Script and make a function out of it. Smile
________________________
Cheers
AGU


Hi Agu
thanks a lot.

Is this C++ ???
i am not sure i can run this whitin an ASP page
Back to top
AGU
Guest





PostPosted: Mon Jan 01, 2007 1:33 am    Post subject: Reply with quote

Quote:
Is this C++ ???
i am not sure i can run this whitin an ASP page

Sorry it's no C++, it's AHK syntax. As you were asking within this forum I assumed you were looking for an AHK solution.

After reading your first posting I'm asking myself why you were posting your request in this place instead of an ASP or VB forum. Don't you think this might yield better solutions than asking here in AHK forum?
_______________________
Cheers
AGU
Back to top
WickedSmile
Guest





PostPosted: Sat Jan 10, 2009 6:15 am    Post subject: Reply with quote

I've been trying to convert this video gam embedding code to BBcode and I just can't get it right. Help?

<div align="center"><a href="http://www.freehobo.com/games/super-mario-bros-flash">Play Super Mario Bros. Flash</a><br /><a href="http://www.freehobo.com/games/super-mario-bros-flash"><img src="http://www.freehobo.com/m_games/thumbs/super-mario-remake.gif" border="1" width="100" height="100"></a><br />More <a href="http://www.freehobo.com" style="font-weight:bold">free games</a> at freehobo.com</div>
Back to top
Slanter



Joined: 28 May 2008
Posts: 739
Location: Minnesota, USA

PostPosted: Sat Jan 10, 2009 7:36 am    Post subject: Reply with quote

Well, the <div align="center"></div> can't be converted, and neither can the border/width/height of the image, but the rest should simply be this...
Code:
[url=http://www.freehobo.com/games/super-mario-bros-flash]Play Super Mario Bros. Flash[/url]
[url=http://www.freehobo.com/games/super-mario-bros-flash][img]http://www.freehobo.com/m_games/thumbs/super-mario-remake.gif[/img][/url]
More [url=http://www.freehobo.com][b]free games[/b][/url] at freehobo.com

_________________
Unless otherwise stated, all code is untested

(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group