SourceTec Software

It is currently Mon Apr 21, 2014 1:56 am

All times are UTC + 8 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Wed Jun 14, 2006 5:37 pm 
Offline
Poster

Joined: Fri Sep 09, 2005 8:40 am
Posts: 27
Difficulties in applying the same DHTML Menu syntax to Tree menu.
ColdFusion chockes with the single "#" in the .js code, or something ...

ColdFusioners please share your experimenting.
Will gladly reciprocate.

Walter Conti


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 14, 2006 6:33 pm 
Offline
Support Team
Support Team
User avatar

Joined: Tue Jul 06, 2004 12:00 pm
Posts: 2464
Location: Wuhan, Hubei Province, China
Hi,
Cold Fusion uses the # sign to display a variable (ie: #FirstName# to display a first name variable). However, the # sign is also placed in front of a color attribute (ie: #ffffff for the color "white"). This will create a critical error when the color attribute is between the <CFOUTPUT> and </CFOUTPUT> tags.
As a result, you will need to go into the code and manually add another # in front of any color attribute (ie: ##ffffff) after the menu has been published.

Hope that helps.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 14, 2006 7:10 pm 
Offline
Poster

Joined: Fri Sep 09, 2005 8:40 am
Posts: 27
[quote="gracie"] you will need to go into the code and manually add another # in front of any color attribute (ie: ##ffffff) after the menu has been published.quote]

Thank You Gracie.
I knew about it. I just wanted to know if you knew it also. (joke, hahaha!)

ColdFusion works also by eliminating the "#" altogether.
Do you know if anybody has created a routine to either duplicate the "#" in front of hex strings or just delete them?

By the way : your TreeMenu is Awsome!
Poor people at "CoolTree-Pro" are going to be in real trouble.

There is an element that nobody talk about when a good software comes out: not only you feel your work is going to be easier, nice looking etc., but also there is a feeling like when you are being given the keys of a newly bought car. It makes you feel good. Thank you girls, & guys!

Walter


Top
 Profile  
 
PostPosted: Tue Aug 08, 2006 3:22 pm 
Offline
Member

Joined: Fri Apr 14, 2006 8:43 am
Posts: 16
I created an application myself that would replace all the #'s with ##, only between the <cfoutput> tags.

I was tired of doing it manually and finding them all except maybe one and not getting the menu to work right, so I created an application to do it for me.

Would you still like it or did you already find something for your needs?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 09, 2006 1:32 am 
Offline
Support Team
Support Team

Joined: Fri Jan 28, 2005 5:15 pm
Posts: 1866
Hello perkley,

We are interested in it and would you mind providing the application for us to have a check?

Your help will be very appreciated.


Top
 Profile  
 
 Post subject: Cold Fusion File Fix
PostPosted: Wed Aug 09, 2006 8:03 am 
Offline
Member

Joined: Fri Apr 14, 2006 8:43 am
Posts: 16
This application was written in Delphi 7 Pro and was just a quick program to fix the double pound sign problem with Cold Fusion and the Sothink Menu code generated.

My steps were, copy the source, paste in my file, which I called menujs.cfm.

I then had a shortcut setup on my computer to launch my little application (convertmenupoundsigns.exe), and it would process the menujs.cfm.

Then I would refresh the website to see if it was working correctly.

The code is basic and is as follows:

procedure TForm1.btnConvertClick(Sender: TObject);
var
vFile: TStringList;
i, n: integer;
tmp, tmp2: String;
MakeDoublePounds: Boolean;
begin
if FileExists(eFile.Text) = False then
begin
ShowMessage('Cannot find file - '+eFile.text);
exit;
end;

MakeDoublePounds := False;

vFile := TStringList.Create;
try
vFile.LoadFromFile(eFile.Text);

for i := 0 to vFile.Count-1 do
begin
if Pos('<cfoutput', vFile.Strings[i]) > 0 then
MakeDoublePounds := True;

if MakeDoublePounds then
begin
tmp := vFile.Strings[i];

//Just for a really quick and dirty job to get this done
tmp := StringReplace(tmp, '#vItem#', '-vItem-', [rfReplaceAll, rfIgnoreCase]);
tmp := StringReplace(tmp, '#menulink#', '-menulink-', [rfReplaceAll, rfIgnoreCase]);
tmp := StringReplace(tmp, '#bordercolor#', '-bordercolor-', [rfReplaceAll, rfIgnoreCase]);

tmp := StringReplace(tmp, '#', '##', [rfReplaceAll]);

tmp := StringReplace(tmp, '-vItem-', '#vItem#', [rfReplaceAll, rfIgnoreCase]);
tmp := StringReplace(tmp, '-menulink-', '#menulink#', [rfReplaceAll, rfIgnoreCase]);
tmp := StringReplace(tmp, '-bordercolor-', '#bordercolor#', [rfReplaceAll, rfIgnoreCase]);

vFile.Strings[i] := tmp;
end;

if Pos('</cfoutput>', vFile.Strings[i]) > 0 then
MakeDoublePounds := False;

end;

vFile.SaveToFile(eFile.Text);
finally
vFile.Free;
end;

ShowMessage('Completed Fix on File');
end;


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Wed Aug 09, 2006 9:24 am 
Offline
Member

Joined: Fri Apr 14, 2006 8:43 am
Posts: 16
I noticed after looking back at the code that I posted a problem. I am updating all the # signs that need to be and I am skipping the variables that I am using, like #vItem#, #menulink#, #bordercolor#. So, what I could do is add to the program a list of variables that a person might have that it would skip so that anyone could use the program. What's your thoughts? Any other ideas you might want on it I could do.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 10, 2006 1:41 am 
Offline
Support Team
Support Team

Joined: Fri Jan 28, 2005 5:15 pm
Posts: 1866
Hello perkley,

Thanks very much for your help!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group