Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

Simple Image Gallery Plugin Pro - Not XHTML Valid?

  • Royal Bhaktapur
  • Royal Bhaktapur's Avatar Topic Author
  • Offline
  • New Member
More
17 years 10 months ago #3310 by Royal Bhaktapur
Hi Guys,

Just found this site with the beautiful plugin. The functions look really nice. Especially for the greybox plugin and the thumbnails.

Only I'm just building my first joomla site, and want to have everything xhtml valid. However when I check some sites and demo's of this addon, it doesn't seems to be that this is xhtml valid. The w3 validator gives a lot of errors and warnings with the script.
Can anyone clarify / confirm this?

I'm thinking about purchasing this addon to use on my site, but I would like to have it xhtml valid.

Thanks.

Please Log in or Create an account to join the conversation.

More
17 years 10 months ago #3311 by JoomlaWorks
SIG Pro is XHTML valid.  ;)

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Royal Bhaktapur
  • Royal Bhaktapur's Avatar Topic Author
  • Offline
  • New Member
More
17 years 10 months ago #3312 by Royal Bhaktapur
Replied by Royal Bhaktapur on topic Re: Simple Image Gallery Plugin Pro - Not XHTML Valid?
Hmmmm. Seems to be that there is one error in the script. Getting the following error:
Error  Line 131 column 28: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.
<div id="sigid0" class="sig"><div class="sig_cont"><div class="sig_thumb"><a hre
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

Please Log in or Create an account to join the conversation.

More
17 years 10 months ago #3313 by JoomlaWorks
URL please?

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Royal Bhaktapur
  • Royal Bhaktapur's Avatar Topic Author
  • Offline
  • New Member
More
17 years 10 months ago #3314 by Royal Bhaktapur

Please Log in or Create an account to join the conversation.

More
17 years 10 months ago #3315 by JoomlaWorks
mambots/content/plugin_jw_sigpro.php

line 263, change this:
				// if labels don't exist
				if (!$labels) {
					// display nice message?
					if ($displaymessage) {
						if ($popup_engine == 'greybox') {
						$html .= '<b>'.$itemtitle.'</b>'; // remove nice messages for Greybox
						} else {
						$html .= $message.'
<b>'.$itemtitle.'</b>';
						}
					} else {
					$html .= '<b>'.$images[$a].'</b>';
					}
				}
				
				// if labels do exist
				if ($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]!="") {
					$html .= '<b>'.htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])],ENT_QUOTES).'</b>';
				}

to this
				// if labels don't exist
				if (!$labels) {
					// display nice message?
					if ($displaymessage) {
						if ($popup_engine == 'greybox') {
						$html .= $itemtitle; // remove nice messages for Greybox
						} else {
						$html .= $message.'
'.$itemtitle;
						}
					} else {
					$html .= $images[$a];
					}
				}
				
				// if labels do exist
				if ($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]!="") {
					$html .= htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])],ENT_QUOTES);
				}

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Royal Bhaktapur
  • Royal Bhaktapur's Avatar Topic Author
  • Offline
  • New Member
More
17 years 10 months ago #3316 by Royal Bhaktapur
Replied by Royal Bhaktapur on topic Re: Simple Image Gallery Plugin Pro - Not XHTML Valid?
Thanks. I see that you removed the < b > tags to get it xhtml valid. But unfortunately the validator only gives this a warning. The actual error is given by:

Line 129 column 28: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.
<div id="sigid0" class="sig"><div class="sig_cont"><div class="sig_thumb"><a hre

This error shows up at all of the pop up engines. Any idea how to fix this?

Please Log in or Create an account to join the conversation.

More
17 years 10 months ago #3317 by JoomlaWorks
This is a validator error, unless you have the gallery inside some <p> tag. Check your content item for that. Either way, validation is a means of making our site better, not a rule to follow constantly...  ;)

Read the following for some nice insight on the matter:

www.456bereastreet.com/archive/200603/validity_does_not_equal_best_practices/
www.modernlifeisrubbish.co.uk/article/web-standards-dont-matter-as-much-as-you-think

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Royal Bhaktapur
  • Royal Bhaktapur's Avatar Topic Author
  • Offline
  • New Member
More
17 years 10 months ago - 17 years 10 months ago #3318 by Royal Bhaktapur
Replied by Royal Bhaktapur on topic Re: Simple Image Gallery Plugin Pro - Not XHTML Valid?
Thanks for the links and the advice.
Got the page validated now, it was indeed wrapped inside <p> tags. Those tags were automaticly inserted by the wysig editor.

Please Log in or Create an account to join the conversation.

More
17 years 10 months ago #3319 by JoomlaWorks
Look at the editor settings. It should have a p/br option on "Enter". Switch it to br (break).  ;)

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
17 years 7 months ago #3320 by Patrick Frithiof
Replied by Patrick Frithiof on topic Re: Simple Image Gallery Plugin Pro - Not XHTML Valid?
Hi!

I still don't get it.... it does not validate for me, and I receive these errors:
- XML Parsing Error: Unescaped '<' not allowed in attributes values
- XML Parsing Error: attributes construct error
- XML Parsing Error: Couldn't find end of Start Tag a line 185
- XML Parsing Error: Opening and ending tag mismatch: div line 185 and a

What is wrong??

BR, P

Please Log in or Create an account to join the conversation.

More
17 years 7 months ago #3321 by JoomlaWorks
It's because you add the galleries using your WYSIWYG editor. Such editors -unless fine tuned- generate <p> tags everytime you hit "enter" to change line. So, you wrote something like:
This is a cool article

Right below is my gallery
{gallery}photos{/gallery}

and some more text

So, right after "This is a cool article" you hit enter to change lines, correct? This action of yous generated <p> tags. Now, SIG Pro transforms the {gallery}photos{/gallery} tags to a few <div> elements. This is where validation fails.

You are not allowed to have <div> tags inside <p> tags. That's all. But this does not mean the site doesn't work? Validation is something not to be taken into consideration 100% of the times, especially when you deal with complex CMSs like Joomla...  ;)

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
17 years 7 months ago #3322 by Patrick Frithiof
Replied by Patrick Frithiof on topic Re: Simple Image Gallery Plugin Pro - Not XHTML Valid?
Nope!
It has nothing to do with <p> tags at all....

The site works, sure... BUT, it has to validate in order to get accepted by all major search engines! And this is vital to my customer...

So you see, I need a solution and I can't find any better image gallery than SIG Pro  ;). What confuses me is that all other users seems to be able to validate it. Please have a look at this page: www.arizona.se/www2/index.php?option=com_content&task=view&id=17&Itemid=49

Please Log in or Create an account to join the conversation.

More
17 years 7 months ago #3323 by JoomlaWorks
But I'm seeing the code man. You got this...
<p>
  <div>...</div>
</p>

This is what doesn't validate. The order in which elements are enclosed. You can have p elements inside div elements but you can't have div elements inside p elements!

Anyway, the search issue is totally unrealistic. Search engines are smarter than you think, especially google.  ;)

Your galleries are just fine. Validation is required in case you're building a public sector website in Sweden, where they got strict laws and stuff. That's all.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
17 years 7 months ago #3324 by Patrick Frithiof
Replied by Patrick Frithiof on topic Re: Simple Image Gallery Plugin Pro - Not XHTML Valid?
OK, now you've made me curious...
WHERE oh where, do you see that code??  ???

I don't see it in my WYSIWYG editor AND I don't see it when I view the source of the page!
<!-- JW "Simple Image Gallery PRO" Plugin (v1.2) starts here -->
<div id="sigid0" class="sig"><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/gourmetpizzor.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/a64af26e43ef95a5105da28a10d0719e.jpg" /></a></div></div><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/klickbilagan.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/15f56e514ac75dc509a1ee88f4d27f6c.jpg" /></a></div></div><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/klicknotis.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/b6000e124d2f02c0a0a768f7b8f8b3a2.jpg" /></a></div></div><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/mamma_mia.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/862fbafd687080ab9500d6bc199035d9.jpg" /></a></div></div><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/menynr4.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/6ea91a46993a91f4777584ce5273b940.jpg" /></a></div></div><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/nguiden.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/d14cbdcda36da1b3884d90ae22bbf904.jpg" /></a></div></div><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/nu.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/74deb15a4478b26fb4fc4e6659e1c6e1.jpg" /></a></div></div><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/pricardarizona.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/80dd68589d68c794f33529c58442694a.jpg" /></a></div></div><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/svenskdam.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/98075a2cec1bd6c8b3d0b2b450901293.jpg" /></a></div></div><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/veckansnu.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/3c96bb31be8afdb9967f1a355983b0e6.jpg" /></a></div></div>
<div class="sig_clr"></div>
</div>
<!-- JW "Simple Image Gallery PRO" Plugin (v1.2) ends here -->

Please Log in or Create an account to join the conversation.

More
17 years 5 months ago #3325 by Electrophoton
Replied by Electrophoton on topic Re: Simple Image Gallery Plugin Pro - Not XHTML Valid?

Hi!

I still don't get it.... it does not validate for me, and I receive these errors:
- XML Parsing Error: Unescaped '<' not allowed in attributes values
- XML Parsing Error: attributes construct error
- XML Parsing Error: Couldn't find end of Start Tag a line 185
- XML Parsing Error: Opening and ending tag mismatch: div line 185 and a

What is wrong??

BR, P


I think I might have a solution to this problem. The code needs to be changed from using
to &lt;br /&gt; for it to parse XHTML validation.

So in mambots/content/plugin_jw_sigpro.php
// if labels don't exist
if (!$labels) {
	// display nice message?
	if ($displaymessage) {
		if ($popup_engine == 'greybox') {
		$html .= '<b>'.$itemtitle.'</b>'; // remove nice messages for greybox
		} else {
			$html .= $message.'
<b>'.$itemtitle.'</b>';
		}
	} else {
		$html .= '<b>'.$images[$a].'</b>';
	}
}
				
// if labels do exist
if ($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]!="") {
	$html .= '<b>'.htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])],ENT_QUOTES).'</b>';
}

Should be
// if labels don't exist
if (!$labels) {
	// display nice message?
	if ($displaymessage) {
		if ($popup_engine == 'greybox') {
			$html .= '&lt;b&gt;'.$itemtitle.'&lt;/b&gt;'; // remove nice messages for Greybox
		} else {
			$html .= $message.'&lt;br /&gt;&lt;b&gt;'.$itemtitle.'&lt;/b&gt;';
		}
	} else {
		$html .= '&lt;b&gt;'.$images[$a].'&lt;/b&gt;';
	}
}
				
// if labels do exist
if ($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]!="") {
	$html .= '&lt;b&gt;'.htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])],ENT_QUOTES).'&lt;/b&gt;';
}

This worked for me and now the XHTML validates, I hope this helps.

Please Log in or Create an account to join the conversation.

More
17 years 3 months ago #3326 by boatred
Hi,

Followed this thread and fixed some issues but I am getting this when validating.

Line 102, Column 35: document type does not allow element "style" here.
<style type="text/css" media="all">

This relates to
<style type="text/css" media="all">
	.sig_cont .sig_thumb a span.sig_pseudocaption,.sig_cont .sig_thumb a:hover span.sig_pseudocaption {bottom:10px;left:0px;}
	.sig_cont .sig_thumb a span.sig_caption,.sig_cont .sig_thumb a:hover span.sig_caption {bottom:10px;left:0px;}
	</style>
	<![endif]-->

	<!--[if lte IE 6]>
	<style type="text/css" media="all">
	.sig_cont .sig_thumb a span.sig_pseudocaption,.sig_cont .sig_thumb a:hover span.sig_pseudocaption {bottom:5px;left:5px;}
	.sig_cont .sig_thumb a span.sig_caption,.sig_cont .sig_thumb a:hover span.sig_caption {bottom:5px;left:5px;}
	</style>

Line 120, Column 36: document type does not allow element "style" here.
<style type="text/css" media="all">#sigid0.sig .sig_cont {width:210px;height:1

This relates to
$sigdata = '<style type="text/css" media="all">#sigid'.$sigcount.'.sig .sig_cont {width:'.($_width_final_+20).'px;height:'.($_height_final_+20).'px;}</style>';
		echo $sigdata;

I could try and move the styles to the main index.php but wanted to know if this had been seen before.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum