UBB.Dev
Posted By: MTO Edit the Templates in Dreamweaver - 04/26/2002 4:05 AM
Here are a few tricks to be able to edit the templates in Dreamweaver 4:


Identify the TMPL extension:
- Go to your dreamweaver configuration folder, [:blue]...\Dreamweaver 4\Configuration[/] and open [:blue]Extensions.txt[/]
- In the first line, add anywhere[:red] TMPL [/], but before [:green] :All [/] example:
[:#666666]HTM,HTML,SHTM,SHTML,STM,SSI,JS,XML,LBI,DWT,ASP,CFM,CFML,TXT,PHP,PHP3,PHP4,LASSO,JSP, [:red] TMPL [/] :All Documents [/]
- Then, in the next lines, add the following line:
[:green] TMPL:UBBThreads Templates [/]

Remove the PHP Tags
Dreamweaver converts all that starts with [:red] <? [/] into a tag icon. But ubbthreads templates are ALL inside these tags. So if you open it, you dont see ANYTHING. Most people dont edit PHP with Dreamweaver, I sure dont. So you can safely remove this tag option by:
- Go to your [:blue] \Dreamweaver 4\Configuration\ThirdPartyTags [/] folder.
Rename [:green] php.xml [/] to [:red] php.xml.bak [/] (so you can easily go back to your default installation if you dont like it).
Restart Dreamweaver to see changes. Now, you should be able to view ubbthreads templates with no problem inside Dreamweaver.

Make ubbthread Tags
This is one suggestion you will want to do once in a while, going back and forward to enable/dissable this. It will make the tables much easier to lookat , and therefore to design with. But it doesnt allow you to see the text. So remember, you will want to be switching this "on and off".
- Go to your [:blue] \Dreamweaver 4\Configuration\ThirdPartyTags [/] folder.
Create a new file, name it [:red] ubb.xml [/]
- Insert the following line:
[:green] <tagspec tag_name="ubb" start_string="{$" end_string="']}" detect_in_attribute="true" icon="UBB.gif" icon_width="15" icon_height="15"></tagspec>
[/]
Save an icon such as this one []/forum/images/icons/grin.gif[/] into that same folder, and name it UBB.gif
Done. Restart Dreamweaver to see changes.
Remember, for design purposes, this last trick you will want to use at some times, not always. So when not, just rename it to [:green] ubb.xml.bak [/]
Posted By: AllenAyres Re: Edit the Templates in Dreamweaver - 04/26/2002 4:29 AM
Thanks MTO, should be very helpful []/forum/images/icons/smile.gif[/]
Posted By: Medar Re: Edit the Templates in Dreamweaver - 04/26/2002 5:34 PM
Very cool MTO - going to set this up when I get home.
Posted By: Charles Re: Edit the Templates in Dreamweaver - 06/09/2002 2:32 PM
In Dreamweaver MX I am only able to get the code view and not the design view, any idea on what I should do ?
Posted By: MTO Re: Edit the Templates in Dreamweaver - 06/09/2002 7:32 PM
I havent tested Dreamweaver MX yet. In fact, I didnt even know it existed till I read your post.
Posted By: Charles Re: Edit the Templates in Dreamweaver - 06/09/2002 7:36 PM
well if you could give it a try I would apreciate it
Posted By: Charles Re: Edit the Templates in Dreamweaver - 06/12/2002 10:30 PM
OK got it to work !!

for people using Macromedia MX please do the following:

in the Configuration folder edit file Extensions.txt
replace first line:
[]HTM,HTML,SHTM,SHTML,

with:
[]TMPL,HTM,HTML,SHTM,SHTML,

!!Carefull!!! tried adding mine first to the end and it wouldn't work.
If you are in a multiuser environment make sure you edit the file inside your personnal folder

Next in the Configuration\DocumentTypes folder open the MMDocumentTypes.xml file.

Not doing this will prevent using the WYSIWYG feature and you will only be able to use the code editor.

You need to add the TMPL extension to one of the predifined styles, I added it to the HTML one since thats what mostly in the file

replace:
[]<documenttype id="HTML" internaltype="HTML" winfileextension="htm,html,shtml,shtm,stm,lasso,xhtml" macfileextension="html,htm,shtml,shtm,lasso,xhtml"

with:
[]<documenttype id="HTML" internaltype="HTML" winfileextension="htm,html,shtml,shtm,stm,lasso,xhtml,tmpl" macfileextension="html,htm,shtml,shtm,lasso,xhtml,tmpl"


next we need to disable the PHP cloaking function so go to the Configuration\ThirdPartyTags dir and open the file named Tags.xml (make a backup first). Delete the whole paragraph under []<!-- PHP -->
There you go, you can now edit your UBB.threads template in dreamweaver MX !


Posted By: msula Re: Edit the Templates in Dreamweaver - 06/18/2002 1:31 AM
does this work with DW4? I don't have MX yet, and really like 4, but haven't tested it.
Posted By: MTO Re: Edit the Templates in Dreamweaver - 06/18/2002 5:55 AM
The original post (start of thread) is for Dreamweaver 4.
© UBB.Developers