Logged Out
Create an Account
Login:
Password:

Forgot your password?
New [Code] Tag

New [Code] Tag
[Back to Index]
Thread Tags
Primary: [General]
Secondary: None

We've added a brand new Code BBCode tag (or rather, we've completely revamped the old one). The original code tag simply rendered things like this.

However, we've added a brand spanking new code tag, which is both backwards compatible with the original, and also supports a number of other programming languages.: C/C+, C#, CSS, Delphi/Pascal, Java, Javascript, Lua, Perl, PHP, Python, Ruby, SQL, VB/Vb.net, and HTML/XML/XHTML.

This is the final change necessary to complete the Advanced Layout Guide, which is in the works.

The syntax is:

[code=language]some code[/code]

So, for example:

[code=lua]function GRSS_IsZoneIgnored()
	local zone = GetRealZoneText();
	for i,v in pairs(GRSS_ZoneIgnore) do
		if v == zone then
			return 1;
		end
	end
	return nil;
end[/ code]


Would produce:

function GRSS_IsZoneIgnored()
	local zone = GetRealZoneText();
	for i,v in pairs(GRSS_ZoneIgnore) do
		if v == zone then
			return 1;
		end
	end
	return nil;
end


This can also be done quickly by clicking the "code" option above the edit box.



--
It's all in the reflexes.
Quote

function GRSS_IsZoneIgnored()  
#     local zone = GetRealZoneText();  
#     for i,v in pairs(GRSS_ZoneIgnore) do  
#         if v == zone then  
#             return 1;  
#         end  
#     end  
#     return nil;  
# end



I tried this in a demo post on my forum:
code examples
function GRSS_IsZoneIgnored()  
        local zone = GetRealZoneText();  
        for i,v in pairs(GRSS_ZoneIgnore) do  
           if v == zone then  
               return 1;  
           end  
        end  


However in my forums, It generated this output

code examples
1. [codem3X1Yiz8436o5G4kQ]


Stranger still this works (i see the right output) in the preview post window, but not the normal display, i get the weirdstring
Quote

function GRSS_IsZoneIgnored()  
#     local zone = GetRealZoneText();  
#     for i,v in pairs(GRSS_ZoneIgnore) do  
#         if v == zone then  
#             return 1;  
#         end  
#     end  
#     return nil;  
# end



I tried this in a demo post on my forum:
code examples
function GRSS_IsZoneIgnored()  
        local zone = GetRealZoneText();  
        for i,v in pairs(GRSS_ZoneIgnore) do  
           if v == zone then  
               return 1;  
           end  
        end  


However in my forums, It generated this output

code examples
1. [codem3X1Yiz8436o5G4kQ]


Stranger still this works (i see the right output) in the preview post window, but not the normal display, i get the weirdstring




I believe this is a problem with the drop in template I'm using, which is WorldOfWarcraft.com dropin template.
Weird. Thanks for the heads up. I'll see what I can uncover.


--
It's all in the reflexes.
It was an issue that resulted from having both a Commedit and a code tag in the same post. The issue has been resolved. Thanks for pointing it out.


--
It's all in the reflexes.
Quote by Chops
It was an issue that resulted from having both a Commedit and a code tag in the same post. The issue has been resolved. Thanks for pointing it out.


Yeah sorry for having you track down a problem that probably will never surface in real life.

I made a 'Demo' thread...to show off the capabilities of the forum... Most people will probably not have both of those fields in the same post.. But thanks for fixing nonetheles.s
Quote
Yeah sorry for having you track down a problem that probably will never surface in real life.


There's nothing to be sorry about. It was a bug that needed fixing, nonetheless.


--
It's all in the reflexes.
Quote by Chops
Quote
Yeah sorry for having you track down a problem that probably will never surface in real life.


There's nothing to be sorry about. It was a bug that needed fixing, nonetheless.


Can you take a look and see if this resurfaced as part of the recent upgrade?


[Back to Index]