Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.
-
ryanmhuc #1
Create a PHP Translator
I would like to create a Dreamweaver Translator which will translater specific
PHP tags: For example:
<?php include 'test.php' ?>
If the tag is equal to the above I want to display something besides the
normal PHP image that dreamweaver displays. I wrote a translator and in the
getTranslatorInfo() function I used the expression "<?php" but when the
translator loads I get an error
The following translators were not loaded due to errors:
myphp.htm has information duplicated by another translator.
So i gather that the dreamweaver transator for <?php conflicts with mine.
conSo how do i get around this?
ryanmhuc Guest
-
CJK Unified unicode translator
Does any one know of a translator, preferably one implemented in perl, that will translate CJK Unified code points to their respective language... -
Tag Translator
Hi All.. I am working on dreamweaver customization, but Im having problems with the translation issue. I did my own tags and I can easily... -
EditTextOnly.htm/translator problem
I have the following message when one of our users tries to open attempts unsucessfully to log in: "The Following translators were not loaded due... -
Is there any Spanish Translator for FreeHand?
Is there any Spanish Translator for FreeHand 8 or 10, or a Spanish Spell Check? -
php to java translator
Hi Does anyone know if there exists some sort of php to java translator. I dont expect it to produce running code, as I am willing to edit the... -
Joris van Lier #2
Re: Create a PHP Translator
"ryanmhuc" <webforumsuser@macromedia.com> wrote in message
news:fghbjn$hlq$1@forums.macromedia.com...> I would like to create a Dreamweaver Translator which will translater
> specific
> PHP tags: For example:
>
> <?php include 'test.php' ?>
>
> If the tag is equal to the above I want to display something besides the
> normal PHP image that dreamweaver displays. I wrote a translator and in
> the
> getTranslatorInfo() function I used the expression "<?php" but when the
> translator loads I get an error
>
> The following translators were not loaded due to errors:
> myphp.htm has information duplicated by another translator.
>
> So i gather that the dreamweaver transator for <?php conflicts with mine.
> conSo how do i get around this?
Without more information, I would suggest that you create a more specific
pattern and since it's PHP code I would also suggest to limit the
translation to PHP Servermodel related files for speed.
You can also create a serverbehavior for your code first, and add a
translation in the EDML, this way you can use the more specific matching
methods like whereToSearch and quickSearch
For example: here's a snippet from my custom Repeat region DWMX extension
(it's ASP but you'll get the idea)
<participant name="VSS_Repeat_Checkout_begin">
<translator>
<searchPatterns whereToSearch="directive">
<searchPattern paramNames="loopName,rsName" isOptional="false"
limitSearch="all"><![CDATA[/Dim ([^\r\n]*?)_index(?:\r\n|\r(?!\n)|\n)[
\t]*[^\r\n]*?_index = 0(?:\r\n|\r(?!\n)|\n)[ \t]*For Each [^\r\n]*? in
([^\r\n]*?)\.Checkouts ' repeat Checkouts(?:\r\n|\r(?!\n)|\n)[
\t]*[^\r\n]*?_index = [^\r\n]*?_index \+
1(?=\r\n|\r|\n|%>)/i]]></searchPattern>
<searchPattern requiredLocation="trailing"><![CDATA[/Next ' repeat
Checkouts ([^\r\n]*?) in
([^\r\n]*?)\.Checkouts(?=\r\n|\r|\n|%>)/i]]></searchPattern>
</searchPatterns>
<translations>
<translation whereToSearch="directive" translationType="tabbed region
start">
<openTag>MM_REPEATEDREGION</openTag>
<attributes>
<attribute><![CDATA[NAME="@@loopName@@"]]></attribute>
<attribute><![CDATA[SOURCE="@@rsName@@"]]></attribute>
</attributes>
<display>MM.LABEL_RepeatTabbedOutlineLabel</display>
</translation>
</translations>
</translator>
</participant>
--
Joris van Lier
Joris van Lier Guest
-
ryanmhuc #3
Re: Create a PHP Translator
If i undertand you correctly you suggestioning to create a unique tag. But that
will not accomplish what i'm looking for. I do not need a work around i need
the solution. I know its possible to intercept built in tags like the PHP tags
I just don't know how. Please if anyone knows lend a hand.
ryanmhuc Guest
-
Joris van Lier #4
Re: Create a PHP Translator
"ryanmhuc" <webforumsuser@macromedia.com> wrote in message
news:fgif5k$1op$1@forums.macromedia.com...No I was suggesting you write a translation for the php tag including (parts> If i undertand you correctly you suggestioning to create a unique tag. But
> that
> will not accomplish what i'm looking for. I do not need a work around i
> need
> the solution. I know its possible to intercept built in tags like the PHP
> tags
> I just don't know how. Please if anyone knows lend a hand.
of ) it's contents trough EDML, instead of an extra translator.
perhaps you can explain in more detail what you want to accomplish, why are
the standard translators insufficient? Or in other words: what is it that
you'd want to display in addition to the shield, and why?
Joris
Joris van Lier Guest
-
ryanmhuc #5
Re: Create a PHP Translator
The goal is pretty simple. Right a translator which will translate the
following syntax:
<? include('test.php') ?>
The problem is the dreamweavers built in MM_SSI translates this before I can
get a hold of it. How do I get my translator to run before the MM_SSI
translator?
ryanmhuc Guest
-
Joris van Lier #6
Re: Create a PHP Translator
"ryanmhuc" <webforumsuser@macromedia.com> wrote in message
news:fgir9c$g08$1@forums.macromedia.com...Into what?> The goal is pretty simple. Right a translator which will translate the
> following syntax:
>
> <? include('test.php') ?>
You can return the priority of the translator as the 7th element of the> The problem is the dreamweavers built in MM_SSI translates this before I
> can
> get a hold of it. How do I get my translator to run before the MM_SSI
> translator?
translatorInfo function return object, a higher priority should make your
translator run before others.
Do you want to override all includes or just a specific one or set?
Joris van Lier Guest
-
ryanmhuc #7
Re: Create a PHP Translator
In this case setting the priority down will not help (I already tried). The
reason is the MM_SSI translator runs on the text "include" mine runs on "<?".
I guesss I could set mine to translate the same text but is there a way to
have one translator run before others regardless of the expression used?
ryanmhuc Guest
-
Joris van Lier #8
Re: Create a PHP Translator
"ryanmhuc" <webforumsuser@macromedia.com> wrote in message
news:fgj17s$n86$1@forums.macromedia.com...According to the documentation you should be able to have your translator> In this case setting the priority down will not help (I already tried).
> The
> reason is the MM_SSI translator runs on the text "include" mine runs on
> "<?".
>
> I guesss I could set mine to translate the same text but is there a way to
> have one translator run before others regardless of the expression used?
run before others by configuring a higher value for it's priority. In
Dreamweaver MX I've found an SSITranslator.DLL in the JSExtensions forlder
of the application configuration directory, according to the documentation
I've read these Libraries provide a global object to the Dreamweaver
application environment whose name is the basename of the library, you might
try to dump the object (SSITranslator.toSource()) to see if and what
priority it has configured.
Joris
Joris van Lier Guest



Reply With Quote

