updating existing site built in dreamweaver, handling DWT file - ftp

I have a client that want's me to make a change to her OTHER site. The other site was built using Dreamweaver.
I guess (I don't build using Dreamweaver) the site pages are being controlled by the template file EXCEPT for the content that is specific to the page.
So I need to change the navigation items.
I found a folder called templates and in that folder is the template.dwt file. I tried copying that file to my desktop, then making the change and uploading back to the ftp site. Of course that had no effect on the nav items. My guess is the file on my desktop does not know to update the other pages as it doesn't know where those pages are.
So how do I go about making the changes to the files on the ftp site using the DWT file?
Do I have to download ALL the html files and the DWT files and somehow create a relationship so when I make the change to the DWT file it updates all the pages on my desktop THEN re-upload all those files back to the ftp site?
Thanks

My guess is that you already figured this out, but just to be sure. You're question is right, the DW template works by when the template is modified (in DW) then you can update all the pages that are linked to it.
If you take the template out of DW and just modify and upload that alone, then nothing will happen to the other pages. So yea, if you know a way to create a link between the template and the other files outside of DW, then that is what you need to do. The other option is using DW and modify the template and then update the other pages, which is done in a semi-automatic way. Semi-automatic, meaning that DW gives the option to update the files either once you save the template or you can save the template and update the files later using DW.
And your guess is correct, the template modifies areas that are not specific to a page. Usually, this is done by creating Editable Regions in the template. Those regions are excluded from change when the template is modified.

You have to create a project in DW and put inside all the files that are "linked" with the template. They usually have tags inside that refer to the template.
Make sure that you keep the same file and folder distribution that the original had. If not, you could have a mess with relative links.
Then, with your template also in the project, open and modify it.
When you save the template, DW will ask you for scan and update related files, if you are lucky it will find and update all of them.

Related

How to get full image paths from web page using Firebug?

I would like to download all images in full quality from this blog: http://w899c8kcu.homepage.t-online.de/Blog.
I have access to server, but I can not find the directory where the images lie. When I use Firebug on the first picture, it shows me http://w899c8kcu.homepage.t-online.de/Blog;session=f0577255d9df9185d3abe04af0ce922d&focus=CMTOI_de_dtag_hosting_hpcreator_widget_PictureGallery_15716702&path=image.action&frame=CMTOI_de_dtag_hosting_hpcreator_widget_PictureGallery_15716702?id=34877331&width=1000&height=2000&crop=false.
How can I find the file paths like /dirname/image.jpg?
According to its HTML output the page obviously uses the CM4all content management system (CMS).
I don't know how precisely this CMS is working, though generally CMSs normally either save the files under cryptic names within a folder specified in the CMS's configuration or not in the file system at all but within a database.
Also, CMS may only save compressed or resized versions of the original files.
So, if you don't want to or are not able to dig into the server-side script code to find out if and where the images are saved, you should contact the company behind CM4all about this.

Changing Where CKEditor Looks for Images

I am wondering if there is some way to change where CKEditor looks for images. Right now it uses the location of the web page containing the editor as the root directory but I would like to write a javascript function that can change this directory to any arbitrary path passed to the function.
The bigger picture for this is that I'd like to extend the functionality of CKEditor to be able to save the source it creates to whatever location is picked by the user. I've already implemented getting the source and saving it using wxWidgets but am having trouble getting CKEditor to change its working directory so that images can be included from the directory the user picks.
I've tried using some of the properties like baseDir, basePath, and baseHref to make this possible but as far as I can tell none of them quite do what I'm looking for.
So the process would be:
(1) The user picks a directory where the source will be saved
(2) The user creates a page using CKEditor where images from the directory chosen can be included AND DISPLAYED in CKEditor
(3) The user saves the source of their page to the chosen directory (the source saved here should use the relative path to the images because the source is now located in the same directory as the images it includes)
I realize this is a rather unconventional use of CKEditor but if someone might be able to kick me in the right direction to making this happen, I'd really appreciate it.
EDIT:
So after a little experimenting and changing some backslashes to regular slashes, it looks like the baseHref attribute does what I'd like. I've still not been able to change its value at runtime though as I would like. Does anybody know if this is possible with CKEditor? I'd still like to have a javascript function that I can pass a path to and have it change this baseHref value. Right now I have set its value in config.js.
If this isn't possible, I know you can read and write the source in and out of the editor. So I would like to resort to reading and storing the source from the editor, reloading CKEditor with a new config.baseHref, and then writing the source back into the editor. Does anyone know if the CKEditor api provides functionality to reload its configuration?
Thanks.
I don't expect too many people will be trying to do what I was doing here since CKEditor is usually hosted on a server somewhere, but in case someone finds it helpful, here's what I ended up doing.
As I mentioned in the edit to my question, modifying the baseHref gave me the functionality of prepending the image filename with the directory path leading to it. I wasn't able to find a way to modify it while the editor was running so I ended up telling CKEditor to load an external configuration file each time it started with the line
config.customConfig = 'C:/Users/kenwood/Desktop/MarkCreator2/ckeditor/custom_config.js';
Then I used C++ to write new contents to custom_config.js any time I wanted to switch directories.
Unfortunately this method meant I had to read the contents out of the editor, refresh the page, and then write the editor contents back in any time I wanted to change directories. This was adequate for what I needed though.

app_code folder

Normally I only copy the dll files in the bin folder to update the website, when changing the codebehind.
I have made a change to a code file located in the app_code folder.
I have published the site and updated the bin folder with a lot of app_webxxx.dll files.
Now I get a parser error: Could not load the assembly 'App_Web_syn42ext
Is it possible to only update the dll files or do I need to update all aspx files everytime I make a change to get the website running ?
You need to do it as well, you need to update web pages as well, because if you will see when you publish the webpages in aspx page, on header tag, the reference of cs file upgrades itself.
So whenever you will publish there will be some random giud generated and will appended to file name, basically it reference to the name space.
So you will need to update web pages as well.

Concrete 5 - move C5 code, images and references up to docroot

I have installed, configured and built a site on Concrete 5.5.2.1 and it is all working well. I have a problem that I have a URL of www.ayrshireminis.com/concrete5.5.2.1, for example, which is where the index.htm file sits. Is there a way that I can bring the code back up to the docroot without breaking all references such as image paths in the database for example?
Considering that the download of Concrete 5 includes this directory I am assuming that this is a common issue for some developers when using this CMS.
I'm not sure why you have an "index.htm" file -- there is no such thing in a concrete5 installation. In general, though, you should be able to move the site without problems. A few possible exceptions would be:
Depending on how exactly you're moving things, make sure you get every folder/file. For example, if you're using SSH and do something like mv concrete5.5.2.1/* ./, then you will miss the .htaccess file (because it's hidden). But if you're talking about index.htm files I am guessing you're on a Windows server instead of unix so perhaps this doesn't apply.
In older versions of Concrete5, there was a setting in the config/site.php file called DIR_REL that you would need to change when you move the site. For example, if moving from the concrete5.5.2.1 subdirectory up to the top level, you'd change define('DIR_REL', '/concrete5.5.2.1);todefine('DIR_REL', '');. So take a look in yourconfig/site.phpfile, but if you don't see thedefine('DIR_REL'...` line then don't worry about this step.
If you manually entered full URL's to page links or images, you'll need to update those. Usually this isn't an issue (assuming you use the Concrete5 toolbar that sits above the Rich Text Editor controls -- e.g. "Insert Link to Page", "Insert Image", etc.). But if you notice dead links after you move the site, then either manually update the links by editing the blocks in question, or if you want to make sure you update them all in one fell swoop, you can run the following queries on your database (via PhpMyAdmin, for example):
UPDATE btContentLocal SET content = REPLACE(content, '/old/base/dir/', '/new/dir/') WHERE content LIKE '%/old/base/dir/%';
UPDATE btContentImage SET externalLink = REPLACE(externalLink, '/old/base/dir/', '/new/dir/') WHERE externalLink LIKE '%/old/base/dir/%';
UPDATE btSlideshowImg SET url = REPLACE(url, '/old/base/dir/', '/new/dir/') WHERE url LIKE '%/old/base/dir/%';
Be careful with these queries!! You will need to change it so /old/base/dir/ and /new/dir/ make sense for your particular site. You should absolutely positively back up your database before running these queries otherwise you may completely and utterly destroy your site without any way to get it back!!!
It is actually possible to move the code from a ROOT/concrete5.5.2.1 directory back to the root without running the queries above. I simply moved the code up a directory and everything worked.

Does magento touch theme folders during updates

I am working on a Magento project and it is due an update; so I am wondering which folders will it replace/affect during an update. I am used to working with wordpress which leaves the entire 'wp-content' folder ( all the user data ) untouched during an update - I presume magento does something similar and doesnt overwrite custom theme files, media uploads (and hopefully not products and user data anyway) but then I read the following from this page which confuses me
For several of the first Magento themes I built, I copied the layout files from the default or blank theme into the custom theme layout folder. I would then modify the layout files directly, editing or commenting out content in files like: catalog.xml, page.xml, checkout.xml, etc… I never liked editing these files directly, as I knew that when it came time to upgrade to a newer version of Magento that had upgraded the layout files, I’d have to merge the changes into the new layout files.
I think I may just have a mistunderstanding specifically about layout files but all the same could someone clarify for me which locations (if any) that I might expect to loose data from during an update ( so that hopefully I can avoid using these locations )
You won't loose any data if you have made your edits in custom theme package/folder and not in core code (but in tyour own extensions and code/local code-pool). However as you mentioned yourself it would be wise to merge your theme to be based on new layout files and same goes for template files as well
you can use a diff tool for that that can compare entire folder structures (winmerge, things and so on) and compare your theme and base theme folders
lets clarify things
whatever you change in code do it by making extensions in app/code/local/ or app/code/community
by merging your theme based on = if new version of magento is available and your theme is based on old version layout files and templates eq you have copied layouts and templates and modified them then it is wise to compare all changed files against new ones and apply your changes on top of new layout and template files

Resources