WebsiteBaker Support (2.12.x) > Hilfe & Support (deutsch)

RSS und OFA

<< < (15/23) > >>

dbs:
Darf ich fragen was in der include.php oben steht?

--- Code: ---// Function to display featured events of the events module (invoke function from template or code page)
if (!function_exists('oneforall_anyitems')) {
    function oneforall_anyitems(...
--- End code ---

astricia:
Da steht dies:

--- Code: ---// Function to display featured events of the events module (invoke function from template or code page)
if (!function_exists('rss')) {
function rss($section_id, $num_of_items = 100, $order = true) {
--- End code ---

astricia:
Und die angemäkelte Zeile 90 der include.php ist die folgende:


--- Code: ---if ($query_fields->numRows() > 0) {
--- End code ---

Die sieht in anderen OFA-Anyitems-Modulen genauso aus, daran habe ich auch nichts verändert.

dbs:
OK, neuer Versuch.
Im Anhang mein Snippet ofa_rss.zip (wie oneforall_anynews) und
ofa_rss.php (kommt in oneforall Ordner)
Aufruf in der index:

--- Code: ---<link rel="alternate" type="application/rss+xml" title="OFA_RSS-Feed Test" href="<?php echo WB_URL; ?>/modules/oneforall/ofa_rss.php" />
--- End code ---

page_id und section_id wieder in der ofa_rss.php anpassen oder in der URL mitsenden.

In dem Snippet wird der loop nicht in der include erstellt, sondern in extra tempates. Du kannst das also anpassen in ofa_rss/templates/rss.
Ein anderes Templates kannst du nutzen, wenn du in der ofa_rss.php unten das snippet anders aufrufst:

--- Code: ---<?php 
        // Item loop
        ofa_rss($section_id, $num_of_items=5, $order = 'ASC', $template = 'anderes_templates-statt-rss'); 
--- End code ---

astricia:
Getestet. Bringt keinen Unterschied. Siehe hier:
http://neu.management-kommunikation.de/modules/topnews/ofa_rss.php

Das "fehlende Wurzelelement" deutet darauf hin, dass das <?xml ... ?> fehlt?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version