Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 26, 2012, 12:10:34 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Interested in joining the WebsiteBaker team?
For more Information read
here
or on our
new website
.
155533
Posts in
21713
Topics by
7738
Members
Latest Member:
Pattieardathfe
WebsiteBaker Community Forum
English
Modules
(Moderator:
Argos
)
Getting site to Validate
Pages: [
1
]
Go Down
Author
Topic: Getting site to Validate (Read 664 times)
PJW
Offline
Posts: 31
Getting site to Validate
«
on:
September 20, 2009, 09:57:33 PM »
Hi,
I hope this isn't the first of many posts on this subject, but I have a feeling it may be
I'd like to get my site to validate (
http://validator.w3.org/docs/help.html#validation_basics
), and some of the modules are breaking validation.
One of the problems is (I think) with the News Reader module, generated links look like this in the code:
Quote
<a href="
http://some.domain.com/2009/09/06/posttitle/
" alt="
http://some.domain.com/2009/09/06/posttitle/
" title="
http://some.domain.com/2009/09/06/posttitle/
" target="_blank">PostTitle</a>
It's the alt="" part that the validator doesn't like, and I don't think this is normal in <a> links anyway? I've looked through the newsreader PHP files, and removed some instances where it looked like alt was being inserted, but it hasn't made any difference, so I'm obviously missing something somewhere.
Any help will be much appreciated,
Paul
Logged
Paul
Ruud
WebsiteBaker Org e.V.
Offline
Posts: 2296
Re: Getting site to Validate
«
Reply #1 on:
September 20, 2009, 10:42:00 PM »
Never used the module myself, but..
Looks to me the output is generated in the functions.php.
Line 49 (function
output
) says:
Code: (line 49)
<a href="' . $nf['img_link'] . '" alt="' . $nf['img_title'] . '" title="' . $nf['img_title'] . '" target="_blank"><img src="' . $nf['img_uri'] . '" alt="' . $nf['img_title'] . '" title="' . $nf['img_title'] . '" border="0" /></a>
change that to:
Code: (modified line 49)
<a href="' . $nf['img_link'] . '" title="' . $nf['img_title'] . '" target="_blank"><img src="' . $nf['img_uri'] . '" alt="' . $nf['img_title'] . '" title="' . $nf['img_title'] . '" border="0" /></a>
and it should be over.
Ruud
Logged
Professional WebsiteBaker Solutions
PJW
Offline
Posts: 31
Re: Getting site to Validate
«
Reply #2 on:
September 20, 2009, 11:01:09 PM »
Hi Ruud,
Thanks for your reply. I have already completely removed that line a few days ago, it was generating a link to a non-existent image, and with the css style for images in the template I was getting a border with no image inside!
If you look at the code, it's referring to image (alt="' . $nf['img_title'] . '"), which would be fine, but I'm getting the alt in a normal URL link, which won't validate.
Other references to alt are in newsparser.php and preview.php, but I've taken it out of those files and it hasn't made any difference
Logged
Paul
Ruud
WebsiteBaker Org e.V.
Offline
Posts: 2296
Re: Getting site to Validate
«
Reply #3 on:
September 21, 2009, 08:56:45 AM »
Looking a bit deeper in the module it seems it is really a v0.1 version.
The ouptut expects an image to be present in the feed, but somewhere else in the code it is possible to skip images from loading.
(Note: I did not install the module, just trying to read the code here.)
Maybe someone reading this thread already has a better working version, or maybe someone likes to pick up this module and improve it a bit.
Ruud
Logged
Professional WebsiteBaker Solutions
PJW
Offline
Posts: 31
Re: Getting site to Validate
«
Reply #4 on:
September 21, 2009, 09:24:29 AM »
Hi Ruud,
Thanks again for taking an interest. As I mentioned, the images are not really an issue for me, I overcame that problem.
The issue I'm experiencing is that the code is inserting an alt="" ref
in a normal <a href=""> link
, where it should only have <a href="" title=""></a>.
BFN,
Logged
Paul
Ruud
WebsiteBaker Org e.V.
Offline
Posts: 2296
Re: Getting site to Validate
«
Reply #5 on:
September 21, 2009, 09:38:38 AM »
It seems that is done in the newsparser.php at line 414:
The "content" part is pre-built in there.
Code:
$this->output .= "\t\t" . '<li><a href="' . $this->item["link"] . '" alt="' . $this->item["link"] . '" title="' . $this->item["link"] . '" target="_blank">' . $this->item["title"] . '</a>';
Replace that one with:
Code:
$this->output .= "\t\t" . '<li><a href="' . $this->item["link"] . '" title="' . $this->item["link"] . '" target="_blank">' . $this->item["title"] . '</a>';
Ruud
Logged
Professional WebsiteBaker Solutions
PJW
Offline
Posts: 31
Re: Getting site to Validate
«
Reply #6 on:
September 21, 2009, 01:15:15 PM »
Ruud,
Thanks. As I posted before, I had already found that, and done as you suggest:
Quote from: PJW on September 20, 2009, 11:01:09 PM
newsparser.php and preview.php, but I've taken it out of those files and it hasn't made any difference
It didn't make any difference last night, BUT, I think it might be a caching issue. I've just gone back to the site I was working on last night, and the alt reference is gone. Unfortunately I tried so many things last night I can't be certain which one has done it, however, when I was working on it then, nothing appeared to make any difference, and now it has.
I've just edited newsparser.php and uploaded it to a different site with the same configuration as the first site, and again, there's no difference (even if I forcibly refresh the page, clear cache. restart browser, try a different browser etc.).
However the fact that it is gone from the first site gives me hope that perhaps this is a server cache issue, so I'll try again later and/or through a different connection and report back my findings!
Logged
Paul
Ruud
WebsiteBaker Org e.V.
Offline
Posts: 2296
Re: Getting site to Validate
«
Reply #7 on:
September 21, 2009, 02:08:30 PM »
Ahh.. yes that will be the case.
The processed data is stored so the server will not need to call the XML feed on every pageload.
If you set the update_cycle (DE->Update-Turnus) to a low value (seconds) it should reload the data immediately.
The default value is set to 86400, meaning only once per day the content is refreshed.
Seems to me a bit high value anyway.
Ruud
Logged
Professional WebsiteBaker Solutions
PJW
Offline
Posts: 31
Re: Getting site to Validate
«
Reply #8 on:
September 21, 2009, 05:22:35 PM »
Ruud,
Exactly so. I changed the time to 60s, just to test this out and everything worked as expected.
Thanks for your help tracking this down
About to post about the next validation issue
Logged
Paul
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...