Welcome to Geeklog, Anonymous Saturday, August 31 2024 @ 11:05 pm EDT
Geeklog Forums
1 block for all news in front page
Status: offline
samstone
Forum User
Full Member
Registered: 09/29/02
Posts: 820
Here it is.
Create an RDF block of your own site's RDF, and don't display it. Note the block id number (BID) in the address line.
Creat a static page with the following codes:
The # sign should be replace with the BID. And check the PHP box.
Set that static page to be at the top of the front page and you get what you want, if I understand you well.
You can then customize your rdf they way you want it to show on that static center block.
Hope this help!
Sam
Create an RDF block of your own site's RDF, and don't display it. Note the block id number (BID) in the address line.
Creat a static page with the following codes:
Text Formatted Code
$return = static_rdf('#'); return $return; The # sign should be replace with the BID. And check the PHP box.
Set that static page to be at the top of the front page and you get what you want, if I understand you well.
You can then customize your rdf they way you want it to show on that static center block.
Hope this help!
Sam
10
12
Quote
Status: offline
samstone
Forum User
Full Member
Registered: 09/29/02
Posts: 820
I tried that but all I get where "eval code" errors. Did you tried it with the new content syndication?
I forgot, you need these codes in the lib-custom.php also
Text Formatted Code
// Custom RDF / RSS feed on static page
function static_rdf($blockid = false) {
$error = array();
if ($blockid != false && is_numeric($blockid) && $blockid != "") {
global $_TABLES;
if (DB_getItem( $_TABLES['blocks'], 'type', "bid = '{$blockid}'" ) == 'portal') {
$sql = "SELECT UNIX_TIMESTAMP(rdfupdated) as date, content, rdfurl FROM {$_TABLES['blocks']} WHERE bid = '" . $blockid . "'";
$result = DB_query( $sql );
$A = DB_fetchArray( $result );
if ( COM_rdfCheck($blockid, $A['rdfurl'], $A['date'] ))
{
$A['content'] = DB_getItem( $_TABLES['blocks'], 'content',
"bid = '{$blockid}'" );
}
$return = $A['content'];
} else {
$error[] = 'Block is not of Portal Type';
}
} else {
$error[] = 'Is not a valid BlockID';
}
if (count($error) > 0) {
$return = "Something is wrong with the blockid that you entered. Fix this. Otherwise there could be issues";
$return .= '<ul>';
for ( $x = 0; count($error) > $x; $x++ ) {
$return .= '<li>' . $error[$x] . '</li>';
}
$return .= "</ul>";
}
return $return;
}
Hope this help!
Sam
9
12
Quote
wertjangt
Anonymous
I have never tried to create rdf feed on my geeklog site. can you tell me how it is done, and what url should i put on the rdf block you mention earlier.
10
12
Quote
wertjangt
Anonymous
sorry for that stupid question, found it.
11
8
Quote
All times are EDT. The time is now 11:05 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content