Welcome to the Invelos forums. Please read the forum rules before posting.

Read access to our public forums is open to everyone. To post messages, a free registration is required.

If you have an Invelos account, sign in to post.

    Invelos Forums->DVD Profiler: Desktop Technical Support Page: 1 2  Previous   Next
Problems embeding NOTES in a HTML window script
Author Message
DVD Profiler Unlimited Registrantdtsig
Just asking questions man
Registered: August 17, 2009
United States Posts: 352
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
1) Why can't there be formatting in the NOTES.  In overview you can BOLD etc and that information stays that way .. but this is not allowed in NOTES.  Is there a reason that USERS can't have an edit box that has edit powers?

2) Even simple CRLFs are lost from NOTES in HTML windows.  I have created the following pretty simple script.  I expect it to display the OVERVIEW comments with formatting and the NOTES comments with formatting (of course the only formatting allowed is crlf)



Just fyi the OVERVIEW looks like this



and the NOTES look like this



Now when i view this in the VIEW -> HTML Windows -> and select script TEST i get this



Now as you can plainly see, the OVERVIEW section has retained its formatting (especially notice the CRLF) but then the NOTES section has lost its formatting (CRLF).

So my questions are

1) Once again why can't there be any formatting in the NOTES section?  Is there something I am plainly missing?

2) am i doing something wrong with the script or is this just a limitation with dvdProfiler that i have to get used to

Thank you
David
 Last edited: by dtsig
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Highest Rating
United States Posts: 17,334
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
It is in the options... go to Tools-->Options-->Display and the first option there is Use HTML for Notes... check that and click OK.
Pete
DVD Profiler Unlimited RegistrantStar ContributorTomGaines
Registered Sept. 24, 2001
Registered: March 13, 2007
Reputation: High Rating
Germany Posts: 2,005
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
At least with the crlf you could get around if you use the DP_Notes variable from the header_vars.
You only need to replace the clrf with HTML linebreaks:
DP_Notes.replace(/\r?\n/g, '<br/>')

Also you could use <i></i> and <b></b> and other HTML tags in notes. These should then also show as formatted in HTML windows.


DVD Profiler Unlimited Registrantdtsig
Just asking questions man
Registered: August 17, 2009
United States Posts: 352
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting Addicted2DVD:
Quote:
It is in the options... go to Tools-->Options-->Display and the first option there is Use HTML for Notes... check that and click OK.

I just set as you suggested.  In Personalize DVD/Notes it did change the "look' of the text but I find no way to format.  For example using simple [b][/b] tags did not BOLD the output AND all the text from NOTES was still scrunched together with all CRLF lost.

There was something funny though.  The <IMDB> and <WIKIPEDIA> tags were blue .. guess the view mode only notes TAGS.  And in the text the word "NAME" is pink.  Just text not in a tag etc.

See here



Sure there is something lacking in my implementation

Thanks for the quick response
David
DVD Profiler Unlimited RegistrantStar Contributorscotthm
Registered: March 20, 2007
Reputation: Great Rating
United States Posts: 2,851
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting dtsig:
Quote:
I just set as you suggested.  In Personalize DVD/Notes it did change the "look' of the text but I find no way to format.

You need to use HTML tags.

For example, try <b>BOLD</b> instead of [b]BOLD[/b].

And use <br> for line breaks.

---------------
 Last edited: by scotthm
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Highest Rating
United States Posts: 17,334
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
[ b] and [ /b] isn't html codes.. they are bbcodes. you want to use <b> and </b>
Pete
DVD Profiler Unlimited Registrantdtsig
Just asking questions man
Registered: August 17, 2009
United States Posts: 352
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting TomGaines:
Quote:
At least with the crlf you could get around if you use the DP_Notes variable from the header_vars.
You only need to replace the clrf with HTML linebreaks:
DP_Notes.replace(/\r?\n/g, '<br/>')

Also you could use <i></i> and <b></b> and other HTML tags in notes. These should then also show as formatted in HTML windows.

Not working on the CRLF yet (regex really gets me <G>) but with other formatting .. will try that next.

With the View as HTML still set i tried this

Added just a couple of HTML tags.  The PERSONALIZE window looks like this.  Note it does not display the correct HTML formatting.  What is the use of the "view as html"?



So then the OUTPUT in the TEST script looks like this



It does bring the html tags accross into the "TEST" window.  From earlier notes I can format the text in the personalize/notes edit box but saving all HTML codes do not make reading the text easier in dvdProfiler.

Once again I am sure that I am missing something here.

Thanks
DSig
DVD Profiler Unlimited Registrantdtsig
Just asking questions man
Registered: August 17, 2009
United States Posts: 352
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting Addicted2DVD:
Quote:
[ b] and [ /b] isn't html codes.. they are bbcodes. you want to use <b> and </b>

Of course you are right .. I knew that it couldn't be dvdProfiler

Thanks
Dsig
DVD Profiler Unlimited Registrantdtsig
Just asking questions man
Registered: August 17, 2009
United States Posts: 352
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Actually I think the problem is once again mine.  I am wanting DVD profiler to do things that it just doesn't doesn't/can't do.

I would *expect* that there be some 'formatting' options in the Notes field.  But instead you can put in HTML codes into the test and the window appears to be just a HTML Syntax display.  Like this



When you view the 'html window', in this example TEST it looks like this.



Note that there is BOLD and a LIST element.

I guess I want my cake and eat it too .. as I only use the HTML windows to create output for a BB site.  So i need the codes embedded.

So in either case the Personalize Notes needs a lot of codes that make the display/test hard to read.  And if i use HTML tags <> then you get the formatting in the TEST html window but nothing on the BB site.

Oh well .. nice try.  Guess i will work on the CRLF thing now

Thanks you for your information
David
DVD Profiler Unlimited RegistrantStar ContributorTomGaines
Registered Sept. 24, 2001
Registered: March 13, 2007
Reputation: High Rating
Germany Posts: 2,005
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting dtsig:
Quote:
So in either case the Personalize Notes needs a lot of codes that make the display/test hard to read.  And if i use HTML tags <> then you get the formatting in the TEST html window but nothing on the BB site.

Oh well .. nice try.  Guess i will work on the CRLF thing now


As I noted you can use DP_Notes and replace the CRLF.
The same you can do with the HTML tags and convert them to bbcode for BB sites.

// replacing CRLF
DP_Notes = DP_Notes.replace(/\r?\n/g, '<br/>');
// replacing HTML tags with BB code
DP_Notes = DP_Notes.replace(/<(/?\w)>/g, '[$1]')


DVD Profiler Unlimited Registrantdtsig
Just asking questions man
Registered: August 17, 2009
United States Posts: 352
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting TomGaines:
Quote:
Quoting dtsig:
Quote:
So in either case the Personalize Notes needs a lot of codes that make the display/test hard to read.  And if i use HTML tags <> then you get the formatting in the TEST html window but nothing on the BB site.

Oh well .. nice try.  Guess i will work on the CRLF thing now


As I noted you can use DP_Notes and replace the CRLF.
The same you can do with the HTML tags and convert them to bbcode for BB sites.

// replacing CRLF
DP_Notes = DP_Notes.replace(/\r?\n/g, '<br/>');
// replacing HTML tags with BB code
DP_Notes = DP_Notes.replace(/<(/?\w)>/g, '[$1]')


Yep .. i said that was going to be my next step.

So in my test script i copied/paste you code with the script now looking like



When i go into preview mode it looks like ..




Once again I am sure it is something I am doing wrong.  Not being a html/javascipt guy is becoming a real handicap in using dvdprofiler <G>

Thanks for any suggestions you have
David
DVD Profiler Desktop and Mobile RegistrantStar ContributorDJ Doena
Registered: May 1, 2002
Registered: March 14, 2007
Reputation: Highest Rating
Germany Posts: 6,745
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting dtsig:
Quote:


After <br/> your closing single quotation mark ' is missing.
Karsten
DVD Collectors Online

 Last edited: by DJ Doena
DVD Profiler Unlimited RegistrantStar ContributorTomGaines
Registered Sept. 24, 2001
Registered: March 13, 2007
Reputation: High Rating
Germany Posts: 2,005
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Also you have to put the code inside of a <script language="JavaScript"> section. And then use document.write(DP_Notes); to print out the notes.


 Last edited: by TomGaines
DVD Profiler Unlimited RegistrantFredLooks
phpDVDProfilerDude D5/7/2
Registered: March 13, 2007
Canada Posts: 350
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
I notice that you have the construct <IMDb>tt1234567</IMDb> in your example Notes image. Two points, assuming that you are not really interested in the "tt1234567" showing up in the HTML output:

1. If you are using this to take advantage of phpDVDProfiler's ability to construct an IMDb link, then there is an alternative syntax: <IMDb number=1234567 /> does the same thing, but will not display in an HTML window.

2. Alternatively, you can use the same technique TomGaines suggested (for changing \r\n into <br>) to remove the "detritus":
// replacing CRLF
DP_Notes = DP_Notes.replace(/\r?\n/g, '<br/>');
// removing IMDb cruft
DP_Notes = DP_Notes.replace(/<IMDb>[^<]*<\/IMDb>/gi, '');

Note that that last line ends with two single quotes side-by-each (single-quote single-quote right-parenthesis semicolon)(I wish there was some sort of teletype font that could be used to make this type of thing more clear)
-fred
 Last edited: by FredLooks
DVD Profiler Unlimited Registrantdtsig
Just asking questions man
Registered: August 17, 2009
United States Posts: 352
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting DJ Doena:
Quote:
Quoting dtsig:
Quote:


After <br/> your closing single quotation mark ' is missing.

Thanks for that.  I just copy and pasted the earlier comment and must have missed the single quote.

But when I put the single quote in after the > and before the ) it displays the same

DSig
 Last edited: by dtsig
DVD Profiler Unlimited RegistrantStar ContributorTomGaines
Registered Sept. 24, 2001
Registered: March 13, 2007
Reputation: High Rating
Germany Posts: 2,005
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting dtsig:
Quote:

But when I put the single quote in after the > and before the ) it displays the same


Quoting TomGaines:
Quote:
Also you have to put the code inside of a <script language="JavaScript"> section. And then use document.write(DP_Notes); to print out the notes.



It needs to be:
<script language="javascript">
// replacing CRLF
DP_Notes = DP_Notes.replace(/\r?\n/g, '<br/>');
document.write(DP_Notes);
</script>


    Invelos Forums->DVD Profiler: Desktop Technical Support Page: 1 2  Previous   Next