|
-
Mar 14th, 2007, 05:57 PM
#1
Thread Starter
Member
formatting code
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?
-
Mar 14th, 2007, 07:17 PM
#2
Re: formatting code
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.
-
Mar 14th, 2007, 07:27 PM
#3
Thread Starter
Member
Re: formatting code
 Originally Posted by si_the_geek
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
-
Mar 14th, 2007, 08:09 PM
#4
Re: formatting code
You can use [code] and manually colour keywords using the [color] tag, if you're masochistic enough.
-
Mar 14th, 2007, 08:22 PM
#5
Thread Starter
Member
Re: formatting code
 Originally Posted by penagate
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?
-
Mar 14th, 2007, 08:28 PM
#6
Re: formatting code
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.
-
Mar 14th, 2007, 08:35 PM
#7
Thread Starter
Member
Re: formatting code
 Originally Posted by penagate
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
-
Mar 14th, 2007, 08:36 PM
#8
Thread Starter
Member
Re: formatting code
i seem to remember someone actually created a application for custom tag formatting, do you remember who that was?
-
Mar 14th, 2007, 08:43 PM
#9
Thread Starter
Member
Re: formatting code
i think the app used to be in this thread that has dissapeared?
http://forums.vb-world.net/showthrea...threadid=59426
-
Mar 14th, 2007, 09:44 PM
#10
Thread Starter
Member
Re: formatting code
Code:
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
-
Mar 14th, 2007, 09:45 PM
#11
Thread Starter
Member
Re: formatting code
excellent
-
Mar 15th, 2007, 11:20 AM
#12
Re: formatting code
That's a lot of work. 
I've deleted your "test" posts from this thread. We have a separate Forum Test Area 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.
-
Mar 15th, 2007, 05:06 PM
#13
Thread Starter
Member
Re: formatting code
 Originally Posted by si_the_geek
That's a lot of work. 
whew, yep, sore fingers now.
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.
-
Mar 23rd, 2007, 10:14 PM
#14
Re: formatting code
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?
-
Mar 23rd, 2007, 10:27 PM
#15
Re: formatting code
If you want to copy and paste code that is formatted this way (with [highlight=VB] tags)
vb Code:
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 Sub
then 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.
-
Mar 24th, 2007, 11:07 AM
#16
Re: formatting code
Now just allow for tags inside the code and we'll be one step closer...
-
Mar 24th, 2007, 12:22 PM
#17
Re: formatting code
Sorry, I don't have any control over that.
-
Mar 24th, 2007, 01:24 PM
#18
Re: formatting code
 Originally Posted by timeshifter
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:
[noparse][HIGHLIGHT="vb"] code here [/HIGHLIGHT][/noparse]
shows: [HIGHLIGHT="vb"] code here [/HIGHLIGHT]
-
Mar 24th, 2007, 09:03 PM
#19
Re: formatting code
 Originally Posted by timeshifter
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.
[highlight='vb'][/highlight]
-
Mar 25th, 2007, 07:50 PM
#20
Re: formatting code
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...
-
Mar 25th, 2007, 07:53 PM
#21
Re: formatting code
Sorry but for the foreseeable future everything will remain as it is.
-
Mar 25th, 2007, 09:28 PM
#22
Re: formatting code
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...
-
Mar 25th, 2007, 09:32 PM
#23
Re: formatting code
First of all this has nothing to do with Microsoft and second, as far as I know, only one person is "pissed".
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|