Alternate 'code' code - Posted (6139 Views)
Retired Support Moderator
MarcelG
Posts: 2625
2625
A problem we're seeing often (especially here at Snitz) is that wide pieces of code stretch the entire page to the right, and makes the topic hard to read.
Wouldn't it be possible to 'mimic' the code box as shown on this page (forgetting the line numbers, which I think aren't necessary and even confusing as they're often not the same as the actual line numbers).
I really like the effect they use to wrap the code, and provide the horizontal scroll bar. Another nifty thing is that when you click the little triangle next to 'code' (left above the actual code) the box expands. I think it's all done with some clever CSS, but unfortunately I cannot seem to actually _read_ the CSS they use. dead
UPDATE Instructions for this mod have been updated for 3.4.06.
The updated mod is available here. -edit 25/2/2009: updated link location-<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
New Member
OBmoderator
Posts: 98
98
OK let me get back to the beginning....... I want the boxes showing in my forum like above. How do I do it? I have tried using the "replacements" mentioned by HuwR and Marcel
but it doesn't work. what I get is the words scrollcode and /scrollcode in the [ ] brackets with the code visible
After I use the "replacements" and try using the normal code tages I get the same look. but I get the words code and /code in the [ ] brackets<
Posted
Retired Support Moderator
MarcelG
Posts: 2625
2625
OBmoderator, this mod does not provide you with the tags [scrollcode][/scrollcode]. Instead, it provides you an alternate method of displaying the normal [code] tags.<
Posted
Retired Support Moderator
MarcelG
Posts: 2625
2625
Instructions for this mod have been updated for 3.4.06.
The updated mod is available here.<
Posted
Junior Member
NiteOwl
Posts: 403
403
Interesting, I followed the instructions to a "t" that were provided by MarcelG and I too now have the words scrollcode and /scrollcode in the [ ] brackets with all the code visible and also when I use the normal code tags I get the words code and /code in the [ ] brackets.
I have only edited the inc_header_short, the inc_header and the inc_function_common

I have backed out the inc_function_common changes for now, and my code/code functions properly again, I too would like to have the scrollcode/scrollcode abilities just like SNiTZ. I suspect that a step has been left out or something from the link provided?? or is it because I am using SNiTZ 3.4.05
<
-=NiteOwl=-
Posted
Retired Support Moderator
MarcelG
Posts: 2625
2625
NiteOwl, my mod changes the way the CODE tags look once posted...it does not add the scrollcode tags. If you post something like this, it should work as normal.
But, if you post this, you'll definitely get the scrollcode text, cause my function does not do anything with the [scrollcode] tag

If you want the codeboxes as shown here on Snitz.com, you should follow Huw's post on the previous page.<
Posted
Junior Member
NiteOwl
Posts: 403
403
Oh, thank you MargelG I thought this was designed to incorporate the scrollcode into the forum similar to what the SNiTZ forum has, so that I can post code and have the scrollable windo, I will open a new topic, (after a search of course) to find out how to bring in the scrollcode to my forum. <
-=NiteOwl=-
Posted
Junior Member
top
Posts: 150
150
Thank you works well now
And I was there in addition to not copy the text Topics forum
How can working copy the text Only in the context text[/scrollcode
You Must enter a message