Please help, Template original to XH

About the template and stylesheet - and changing the menu
flukey92
Posts: 89
Joined: Thu Aug 11, 2011 9:39 am
Location: Bedford, UK
Contact:

Please help, Template original to XH

Post by flukey92 » Thu Aug 11, 2011 9:57 am

Hi all i am new to the forum and my company and i have just started taking on the website, the 1st thing i would like to do is move over to cmsimple_xh, from what ive read this cms system is much preferred, my only trouble is that the way the previous designer has done our template for some reason it is not displaying properly in xh, below are the images

[ external image ]
[ external image ]

please ask if you need anything else, and is it worth moving over to xh? anyone got any experience on the matter?

best regards

-flukey
RJS Electronics Ltd - LED Push Switches, LCD Programmable Keys, Anti Vandal Push Buttons, Relays, Custom Cable Assemblies
Visit my Web Hosting / Design website here - www.flukedesigns.co.uk

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Please help, Template original to XH

Post by cmb » Thu Aug 11, 2011 10:33 am

Hello flukey,

IMO it is a very good idea to switch to CMSimple_XH. It is under active development and has several improvements over the classic CMSimple. All versions from 1.2 on are UTF-8 encoded by default.

I'm not quite sure about the problems regarding your template. Is the upper screenshot taken with CMSimple_XH and the lower one with CMSimple, both showing the same page? That's quite strange. AFAIK the only differences using templates for CMSimple with _XH are some strange characters because of the somewhat incompatible character encoding.

I already had a first look on the website, and found that it's using xhtml (without a doctype declaration). You should check the configuration of xhtml_endtags and xhtml_amp: both should be set to 'true'. And you might test your template with the default content delivered with CMSimple_XH, and your content with it's default template.

I'm gladly willing to help, but to do so, I need more detailed information, what is wrong.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

flukey92
Posts: 89
Joined: Thu Aug 11, 2011 9:39 am
Location: Bedford, UK
Contact:

Re: Please help, Template original to XH

Post by flukey92 » Thu Aug 11, 2011 11:28 am

Thankyou Cristoph!

Yes correct, upper with xh, lower with cmsimple, exact same page. :/
maybe theres strange characters in my template code? would that be possible?
ive changed the xhtml_endtags and xhtml_amp to true no change there :(

Default template with default content : working
Default template with my content : working

My template with default content : not working
My template with my content : not working
definitely a template error there just not sure why :(

would you like me to post my template .html ?

Many Thanks

Flukey
RJS Electronics Ltd - LED Push Switches, LCD Programmable Keys, Anti Vandal Push Buttons, Relays, Custom Cable Assemblies
Visit my Web Hosting / Design website here - www.flukedesigns.co.uk

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Please help, Template original to XH

Post by cmb » Thu Aug 11, 2011 11:34 am

Hello flukey,

thanks for the information -- should be helpful. Indeed it seems that there's something wrong with your template, so it might be best if you try to post it (formatted as code, please). It might be too large to be posted here; if this is the case, you might make it available for download on your server and post the link.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: Please help, Template original to XH

Post by Gert » Thu Aug 11, 2011 11:58 am

Hi Christoph,

here is the template.htm: http://www.rjselectronics.com/templates ... mplate.htm - just go to sourcecode view of the browser ;)

1. The template.htm is utf-8 encoded - THAT should not be the problem

2. The template.htm has no doctype definition

3. The template.htm has a deep nested and not well structured table structure

Seems, there is a lot of basic work to do ... for example:

Code: Select all

	<table border="0" width="100%" cellspacing="0" cellpadding="0">
	<tr>
	<td valign="top" align="right" class="searchbox">
	</td>
	</tr>
	</td>
	</tr>
	</td>
	<td width="36"> </td>
	</tr>
	</table>
Gert Ebersbach | CMSimple | Templates - Plugins - Services

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Please help, Template original to XH

Post by cmb » Thu Aug 11, 2011 12:36 pm

Hello Gert, hello flukey,
Gert wrote: here is the template.htm
:roll:

Indeed the doctype is missing, but I'm not sure, if the template is UTF-8 encoded. It says:

Code: Select all

<meta charset="UTF-8"> 
what IMO should be

Code: Select all

<meta http-equiv="content-type" content="text/html;charset=utf-8"> 
I've checked the start page with validator.w3.org: it says Encoding: iso-8859-1 (and found 135 errors BTW). And see the copyright sign on line 3.

But anyway, that's not the problem. I've just tested the template on my local machine, with XHdebug-mode enabled, and it said:
Fatal error: Call to undefined function pm_cloud() in C:\xampp\htdocs\CMSimple_XH_1.4\templates\rjs\template.htm on line 162
So the major problem is, that the pm_cloud plugin was not installed on the new XH-installation. :!:

@flukey: you might try to change line 162 in template.htm from:

Code: Select all

            <tr><td valign="top" class="menu"><?=newsbox(leftbottom)?><?php echo pm_cloud();?></td></tr></td> 
to

Code: Select all

            <tr><td valign="top" class="menu"><?=newsbox(leftbottom)?><?php /*echo pm_cloud();*/?></td></tr></td> 
Basically it should work this way. Then the plugin should be converted to utf-8, installed in the CMSimple_XH plugin folder, the template changed back, and it should work.

To rewrite the template to produce valid xhtml output will be quite some more work, as Gert already has written.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: Please help, Template original to XH

Post by Gert » Thu Aug 11, 2011 12:56 pm

cmb wrote:but I'm not sure, if the template is UTF-8 encoded.
Go to http://www.rjselectronics.com/templates ... mplate.htm => Ansicht => Zeichencodierung - the template.htm is utf-8 encoded.

Go to http://www.rjselectronics.com/ => Ansicht => Zeichencodierung - The CMSimple site is ANSI enoded, of course, it's CMSimple 3.2.

He has following code in the template.htm:

Code: Select all

<meta charset="UTF-8">
And CMSimple 3.2 sets:

Code: Select all

<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
Both is in the sourcecode of the site ...

Of course, the plugin call in the template and the non-installed plugin is the real reason for the problem.
Gert Ebersbach | CMSimple | Templates - Plugins - Services

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Please help, Template original to XH

Post by cmb » Thu Aug 11, 2011 1:03 pm

Hello Gert, hello flukey,

you're right. The template is UTF-8 encoded.

Code: Select all

<meta charset="UTF-8">
should be removed, as
validator.w3.org wrote: Line 14, Column 386: there is no attribute "charset"
…="./plugins/pm_cloud/css/stylesheet.css" type="text/css"><meta charset="UTF-8">
Christoph
Christoph M. Becker – Plugins for CMSimple_XH

flukey92
Posts: 89
Joined: Thu Aug 11, 2011 9:39 am
Location: Bedford, UK
Contact:

Re: Please help, Template original to XH

Post by flukey92 » Fri Aug 12, 2011 8:54 am

Hello Gert & Christoph,

Many thanks for your help, simply removing the " "<?php echo pm_cloud();?> " made my template work fine, now what i need to work on is why am i getting these 132 errors + 7 warnings on the validation, im not really all that techy when it comes to websites didnt know if you could help me further,

currently i am going through the list of errors and warnings and seeing what i can do to correct it myself :)

here is the validator link
http://validator.w3.org/check?uri=http% ... ne&group=0

here is the link to my template html
http://base.rjselectronics.com/SITE/tem ... mplate.htm

in regards to the "basic" work to do, where do i start?? i see the code you pasted from my template source, but im not sure what exactly to do with it :(

in regards to gert saying there will be quite some work, do you think it will be worth it? personally i quite like the template, but what do you guys think about it and the layout of the website?
The company i work for turnover £2,000,000 a year and im not sure if we should get someone else into do the work, bearing in mind this has just been revamped prior to me joining :)

Many thanks once again for your help, dont suppose you guys could possibly help some more?? :D

Today i will go through the list of errors and see what i can do but any help pointing me in the right direction will be most appreciated :D

thanks

-flukey
RJS Electronics Ltd - LED Push Switches, LCD Programmable Keys, Anti Vandal Push Buttons, Relays, Custom Cable Assemblies
Visit my Web Hosting / Design website here - www.flukedesigns.co.uk

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: Please help, Template original to XH

Post by Gert » Fri Aug 12, 2011 9:52 am

Hi flukey,

the first step is done: You have decided to use CMSimple_XH ;)

The next step is the template.
flukey92 wrote:Today i will go through the list of errors and see what i can do but any help pointing me in the right direction will be most appreciated
If you want to do it yourself, you have to learn html and css. That's a long way and not so easy.

Another way were to take professional help, that's easy, but not for free. Here you will find template designers:

http://www.cmsimpleforum.com/viewtopic.php?f=13&t=1744

Setup a fresh installation of CMSimple_XH and download some templates. Then test them (with the original valid contents of the CMSimple_XH download), if they are valide. If you like the style of the designer and the templates are valide, contact the Designer to reproduce your template design.

The next step is to insert your contents, look for validation errors and correct them,

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services

Post Reply