Welcome to Geeklog, Anonymous Monday, May 27 2024 @ 08:47 pm EDT

Geeklog Forums

1 block for all news in front page


Status: offline

wertjangt

Forum User
Newbie
Registered: 03/01/04
Posts: 13
I'm using yahoo layout theme, is there a way i can put all the news that i want to show at the main page in one block instead of multiple ones.
 Quote

Status: offline

samstone

Forum User
Full Member
Registered: 09/29/02
Posts: 820
I haven't tried that but it sounds like a good idea.

There is a newspage plugin at squatty's site - squatty.com. Have you checked that out?

Sam
 Quote

Status: offline

wertjangt

Forum User
Newbie
Registered: 03/01/04
Posts: 13
I'm not just talking about rdf/rss news feed, but also for displaying stories as well
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
Have you tried Geeknews? (look here)
Maybe this is what you need.

PS
Gotta read replies more carefully. Sam already suggested that ;-)
Geeklog Polish Support Team
 Quote

Status: offline

geKow

Forum User
Full Member
Registered: 01/12/03
Posts: 445
wertjangt: I would try to do some CSS magic to simulate a single block for multiple articles .

geKow
 Quote

Status: offline

wertjangt

Forum User
Newbie
Registered: 03/01/04
Posts: 13
geKow: I wanted to try that, but i'm pretty confident that I'll screw the layout. So your help is much appreciated.
 Quote

Status: offline

wertjangt

Forum User
Newbie
Registered: 03/01/04
Posts: 13
and another thing can the feature article be set to more than 1 article, let say maybe five. If it can where & which code that need to be change
 Quote

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:

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
 Quote

Status: offline

geKow

Forum User
Full Member
Registered: 01/12/03
Posts: 445
I tried that but all I get where "eval code" errors. Did you tried it with the new content syndication?

geKow
 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
 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.
 Quote

wertjangt

Anonymous
sorry for that stupid question, found it.
 Quote

All times are EDT. The time is now 08:47 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