Page 1 of 1 1
Topic Options
#170646 - 2006-11-25 07:04 AM Test post - ignore
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Code:
Break On
$oRoot = GetObject("LDAP://RootDSE")
$strDomain = $oRoot.Get("DefaultNamingContext")
$objOU = GetObject("LDAP://CN=Users,ou=MYOU,"+$strDomain)
;If the default users ou has not been changed this should work
;Otherwise put in your FULL OU path and remove the RootDSE lookup.
'Get OU Path error: ' + @SERROR ?
$objOU.Filter = "user, "
For Each $objUser In $objOU
  If $objUser
   'User: ' + Right($objUser.Name,-3) + ' has the company set as: ' + $objUser.company ?
;   $objUser.Put("company", "new company name")
;   $objUser.SetInfo
;   Removing the above 2 commented lines and putting your company name in should work
  EndIf
Next
 



Break On
$oRoot = GetObject("LDAP://RootDSE")
$strDomain = $oRoot.Get("DefaultNamingContext")
$objOU = GetObject("LDAP://CN=Users,ou=MYOU,"+$strDomain)
;If the default users ou has not been changed this should work
;Otherwise put in your FULL OU path and remove the RootDSE lookup.
'Get OU Path error: ' + @SERROR ?
$objOU.Filter = "user, "
For Each $objUser In $objOU
If $objUser
'User: ' + Right($objUser.Name,-3) + ' has the company set as: ' + $objUser.company ?
; $objUser.Put("company", "new company name")
; $objUser.SetInfo
; Removing the above 2 commented lines and putting your company name in should work
EndIf
Next

Top
#170647 - 2006-11-25 07:06 AM Re: Test post - ignore [Re: NTDOC]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Code now keeps formatting when using code tags you can directly COPY/PASTE to notepad or other editor and maintian the layout format of the code.

PostPrep does not maintain even when using Wordpad.
 

Top
#170652 - 2006-11-25 10:22 AM Re: Test post - ignore [Re: NTDOC]
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
copy/paste using both examples into notepad seems to work for me
Top
#170653 - 2006-11-25 11:02 AM Re: Test post - ignore [Re: Bryce]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
what are you selecting?

When I copy just the PostPrep code it is all a single line.

Top
#170659 - 2006-11-25 02:47 PM Re: Test post - ignore [Re: NTDOC]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Same here. I triple-click to select all the code and C/P to notepad and it comes out all on one line.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#170660 - 2006-11-25 02:48 PM Re: Test post - ignore [Re: NTDOC]
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Wordpad retained the formatting for me with the PostPrep code.
Top
#170669 - 2006-11-25 06:32 PM Re: Test post - ignore [Re: Chris S.]
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
I click and drag from top of script to bottom...
Top
#170670 - 2006-11-25 06:34 PM Re: Test post - ignore [Re: Bryce]
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
AHH!! this is a IE Vs Firefox thing!

using Firefox, not problems with code or postprep

Using IE, straight code copy/paste no problem. Postprep single line.


Edited by Bryce (2006-11-25 06:37 PM)

Top
#170673 - 2006-11-25 09:38 PM Re: Test post - ignore [Re: Bryce]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
need to fix the editpost/addpost php's again.
_________________________
!

download KiXnet

Top
#170682 - 2006-11-26 01:02 AM Re: Test post - ignore [Re: Lonkero]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Doc,

Simply doing a "view source" shows the source for the PostPrep'd code is on a single line (two, actually), as opposed to multiple lines for the sample above it. Got to ask how the postprep code is stored in the BBS. PostPrep definitely separates lines with CR/LF pairs. UBB seems to be stripping them when it accepts or stores the post.

Something else interesting - I can copy the PostPrep code from this page into MS Word and it retains all proper formatting, including color. I can then successfully copy / paste that into notepad. Word is understanding the < BR > tags properly in leiu of the newlines.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#170685 - 2006-11-26 10:06 AM Re: Test post - ignore [Re: Glenn Barnas]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Yes weird since Wordpad should also treat it that way, but in my test it did not.

 
MS Word though understands and grabs the html coding which Wordpad does not (Word 6 - pretty much what Wordpad is - did not undertand html back then) thus not the exact same thing. However in the past it would keep the formatting and now does not seem to.

Not something I'lll probably spend much time on right now, but maybe take a further look at it later on.
 

Top
#170694 - 2006-11-26 03:33 PM Re: Test post - ignore [Re: NTDOC]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Yeah - Word's HTML support is why I tried it..

The point is - the UBB system is taking the postprepped code and storing it somehow with line termination removed, maybe assuming the < BR > tags are enough, and thus saving a couple bytes by strippingthe CR/LF? I didn't check the string length, but UBB split the Postprepped code into 2 lines. Did you try posting with Postprep and UBB tags?

BTW - for a "test post" we were told to "ignore", this post is sure getting a lot of attention! ;\)

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#170695 - 2006-11-26 03:38 PM Re: Test post - ignore [Re: Glenn Barnas]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
the ubb board have always screwed the html code a bit.
the current version seems to once again have the pre-tags when posting with code-tag.
that's good progress as in last version that had to fixed manually.
anyways, when posting with html enabled, it still seems to screw up the posts like the older versions and that's a thing that needs to be fixed.

don't no longer have access to the system, so it's up to doc to do that.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


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

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.151 seconds in which 0.112 seconds were spent on a total of 13 queries. Zlib compression enabled.

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