Author Topic: ForumScript HTML Tags...  (Read 2435 times)

0 Members and 1 Guest are viewing this topic.

Offline Bill

  • Newbie
  • *
  • Posts: 2
ForumScript HTML Tags...
« on: September 06, 2006, 11:42:17 AM »
Hi,
I noticed that when a new topic/entry is made, and I type in the message area, various ways to enter a url address, none of them will appear as a hyperlink.  It sure would be nice to be able to type in a message, a hyperlink, so people reading the message can easily click and go see what I'm talking about.
Does Forumscript allow html tags (to work) in the message area when posting????  If so, what setting change(s) do I need to make to the script file(s)??
In advance, thank you very much!!!   :)
Funny... this particular forum you're using (simplemachines.org) allows you to enter links (http://www.simplemachines.org/)!!!
Bill
« Last Edit: September 06, 2006, 11:45:10 AM by Bill »

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: ForumScript HTML Tags...
« Reply #1 on: September 06, 2006, 02:12:41 PM »
Sadly Forumscript does not do that at the moment.  It's been on the to-do list for a while, but we had half a mind to drop it.  We'll see how it gets prioritised.

This forum (simplemachines) is a MySQL driven monster that took me days to set up. 


Though it works fine now... 

Offline Bill

  • Newbie
  • *
  • Posts: 2
Re: ForumScript HTML Tags...
« Reply #2 on: September 06, 2006, 06:35:13 PM »
Thank you very much for the reply.  I hope the hyperlink feature makes the cut in your prioritization!

Until that time comes... do you have any other forum scripts' recommendations that might allow hyperlinks?  (other than simplemachines and does not require a sql or database backend)

Thanks again, :D

Bill

Offline greybeard

  • Newbie
  • *
  • Posts: 4
Re: ForumScript HTML Tags...
« Reply #3 on: June 03, 2007, 10:37:56 AM »
Simple.

Open forumscript.pl (best to do this with a text editor that has ftp and line numbers at least. I recommend crimsoneditor.com)
find this line (489)
Code: [Select]
$BERICHT =~ s/\&lt\;br\&gt\;/\<BR\>/gi;After, ad this line
Code: [Select]
$BERICHT =~ s/([^=]|^|[^"])(http\:\/\/([\w.\/]+))/$1<a href=$2>$3<\/a>/gi;
Now your URLs autolink. Similar methods could be used to add bb code, smileys, etc..

Offline greybeard

  • Newbie
  • *
  • Posts: 4
Re: ForumScript HTML Tags...
« Reply #4 on: June 03, 2007, 11:49:40 AM »
to convert bbcode to html, put this code after the line above
Code: [Select]
$BERICHT =~ s/\[(\/?[biu])\]/<$1>/gi;
As you can see, it converts [ b]bold[/b] [ i]italic[/b] and [ u]underline[/u] to html.

Offline Jason

  • Administrator
  • Hero Member
  • *****
  • Posts: 1018
    • slipdex
Re: ForumScript HTML Tags...
« Reply #5 on: June 03, 2007, 03:40:48 PM »
Bill,

those two hacks by greybeard look awfully handy though I have not tried them.  One thing to be very careful of, however, is the forumscript, thought great, is suseptible to spam.  Make sure that you START by naming forumscript.pl to something very obscure.  Also, tucking it into a subdirectory of your cgi-bin would be good.  Do not name the subdirectory forum of course though! haha

Jason
Founder of www.slipdex.com