Gossamer Forum
Skip to Content



Home : Products : Gossamer Forum : Development, Plugins and Globals :

Markup codes, how are they done?

Quote Reply
Markup codes, how are they done?
Hi,

I'm gonna try and add in things like [b]bla[/b] into my Guestbook plugin - but I'm not really sure of the best way to do this? If there a function that does this? (I've looked through Markup.pm, but its pretty confusing :D)

Cheers

Andy (mod)
andy@ultranerds.com


Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Custom Toolbar for IE and Firefox! - Compare our different Plugin packages *new*
Free CSS Templates
Quote Reply
Re: [Andy] Markup codes, how are they done? In reply to
See GForum::Convert::convert_markup

Adrian
Quote Reply
Re: [brewt] Markup codes, how are they done? In reply to
brewt wrote:
See GForum::Convert::convert_markup
Thanks, I'll take a look :)

Cheers

Andy (mod)
andy@ultranerds.com


Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Custom Toolbar for IE and Firefox! - Compare our different Plugin packages *new*
Free CSS Templates
Quote Reply
Re: [brewt] Markup codes, how are they done? In reply to
Hi,

Is there a way I can just use this function?

I tried:

print GForum::Convert::_plg_convert_markup(qq~[code]test[/code] [b]another test[/b]~);

..and also:

print GForum::Convert::convert_markup(qq~[code]test[/code] [b]another test[/b]~);

..but both give an error:

fatal error has occurred:

Quote:
Can't use string ("[code]test[/code] [b]another tes") as a SCALAR ref while "strict refs" in use at /var/home/forum/ultradev.com/cgi-bin/forum/admin/GForum/Convert.pm line 78.

Please enable debugging in setup for more details.

..so I'm guessing thats not how it likes its arguments? =)

TIA

Andy (mod)
andy@ultranerds.com


Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Custom Toolbar for IE and Firefox! - Compare our different Plugin packages *new*
Free CSS Templates

Last edited by:

Andy: Feb 22, 2008, 1:46 AM
Quote Reply
Re: [brewt] Markup codes, how are they done? In reply to
Hi,

Ok, I found this in Gforum/Post.pm:

convert_markup(\$signature);


..so I tried:

use GForum::Convert;
my $test = qq~[code]test[/code] [b]another test[/b]~;
print "COVERTED: " . GForum::Convert::convert_markup(\$test);


.. but all that does, is return nothing.

Any suggestions?

TIA

Andy (mod)
andy@ultranerds.com


Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Custom Toolbar for IE and Firefox! - Compare our different Plugin packages *new*
Free CSS Templates