You are not logged in.

Controlpanel

Statistic

  • Members: 13113
  • Threads: 18186
  • Postings: 119693 (ø 46.07/day)
  • Greetings to our newest member: mislonly

w2d Premium-Support

Die Experten für web to date / shop to date

Facebook

Andybln

Trainee

  • "Andybln" is male
  • "Andybln" started this thread

Posts: 59

Location: Grünheide

  • Send private message

1

Friday, January 14th 2011, 8:23am

RSS Reader nicht valid

Ich habe die

Validierungs-Tipps für w2d-Templates + valide w2d-Designs.



befolgt und schon mal ca 400 Fehler entfernen können.

Nun beruhen aber scheinbar etliche Fehler auch auf den
RSS Reader
.
den ich auf meiner Startseite habe - wie kann ich diese Fehler den beheben ?

Danke für Eure Tipps

viele Grüße
Andreas

This post has been edited 2 times, last edit by "Andybln" (Jan 15th 2011, 2:29pm)


cojo_1008

Super-Moderator

  • "cojo_1008" is female

Posts: 3,609

Location: Berlin-Kaulsdorf

Occupation: Freiberuflerin

web/shop to date Version: shop to date 5 - shop to date 8

  • Send private message

2

Friday, January 14th 2011, 8:37am

im plugins-Ordner und dort in der Datei W2DPluginRSSReader.inc...
Gruß Conny

Andybln

Trainee

  • "Andybln" is male
  • "Andybln" started this thread

Posts: 59

Location: Grünheide

  • Send private message

3

Friday, January 14th 2011, 12:22pm

Danke Conny erst mal bis dahin ;-)
meine Frage war nur nicht unbedingt "wo ich das Reader Plugin finde "

sondern wie ich den Fehler dort behebe?

Ist schon komisch das man ein Programm für viel Geld erwirbt
bei dem man die Fehler auch noch bearbeiten muß !




viele Grüße
Andreas

cojo_1008

Super-Moderator

  • "cojo_1008" is female

Posts: 3,609

Location: Berlin-Kaulsdorf

Occupation: Freiberuflerin

web/shop to date Version: shop to date 5 - shop to date 8

  • Send private message

4

Friday, January 14th 2011, 12:28pm

du schaust dir die Fehler im W3C-Validator genua an und findest z.B. border=0 - und dann korrigierst du das in der besagten Datei - wenn dann heißt es border="0"...
Und so merzt du nach und nach alle Fehler aus ;)
Gruß Conny

Andybln

Trainee

  • "Andybln" is male
  • "Andybln" started this thread

Posts: 59

Location: Grünheide

  • Send private message

5

Friday, January 14th 2011, 12:35pm

WOW - Danke Conny für die schnelle Hilfe
dann muß ich mich da wohl mal ranmachen ;-)



Dir noch einen schönen Tag

Andybln

Trainee

  • "Andybln" is male
  • "Andybln" started this thread

Posts: 59

Location: Grünheide

  • Send private message

6

Saturday, January 15th 2011, 2:29pm

Ich habe einige Fehler entfernen können
jedoch habe ich diese Fehler noch - wie muss ich den entfernen ?

Viele Grüße
Andreas
Andybln has attached the following file:
  • Unbenannt.JPG (71.35 kB - 7 times downloaded - latest: Feb 3rd 2011, 12:37pm)

cojo_1008

Super-Moderator

  • "cojo_1008" is female

Posts: 3,609

Location: Berlin-Kaulsdorf

Occupation: Freiberuflerin

web/shop to date Version: shop to date 5 - shop to date 8

  • Send private message

7

Saturday, January 15th 2011, 2:58pm

du musst das &-Zeichen maskieren: statt & schreibst du &
Gruß Conny

Andybln

Trainee

  • "Andybln" is male
  • "Andybln" started this thread

Posts: 59

Location: Grünheide

  • Send private message

8

Saturday, January 15th 2011, 3:09pm

Da bin ich mir sehr unsicher Wo ich das im Code machen muß !?
hier der Code - an welcher stelle muß ich da was verändern ?

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<?php

// Klasse zum Lesen von RSS-Feeds
// (C) 2004 MultiMueller Softwareentwicklung e.K.
// Tom Mueller
// www.multimueller.de
// info@multimueller.de

error_reporting(E_ERROR | E_PARSE);

class RSSFeed {
	var $title;								// Alle Titel
	var $link;								// Alle Links
	var $description;						// Alle Beschreibungen	
	var $newscount;							// Anzahl der Elemente
	var $xml;								// Plaintext XML Dokument
	var $trans_tbl;							// HTML-Konvert-Tabelle
	
	var $feedurl="";						// Feed-URL
	var $cachefile="cache.txt";				// Lokaler Cache
	var $bulletfile;						// Bullet-Grafik
	
	var $expire=300;						// Refresh-Zeit in Sekunden
	var $maxnewscount=-1;					// Maximale Anzahl von Einträgen
	var $footer="";							// Text unterhalb des Feeds
	var $errortext="Error accessing Feed";	// Fehlermeldung
	var $showdescription=1;					// Description anzeigen
	var $sidebarmode=0;						// Sidebar-Modus
	
	function RSSFeed() {
		// Klassen-Konstruktor
	
		// Die unhtmlentities-Funktion vorbereiten
		$this->trans_tbl = get_html_translation_table(HTML_ENTITIES);
	   	$this->trans_tbl = array_flip($this->trans_tbl);
	}
	
	function file_is_uptodate() {
		// Datei-Zeit checken

		if (file_exists($this->cachefile)) {
			if (time()-filemtime($this->cachefile)<$this->expire) {
				return TRUE;
			}
		} 
		return FALSE;
	}
	
	function read_file() {
		// Cache-File lesen
		
		unset($this->xml);
		$handle = fopen($this->cachefile, "r");
		if ($handle) {
			flock($handle, LOCK_SH);
			$this->xml = fread($handle, filesize($this->cachefile));
			flock($handle, LOCK_UN);
			return TRUE;
		} else {
			return FALSE;
		}
	}
	
	function write_file() {
		// Cache-File schreiben
		
		$handle = fopen($this->cachefile, "w+");
		flock($handle, LOCK_EX);
		fwrite($handle, $this->xml);
		flock($handle, LOCK_UN);
		fclose($handle);
	}
	
	function read_url() {
		// URL lesen
		
		unset ($this->xml);
		
		$handle = fopen($this->feedurl, 'r');
		if ($handle) {
			while (!feof($handle)) {
				$this->xml .= fread($handle, 128);
			}
			fclose($handle);
			return TRUE;
		} else {
			return FALSE;
		}
	}

	function find_tag($string, $tag) {
		// Tag finden
		
		$tmpval = array();
		$preg = "|<$tag.*?>(.*?)</$tag>|s";

		preg_match_all($preg, $string, $tags);
		foreach ($tags[1] as $tmpcont){
			$tmpval[] = $tmpcont;
		}
		return $tmpval;
	}
	
	function unhtmlentities($string) {
		// entfernt HTML-Entitites	
		
	   	return strtr($string, $this->trans_tbl);
	}
	
	function remove_cdata($text,$removeentities) {
		// Die CDATA-Tags entfernen
	
		$text=str_replace("<![CDATA[","",$text);
		$text=str_replace("]]>","",$text);
		if ($removeentities) {
			$text=$this->unhtmlentities($text);
		}
		return $text;
	}

	function parse_feed() {	
		// Den Feed interpretieren

		// Alles auf Null
		$this->newscount=0;
		unset($this->title);
		unset($this->link);
		unset($this->description);
		
		// Ist es ein UTF-8-Feed?		
		$utf=preg_match('|<\?xml.*?encoding\s*?=\s*?"\s*?UTF-8\s*?".*?>|i',$this->xml);
		
		// Alle Items finden
		$items = $this->find_tag($this->xml, 'item');
		
		// Die Items durchlaufen
		foreach ($items as $item) {
			$this->newscount++;

			// Titel, Link und Beschreibung extrahieren
			$title=$this->find_tag($item, 'title');
			$link=$this->find_tag($item, 'link');
			$description=$this->find_tag($item, 'description');
			
			// In Array schreiben und ggf. UFT-8 transformieren
			if ($utf) {
				$this->title[$this->newscount] = $this->remove_cdata(utf8_decode($title[0]),true);
			} else {
				$this->title[$this->newscount] = $this->remove_cdata($title[0],true);
			}
			if ($utf) {
				$this->description[$this->newscount] = $this->remove_cdata(utf8_decode($description[0]),true);
			} else {
				$this->description[$this->newscount] = $this->remove_cdata($description[0],true);
			}
			$this->link[$this->newscount] = $this->remove_cdata($link[0],false);
			
			// Hat da einer den Titel vergessen?
			if ($this->title[$this->newscount]=="") {
				$this->title[$this->newscount]=$this->link[$this->newscount];
			}
		}
	}

	function print_html() {
		// Als HTML ausgeben
		
		if ($this->sidebarmode) {
			for ($i=1;(($i<=$this->newscount) && (($i<=$this->maxnewscount) || ($this->maxnewscount<=0)));$i++) {
				echo('<p>');
				echo('<a target="_blank" href="'.$this->link[$i].'">'.$this->title[$i].'</a>');
				echo('</p>');
				if ($this->description[$i] && $this->showdescription) {
					echo ('<p>'.$this->description[$i].'<br></p>');
				}
			}
			if ($this->footer) {
				echo('<p align="right">'.$this->footer.'</p>');
			}
		} else {
			echo('<table width="100%" border="0" cellpadding="0" cellspacing="0">');
			for ($i=1;(($i<=$this->newscount) && (($i<=$this->maxnewscount) || ($this->maxnewscount<=0)));$i++) {
				echo('<tr>');
				echo('<td><img src="'.$this->bulletfile.'" border="0" alt=""></td>');
				echo('<td width="100%">');
				echo('<a class="s2d" target="_blank" href="'.$this->link[$i].'">'.$this->title[$i].'</a>');
				echo('</td></tr>');
				if ($this->description[$i] && $this->showdescription) {
					echo ('<tr><td></td><td>');
					echo ('<p>'.$this->description[$i].'<br></p>');
					echo ('</td></tr>');
				}
			}
			if ($this->footer) {
				echo('<tr><td></td><td><p align="right">'.$this->footer.'</p></td></tr>');
			}
			echo('</table>');
		}
	}
	
	function process_feed() {
		// All in one: Den Feed lesen, cachen, ausgeben
		
		$valid=FALSE;
			
		if ($this->file_is_uptodate()) {
			// Cache war nach aktuell
			$valid=($this->read_file());
		} else {
			// Nicht mehr aktuell
			if ($this->read_url()) {
				// URL lesen und schreiben
				$this->write_file();
				$valid=TRUE;
			}
		}
		
		if ($valid) {
			// Wenn alles o.k. ausgeben
			$this->parse_feed();
			$this->print_html();
		} else {
			echo ("<p>".$this->errortext."</p>");
		}
	}
}
?>

Andybln

Trainee

  • "Andybln" is male
  • "Andybln" started this thread

Posts: 59

Location: Grünheide

  • Send private message

9

Thursday, January 20th 2011, 9:47am

Der Fehler ( Warnung besteht auf der Seite mit eingebundenem RSS Reader ) leider immer noch
hat jemand eine Konkrete Idee wo ich im Plugin den Fehler bereinigen kann ?


Quoted

Cause:
The ampersand ("&") is a special character in HTML. It marks the beginning of a entity, like "&nbsp" for a non-breaking space.
In XHTML, a entity must also end with a semicolon (";"), as in "&nbsp;"
Because of this, any time a literal ampersand appears in a document, it must be written as the character entity "&amp;". Ampersands commonly appear in the query string of a URL, and must be expressed as an entity in that context.


viele Grüße
Andreas

Posts: 5,057

web/shop to date Version: 5-8.0

  • Send private message

10

Thursday, January 20th 2011, 2:41pm

Wird der Reader per Link eingebunden? Wenn ja, schaue Dir den Link genau an. Wenn hier & auftauchen, ist dies so zu ersetzen &amp;
--------------
Leider habe ich die Erfahrung gemacht, das w2d intern das nicht umsetzt und ein valider Link nur per HTML-Absatz Erfolg hat.

Andybln

Trainee

  • "Andybln" is male
  • "Andybln" started this thread

Posts: 59

Location: Grünheide

  • Send private message

11

Thursday, January 20th 2011, 3:32pm

Rss ist mit dem RSS Plugin eingefügt!

Posts: 5,057

web/shop to date Version: 5-8.0

  • Send private message

12

Thursday, January 20th 2011, 3:34pm

Das weiß ich auch. Ich meinte, ob dort dann ein Link zum Angebot in den Einstellungen eingebracht wird.