User Login

             | 

VideoFlow List

RANDOM MEDIA

Facebook Fans

VideoFlow on Facebook
Fidsoft
Welcome, Guest
Please Login or Register.    Lost Password?
Style sintax
(1 viewing) 1 Guest
Go to bottom
  • Page:
  • << Start < Prev 1 2 Next > End >>
TOPIC: Style sintax
#231
ankujund (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Style sintax 9 Months, 3 Weeks ago Karma: 0  
document: default.php
Code:


if ($includestyle) {

echo "<style>";

require_once (dirname(__FILE__).DS.'style.css');

echo "</style>";



line:333-339

when i run my site in xhtml and css validator it shows lot of error and warnings.

it says that <style> have to have style sintax like:

<style type="text/css">
but,whan i put that type,my site has an error:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/....../modules/mod_fidsoftrelated4seyret/tmpl/default.php on line 335

what do i need to put as a style sintax?
 
Logged Logged  
 
Last Edit: 2009/11/17 08:08 By ankujund.
  The administrator has disabled public write access.
#233
Fideri (Admin)
Admin
Posts: 279
graph
User Offline Click here to see the profile of this user
Re:Style sintax 9 Months, 3 Weeks ago Karma: 7  
You are right, there is a syntax error. Try using single quotes instead of double quotes like this:
Code:

echo '<style type="text/css">';

I haven't tested this, but it should work.
 
Logged Logged  
  The administrator has disabled public write access.
#235
ankujund (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:Style sintax 9 Months, 3 Weeks ago Karma: 0  
site is working with that code, but it didn't resolve my validator errors that are closely connected with that syle sintax.

please, give me some other solution

example:

Code:

Line 507, Column 34: document type does not allow element "style" here
<style type="text/css">/* CSS for Seyret All-In-One Module and Fidsof
?
The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

 
Logged Logged  
 
Last Edit: 2009/11/18 01:35 By ankujund.
  The administrator has disabled public write access.
#236
Fideri (Admin)
Admin
Posts: 279
graph
User Offline Click here to see the profile of this user
Re:Style sintax 9 Months, 3 Weeks ago Karma: 7  
Basically, I tried to keep the module consistent with the All-In-One Seyret modules. The problem with those modules is that the styles are loaded in the body, when they should be in the head, since they are not inline styles.
That "works" but it does not conform to xhtml standards.
If we move them to the head section, they will not work, because they contain php code which would be executed before the necessary variables are loaded.
The only solution I can think of, short of re-writing the modules, is:
1) Strip the stylesheet of all php code and replace the php variables with the actual values. (e.g., replace something like "padding:<?php echo $paddingvariable;?>" with the actual value of the variable, eg "padding:2px;").
2) Load the stylesheet in the head section.
If you are ready to do this, the files to modify are style.css and default.php in the "tmpl" directory of the module.
For default.php, replace the code:

Code:

if ($includestyle) {
echo "<style>";
require_once (dirname(__FILE__).DS.'style.css');
echo "</style>";
}


with the code:
Code:

if ($includestyle) {
$fdoc = &JFactory::getDocument();
$fcss = JURI::root().'modules/mod_fidsoftrelated4seyret/tmpl/style.css';
$fdoc ->addStyleSheet( $fcss, 'text/css', null, array() );
}



Then edit style.css to remove all php code.

I hope that works for you.
 
Logged Logged  
 
Last Edit: 2009/11/18 21:51 By Fideri.
  The administrator has disabled public write access.
#237
ankujund (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:Style sintax 9 Months, 2 Weeks ago Karma: 0  
i did what you said.it passed css validator but not xhtml.

i think that validator error are connected with seyret component and joomsef component

example:

Code:


Line 510, Column 73: an attribute value must be a literal unless it contains only name characters
…ss="videothumbnailinmodule"><a href=/video-107.php><img class="seyretmoduleim

You have used a character that is not considered a "name character" in an attribute value. Which characters are considered "name characters" varies between the different document types, but a good rule of thumb is that unless the value contains only lower or upper case letters in the range a-z you must put quotation marks around the value. In fact, unless you have extreme file size requirements it is a very very good idea to always put quote marks around your attribute values. It is never wrong to do so, and very often it is absolutely necessary.



do you know how to resolve this?
 
Logged Logged  
  The administrator has disabled public write access.
#238
Fideri (Admin)
Admin
Posts: 279
graph
User Offline Click here to see the profile of this user
Re:Style sintax 9 Months, 2 Weeks ago Karma: 7  
I highly doubt that you will manage to get seyret to validate. With regard to this particular module, we only worked on the data handling and maintained the seyret presentation layer. Moreover, as most of the html is dynamically generated, it is virtually impossible to clean up without going through thousands of lines of code. If you want a site that is xhtml compliant, seyret is certainly not the way to go (I haven't tried the latest version, perhaps it is better).
In the particular case you have quoted, the problem seems to be the lack of quotation marks around
Code:

/video-107.php 

The correct format would be
Code:

<a href="/video-107.php">

It is also possible that the html errors are generated by the SEF component.
 
Logged Logged  
  The administrator has disabled public write access.
Go to top
  • Page:
  • << Start < Prev 1 2 Next > End >>