Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 04:24 pm EDT

Geeklog Forums

I want to use geeklog but...


Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
Don't get me wrong I love geeklog.
But it just has one flaw that is making me change.
It can not deal with all the information I need to put out.
I am using it as a community website.
The school, local news, extra. Every thing you would see in a news paper.

But you only have room for a hand full of news articles on the front page.
It would be easily fixed if I was able to put rss feeds into the news and static pages.
I know we can put them in boxes. But it looks like a bunch of over crowded information all down the one side of my site that no one likes or uses.
 Quote

Status: offline

beewee

Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
You can call these direct from the database, using the stories by topic block (http://www.geeklog.net/filemgmt/index.php?id=564), or the 'previous 7 sories block' (http://www.geeklog.net/forum/viewtopic.php?showtopic=55962), and put one or more of these in a block or centerblock. There's no need for parsing feeds that way.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1468
Location:Canada
It's been a while since I used this but this will allow feeds in staticpages in which you can then make show up on the homepage. Put this function in lib-custom.php
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;
}
// *************************************************************************************
 


- Create a block and make sure the block type is a portal block.
- Create a staticpage and call the function static_rdf and pass in the block id of the block you just made.
One of the Geeklog Core Developers.
 Quote

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