Click to See Complete Forum and Search --> : formatting code
cleverconcepts
Mar 14th, 2007, 05:57 PM
there is formatting with colour with line numbers which is difficult to copy and paste
then there is
formatting code with [ code ] [/ code ] is grey only
there is also colour without line numbers, what tags do i need for this effect?;)
si_the_geek
Mar 14th, 2007, 07:17 PM
Moved to Forum Feedback - which is where forum usage questions belong
The colouring without line numbers doesn't exist any more, but hopefully the one with line numbers will be modified soon so that it is easy to copy & paste.
cleverconcepts
Mar 14th, 2007, 07:27 PM
Moved to Forum Feedback - which is where forum usage questions belong
The colouring without line numbers doesn't exist any more, but hopefully the one with line numbers will be modified soon so that it is easy to copy & paste.
hi si
i have seen posts with the colouring without line numbers, so the server still supports it ;)
penagate
Mar 14th, 2007, 08:09 PM
You can use [code] and manually colour keywords using the [color] tag, if you're masochistic enough.
cleverconcepts
Mar 14th, 2007, 08:22 PM
You can use [code] and manually colour keywords using the [color] tag, if you're masochistic enough.
yep, looked at a historical post and i deduced that a script used to run to make all the formatting tag changes. why did they replace it? :(
penagate
Mar 14th, 2007, 08:28 PM
Well, on vBulletin 2 and 3.0.x, we had a custom [vbcode] tag for VB code highlighting; the vBulletin-standard [html] and [php] tags, and the generic [code]. When we upgraded to vBulletin 3.5, the [vbcode] tag was removed and replaced with the 3.5-compatible [highlight=lang] tag, which is more versatile, but needs some formatting work as you've pointed out. The old posts which contained [vbcode] were converted to use the new tag. Some people used to colour code manually (I did occasionally for Javascript samples); these haven't been changed.
cleverconcepts
Mar 14th, 2007, 08:35 PM
When we upgraded to vBulletin 3.5, the [vbcode] tag was removed and replaced with the 3.5-compatible [highlight=lang] tag, which is more versatile, but needs some formatting work as you've pointed out. The old posts which contained [vbcode] were converted to use the new tag. Some people used to colour code manually (I did occasionally for Javascript samples); these haven't been changed.
seems like the script can be made to run and change the tags once permanently, if you see what i mean? :)
also it seems a little silly to remove functionality as the vbulletin evolves :eek:
cleverconcepts
Mar 14th, 2007, 08:36 PM
i seem to remember someone actually created a application for custom tag formatting, do you remember who that was?
cleverconcepts
Mar 14th, 2007, 08:43 PM
i think the app used to be in this thread that has dissapeared?
http://forums.vb-world.net/showthread.php?s=&threadid=59426
cleverconcepts
Mar 14th, 2007, 09:44 PM
Function factorial(ByVal n As Long) As Variant
' by cleverconcepts
Dim d As Variant, i&
d = CDec(d)
For i = n To 1 Step -1
If i = n Then
d = n
Else
d = d * i
End If
Next i
factorial = d
End Function
cleverconcepts
Mar 14th, 2007, 09:45 PM
excellent :D
si_the_geek
Mar 15th, 2007, 11:20 AM
That's a lot of work. ;)
I've deleted your "test" posts from this thread. We have a separate Forum Test Area (http://www.vbforums.com/forumdisplay.php?f=39) if you want to do things like that in future.
While there are currently a couple of issues with the new tags, they will be much better in the long run (and will automatically update any existing posts).. the only problem is that we have to put up with the issues like copy & paste for a little bit.
By the way, I forgot to mention before that a temporary fix to the copy & paste issue is to paste into WordPad, then copy & paste from there to VB.
cleverconcepts
Mar 15th, 2007, 05:06 PM
That's a lot of work. ;)
whew, yep, sore fingers now. :D
By the way, I forgot to mention before that a temporary fix to the copy & paste issue is to paste into WordPad, then copy & paste from there to VB.
:thumb:
timeshifter
Mar 23rd, 2007, 10:14 PM
The tags also don't seem to nest correctly anymore. I removed a line from my sig because it had the old vbcode tags, which are of no use... upon changing them to the highlight tags, the tag in the middle to prevent them from taking effect kept appearing when it should have been closing itself. Anyone else had tihs issue?
MartinLiss
Mar 23rd, 2007, 10:27 PM
If you want to copy and paste code that is formatted this way (with tags)
[highlight='vb']Private Sub mnuImages_Click()
Dim intIndex As Integer
mnuImages.Checked = Not mnuImages.Checked
If mnuImages.Checked Then
tvwXML.Style = tvwTreelinesPlusMinusPictureText
For intIndex = 1 To tvwXML.Nodes.Count
SetTreeviewNodeImage tvwXML.Nodes(intIndex)
Next
Else
For intIndex = 1 To tvwXML.Nodes.Count
tvwXML.Nodes(intIndex).Image = 0
Next
tvwXML.Style = tvwTreelinesPlusMinusText
End If
SaveSetting App.EXEName, "Options", "Tree Images", mnuImages.Checked
End Subthen you can use either of the two New apps in my signature. With those two apps it's as easy as ctrl-c/paste or atc-c/paste.
timeshifter
Mar 24th, 2007, 11:07 AM
Now just allow for tags inside the code and we'll be one step closer...
MartinLiss
Mar 24th, 2007, 12:22 PM
Sorry, I don't have any control over that.
si_the_geek
Mar 24th, 2007, 01:24 PM
The tags also don't seem to nest correctly anymore. I removed a line from my sig because it had the old vbcode tags, which are of no use... upon changing them to the highlight tags, the tag in the middle to prevent them from taking effect kept appearing when it should have been closing itself. Anyone else had tihs issue?
If you want to show people how to use any tags, you can use the new "NoParse" tag, eg:
code here
shows: code here
MartinLiss
Mar 24th, 2007, 09:03 PM
The tags also don't seem to nest correctly anymore. I removed a line from my sig because it had the old vbcode tags, which are of no use... upon changing them to the highlight tags, the tag in the middle to prevent them from taking effect kept appearing when it should have been closing itself. Anyone else had tihs issue?I didn't understand what you meant when I first responed to you. I don't experienmce the problem you mention. This example, like the one in my signature has a bold tag in the middle of each tag.
timeshifter
Mar 25th, 2007, 07:50 PM
Well, whatever the update did, it screwed up my sig... I just had a color tag thrown in there that wasn't before, and it removed a bold tag that WAS in there without removing the closing tag...
Just do everybody a favor and go back to the old tag setup... everybody knew it, it was easy, it didn't give anybody any crap...
MartinLiss
Mar 25th, 2007, 07:53 PM
Sorry but for the foreseeable future everything will remain as it is.
timeshifter
Mar 25th, 2007, 09:28 PM
In true Microsoft fashion... change it for the worse and call it an upgrade... then sit there an ignore it while people are getting pissed about having to change things around it...
MartinLiss
Mar 25th, 2007, 09:32 PM
First of all this has nothing to do with Microsoft and second, as far as I know, only one person is "pissed".
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.