| | | | |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| | |
| Gast
Beiträge: n/a
| Ganz oben auf der Seite die Klasse runterladen und in den Ordner docs |
| | |
| Gast
Beiträge: n/a
| So hab dir mal n kleines Beispiel rausgesucht. IST EIN phpBB-Mod - geht also nicht stand-alone. leg es einfach in den phpBB-Root-Pfad und ruf es auf, dann gehts wohl (vorausgesetzt, das Board selber läuft!). Ausserdem benötigst du LastRSS im include-Verzeichnis... Code: <?php
define('IN_PHPBB', true);
$phpbb_root_path = './'; // <--
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
require_once($phpbb_root_path . 'includes/lastRSS.php');
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
$rss="http://pear.php.net/feeds/latest.rss";
$template->set_filenames(array('body'=>"feedreader_body.tpl"));
$template->assign_vars(array(
'L_FEEDREADER' => $lang['pear_latest']." (".$_GET['feed'].")"
));
$oRSS=&new lastRSS;
$items=$oRSS->get($rss);
foreach($items['items'] as $key=>$value) {
$template->assign_block_vars('rssrow',array(
"L_RSS_TITLE" => $value['title'],
"U_RSS_ITEM" => $value['link'],
"L_RSS_DECSCRIPTION" => $value['description']
));
}
$template->pparse('body');
?>
Code: <html>
<head>
<title>{L_FEEDREADER}</title>
<link rel="stylesheet" href="templates/subSilver/subSilver.css" type="text/css"/>
</head>
<body>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="forumline">
<tr>
<th align="center">{L_FEEDREADER}</th>
</tr>
<tr>
<td class="genmed">
{rssrow.L_RSS_TITLE}
<span class="gensmall">{rssrow.L_RSS_DECSCRIPTION}</span><hr/>
</td>
</tr>
<tr>
<td align="center" class="gensmall"><p style="cursor:hand" onclick="window.close()">Fenster schliessen</p>
</td>
</tr>
</table>
</body>
</html>
//EDIT: Irgendwie hauen die PHP-Tags nicht hin... :wink: Grüße, Marco |
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| XmlHTTPRequests statt Template Engine! Performance? | xueluf | PHP-Fortgeschrittene | 3 | 09.04.2008 11:35 |
| Template Engine vs PHP-Includes | aktionkuba | PHP Tipps 2007 | 16 | 19.06.2007 23:53 |
| Eckige Klammern in Template | nutshell | PHP Tipps 2006 | 9 | 05.06.2006 19:12 |
| template in template einfuegen | tonne | PHP Tipps 2005-2 | 8 | 10.11.2005 22:24 |
| Template Engine die PHP5+E_STRICT überleben | PHP-Fortgeschrittene | 0 | 17.08.2005 10:33 | |
| Template verständniss problem; referenz | PHP Tipps 2005 | 17 | 19.05.2005 06:06 | |
| Template: Verschachteln von foreach | PHP Tipps 2005 | 2 | 12.05.2005 15:37 | |
| Smarty Problem (Template Laden) | JanM | PHP Tipps 2005 | 5 | 11.05.2005 16:36 |
| Php Code als Variable definieren und in Template darstellen | PHP Tipps 2004-2 | 4 | 31.12.2004 16:22 | |
| suche ein bestimmtes template system | PHP Tipps 2004-2 | 2 | 07.11.2004 19:49 | |
| Template Parser | PHP-Fortgeschrittene | 9 | 06.10.2004 23:04 | |
| Inhalte von 2 Servern über 1 Template laufen lassen? | scheibo | PHP Tipps 2004 | 1 | 30.09.2004 01:20 |
| Suche Template Parser - Muss PHP Datein includen können | Schaelle | PHP Tipps 2004 | 0 | 01.07.2004 20:48 |
| [Erledigt] Template Scripting | PHP-Fortgeschrittene | 2 | 04.06.2004 18:34 | |
| Besucher kamen über folgende Suchanfragen bei Google auf diese Seite |
| template engine seiten einfügen, phpbb template engine standalone, phpbb template engine |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.