Page 1 of 2 12>
Topic Options
#204846 - 2012-04-21 05:00 PM postprep inbuilt to the forums
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
might not stay but for now, if you want your code postprepped, write [postprep] inside your code-tags before your code.
_________________________
!

download KiXnet

Top
#204847 - 2012-04-21 05:12 PM Re: postprep inbuilt to the forums [Re: Lonkero]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4574
Loc: USA
What am I doing wrong?

 Code:
[postprep]
Working?


 Code:
[postprep]
Working?
[/postprep]
_________________________
(... better days ahead)

Top
#204848 - 2012-04-21 05:13 PM Re: postprep inbuilt to the forums [Re: Allen]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4574
Loc: USA
Oh... so preview doesn't work... cool Jooel
_________________________
(... better days ahead)

Top
#204849 - 2012-04-21 05:34 PM Re: postprep inbuilt to the forums [Re: Allen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yea, it only fires when code's are displayed, so the original code is unaltered thus also avoiding the postsize limit (hopefully)

I don't know why, but bolding didn't work. I would have loved it get something bold, there is only so many colors you can use.

oh...
if something is red, it's unrecognized which means something is wrong or a keyword is unregocnized. like UDF names.
works kinda like a sanitizer as well in that sense.
_________________________
!

download KiXnet

Top
#204882 - 2012-04-21 10:48 PM Re: postprep inbuilt to the forums [Re: Lonkero]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
 Code:
[postprep]
Function AddToMyNetworkPlaces($Name,$Location,Optional $Comment)
  Dim $Nethood,$Shell,$S,$D,$T
  $AddToMyNetworkPlaces=1
  If Exist($Location)
    $Nethood=ReadValue('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders','NetHood')
    If GetFileAttr($Nethood+'\'+$Name) & 16
    	; 'Link exists already. Exit the function. 
      Exit 80
    EndIf
    MD $Nethood+'\'+$Name
    $D=$Nethood+'\'+$Name+'\'+'Desktop.ini'
    $T=$Nethood+'\'+$Name+'\'+'target.lnk'
    $S = SetFileAttr($Nethood+'\'+$Name,1)
    $S = WriteProfileString ($D,'.ShellClassInfo','CLSID2','{0AFACED1-E828-11D1-9187-B532F1E9575D}')
    $S = WriteProfileString ($D,'.ShellClassInfo','FLAGS','2')
    $S = SetFileAttr($D,6)
    $Shell = CreateObject('wscript.shell')
    If @ERROR Exit @ERROR EndIf
    $S = $Shell.CreateShortcut($T)
    $S.TargetPath = $Location
    $S.WorkingDirectory = $Location
    If $Comment
      $S.Description = $Comment
    EndIf
    $S.Save
    If @ERROR Exit @ERROR Else $AddToMyNetworkPlaces=0 EndIf
  Else
    Exit 3
  EndIf
EndFunction

Top
#204883 - 2012-04-21 10:50 PM Re: postprep inbuilt to the forums [Re: NTDOC]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Cool, thanks Jooel
Top
#204903 - 2012-04-23 04:39 PM Re: postprep inbuilt to the forums [Re: NTDOC]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
new version.
if poster doesn't include the tag, the code can still be postprepped on the fly by clicking the book-icon that will show next to the Code-text.
_________________________
!

download KiXnet

Top
#204915 - 2012-04-23 06:40 PM Re: postprep inbuilt to the forums [Re: Lonkero]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4574
Loc: USA
If you click it more than once... the code disappears.
_________________________
(... better days ahead)

Top
#204917 - 2012-04-23 07:04 PM Re: postprep inbuilt to the forums [Re: Allen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
nice. like magic.
is that a bad thing? :P
_________________________
!

download KiXnet

Top
#204918 - 2012-04-23 07:28 PM Re: postprep inbuilt to the forums [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
k, not anymore.
_________________________
!

download KiXnet

Top
#204925 - 2012-04-23 09:56 PM Re: postprep inbuilt to the forums [Re: Lonkero]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
 Originally Posted By: Lonkero
new version.
if poster doesn't include the tag, the code can still be postprepped on the fly by clicking the book-icon that will show next to the Code-text.


Nice.
Small suggestion, a tooltip like "Postprep this code" would be nice if you move your mouse over the book so people know what is does.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#204926 - 2012-04-23 10:03 PM Re: postprep inbuilt to the forums [Re: Mart]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Hey, could we have a "vanilla" button for those of us that don't like the colourization?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#204928 - 2012-04-23 10:17 PM Re: postprep inbuilt to the forums [Re: Les]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hmm...
that is harder to do. you know, just like cleaning is harder than messing things up ;\)
_________________________
!

download KiXnet

Top
#204930 - 2012-04-23 10:22 PM Re: postprep inbuilt to the forums [Re: Lonkero]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4574
Loc: USA
Les... lol!
_________________________
(... better days ahead)

Top
#204946 - 2012-04-24 12:51 PM Re: postprep inbuilt to the forums [Re: Les]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
Sure - it's called "Download PP, edit the config file to Black on White, PP your code and Post!" \:\)

Next, someone's gonna ask for Rum Raisin! \:D

I do see Lonk's point of cleaning is harder than messing.. the colors should be balanced and pleasing to most, or the wrapper will have to specify one of several config files to pass to the Kix2HTM UDF.

G-
_________________________
Actually I am a Rocket Scientist! \:D

Top
#204947 - 2012-04-24 01:17 PM Re: postprep inbuilt to the forums [Re: Glenn Barnas]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I can clean the code-tags as easily as marking them. a bit of code and time with alien script-language.

I can't touch the postpreped code though. it's in a fieldset, or/and pre-block, or/and div, or/and span depending on the version it might have all kinda funky stuff to make it "alive"

and to the colors, yea, it's easy to get them look hidious.
_________________________
!

download KiXnet

Top
#204949 - 2012-04-24 01:37 PM Re: postprep inbuilt to the forums [Re: Lonkero]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Don't sweat it. I can copy/paste it to notepad.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#204950 - 2012-04-24 01:40 PM Re: postprep inbuilt to the forums [Re: Les]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
Les, you rock.
_________________________
!

download KiXnet

Top
#204954 - 2012-04-25 06:34 AM Re: postprep inbuilt to the forums [Re: Lonkero]
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
Excellent work Lonk! I think code should be postprepped by default.
Top
#204956 - 2012-04-25 11:49 AM Re: postprep inbuilt to the forums [Re: It_took_my_meds]
BradV Offline
Seasoned Scripter
****

Registered: 2006-08-16
Posts: 687
Loc: Maryland, USA
I agree it is excellent work, but disagree on making it the default. To me the colorization makes the code distracting and difficult to read. I can see using it as a tool to quickly point out some things, but I personally find it makes new code more difficult to read through. To each his own. \:\)
Top
Page 1 of 2 12>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 581 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.198 seconds in which 0.157 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org