Are include files necessary in an html website? - include

Are include files, such as server side include SSI, files necessary in an html website?
I recently tried to host my simple html website through GoDaddy. I used Dreamweaver CC to upload my files and encountered a problem. Some of my pages were not displaying images or css. I checked to see if the images and css were on the server and in the correct places and they were. Confused, I called GoDaddy's customer service, waited 35 minutes, and talked to one of their customer service reps. He basically told me that it may be my code and that I need 'include' files.
I have looked all over the web and I'm still not entirely sure what an include file is... I got from my research that they are snips of code that call images/files without having to write out the same thing on every page. If I have copied and pasted the same thing on every page, why then would I need an 'include' file? I previously had my website hosted through Hostmonster, still do now, and I have never had to alter my code...
I am still new to the world of coding, so please be kind. If anyone knows of a good resource to help explain the use of 'include' files please post it or correct me if I am wrong. Thank you.

I think the GoDaddy "support" guy was talking about the include operation in your html files that you need to fetch your css files.
Presumably your web pages work correctly when you display them locally on your development machine -- the machine where you run Dreamweaver. If not, fix them. They'll probably need css files in some subdirectory (or maybe in the same directory as the html) and image files in some other subdirectory.
Open up your page, on the server, in a browser, and then do View Source. Look for your css file download commands ... which may look something like this ... in your source.
<link href="styles.css" rel="stylesheet" type="text/css" />
Are the links (the href items) what you thought they should be? Sometimes you'll find that they are absolute links like
file:\\d\myfiles\website\dreamweaver\some_other_junk\styles\foo.css
If they are you need to change them to
styles/foo.css
The same goes for images.
And, no, you don't need server-side include files to put up a working static web site.

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.

Magento javascripts where are they loading from?

I'm working on Magento installation that is causing me frustration.
I CAN find what seems to be the correct page.xml file loading the theme's Javascript (i.e prototype, scriptaculous, etc) in the header, but editing this file and removing scripts does not do ANYTHING for me. When I try and remove/add any new scripts, nothing happens.
Maybe a cache issue? But I have deleted all files from the cache folder. I also tried to find the "Cache Management" menu in Admin, but there is not one there.
I'm 99% confident that I have looked in all of the folders that would call all Javascript.
I am new to Magento, so maybe I've missed something completely.
Any suggestions on where I could find where the basic scripts would be loading from?
I do not know if I got it right. But what you want to know is the directory where the file .js is located, correct?
Try looking in: yourdomain/skin/frontend/yourtheme/default/js/
or: yourdomain/skin/frontend/default/yourtheme/js/
Page.xml is the correct file you need to modify. If not a caching issue, the only other thing I can think of is you have a theme installed but trying to modify the default(base) page.xml.

Joomla and JomSocial Error

I'm having problem with a client site. I'm not good with Joomla (we mostly do Wordpress), but one of my long-time clients asked me to move a site from another developer that never finished it, so I obliged. The problem is, everything is working great except for the Community page:
http://gettingripped.com/index.php/community
The only errors I'm finding are with the Facebook integration (which they told me the previous dev never finished/fixed). I'm really confused here...anyone out there have any ideas? It seems instead of showing the proper titles that Com_community_somethingElseHere is replacing everything.
Thank you guys in advance for your help!
Seems something is wrong with the en-GB.com_community.ini file.
Location: gettingripped.com/language/en-GB/en-GB.com_community.ini
I could not find the file in the above location!!!
Put this file in that folder and it will work!!!
If you can't find the file to put in the folder, create your own and place it there.. how? Well, google for this string as it is (including double quotes) "en-GB.com_community.ini" and open the first couple of results.
Then copy paste the displayed file content into your own ini file (name it en-GB.com_community.ini) and place it in your en-GB folder.
Load the page and it will show up as it should!

Javascript location in Magento

Im trying to locate certain javascript code in the codebase with no luck. This code appears in the head of every page. Note that it isnt a link to a file but certain code embedded in the head. I have tried the following ways but no luck
local.xml
head.phtml
page.phtml and all page templates
page.xml
Text search in codebase with keyword and
keyword '{variablename}'
Database search keyword '{variablename}'
but no results so far
Have a missed something? Any help would be really appreciated.
Thanks,
Loveleen
Assuming that the page templates still generally reflect the native Magento structure, if it's in the <head> of the page, then it can only be coming from one of three places:
The page template (1column.phtml, 3columns.phtml, etc.).
The <head> include file head.phtml.
An include of one of the first two.
I know you said you already looked in both of those places, but you can help narrow down the source by comparing what you can see in those locations with what you see in the generated page source. Is the analytics code you're trying to locate before or after something you can see in those template files?
Also make sure that you're looking in the template files of the correct theme.
Ok got it.. it was under System>Config>Design>Misc Scripts

AbcPdf - document not applying CSS

This may be more of a tech support issue, but I'm wondering if any other developers have come across this:
I'm using Abcpdf in my ASP.NET code to generate a PDF from HTML. It works fine, but one user is generating PDFs that don't have the CSS applied (IE8, Adobe Acrobat latest version - same as everyone else). Since this is the only user complaining, I'm sure it's a local setting, but I can't figure out what would prevent the css from loading - a browser setting? An Acrobat setting?
Does anyone have any suggestions?
Perhaps an issue with different versions of Acrobat reader? I'd look into this.
This doesn't make a lot of sense because AbcPdf uses service side logic to create the PDF based on what methods you are using to create the document (ex. AddImageUrl vs drawing out the document manually, etc.).
For what it's worth the staff at WebSuperGoo (the vendor of AbcPdf) is great with replying to support questions such as this. I've run across a few edge cases with their product that they've always followed up with workarounds or alternatives to address in a timely manner.
make sure you have media="print" for the CSS style sheet! Just spent ages looking at this pulling my hair out and was about to email WebSuperGoo then that thought came to me.
just about to back out all the changes I've made to my code and test again but it looks like with EngineType.Gecko it needs to be media="print" where as with EngineType.MSHtml it can be media="screen".....
very odd but hope that helps someone!
Make sure that the CSS is an absolute URL rather than relative, or add a base tag to the header of the HTML
For example, rather than
<style type="text/css" href="/styles/somecss.css" rel="stylesheet" />
use
<style type="text/css" href="http://myserver.com/styles/somecss.css" rel="stylesheet" />
Also if you site is SSL or authenticated then you will have to either make the area with the stylesheet un-authenticated, or, set the password and username attributes of the PDF object so that ABCPdf can authenticate
You can try the following in version 9
doc.HtmlOptions.PageLoadMethod =
PageLoadMethodType.WebBrowserNavigate;
I am using Version 10 of ABCpdf and I found that the style sheet path should be absolute instead of relative.
I changed the stylesheet path from "C:\MyProject\Resources\Styles.css" to "http:\www.MyDomain.com\Resources\Styles.css" and it worked.
Although, version 6 seems to be working with relative paths. I didnot check it with other versions
As per WebSuperGoo support:
(Query # : 6.17)
HTML does not exist within a file and so it does not have a location.
External stylesheets and images are often referenced via relative URLs. Because the HTML has no location it is impossible to resolve
these relative references.
So you need to provide your stylesheet and image links as absolute references. Or you may be able to use the HTML BASE element to specify
an appropriate base location. Or you can save your HTML to file in an
appropriate location and then use AddImageUrl.
Have you tried;
theDoc.HtmlOptions.DoMarkup = true;
This forces the engine to process the HTML before rendering.

Resources