Welcome to Geeklog, Anonymous Saturday, April 27 2024 @ 01:43 am EDT

Geeklog Forums

Ephemerids


Louis

Anonymous
Is there an ephemerids block for Geeklog? Or anything similar to it that I can use on my site?

Thanks. Smile
 Quote

Status: offline

ScurvyDawg

Forum User
Full Member
Registered: 11/06/02
Posts: 523
Like this for Nuke?

http://www.myphpnuke.com/manual188_7/ch06s13.html

I have not seen one?

Blah Blah Blah Blah ...
 Quote

Louis

Anonymous
Quote by Louis: Is there an ephemerids block for Geeklog? Or anything similar to it that I can use on my site?

Thanks. Smile


Yes, like that. Smile

Anyone knows if there is a version for Geeklog? Smile

Thanks...
 Quote

just logged out

Anonymous
that sounds like an excellent idea--i think i'll make that my next project Idea
 Quote

Theophile

Anonymous
I've been working on it all day and I have finally managed to "port" the PHP-Nuke "Ephemerids" module to Geeklog. I put "port" in quotes because it is incredibly rough and far from complete... but it works.

So far, you need to already have a "nuke_ephem" table in your Geeklog database. I just modified the php so that it will execute and display properly from within a static page. Here's the code you need to put in the static page:

Text Formatted Code
global $_DB_name, $_DB_host, $_DB_user, $_DB_pass;

$today = getdate();
$eday = $today[mday];
$emonth = $today[mon];
$link = mysql_connect($_DB_host, $_DB_user, $_DB_pass);
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
mysql_select_db($_DB_name);
$sql = "SELECT yid, content FROM nuke_ephem WHERE did='$eday' AND mid='$emonth'";
$result = mysql_query($sql);
if (!$result) {
    die('Invalid query: ' . mysql_error());
}
while ($row = mysql_fetch_array($result)) {
    if ($cnt == 1) {
        $boxstuff .= "<br><br>";
    }
    $content .= "<b>$row[yid]</b> - ";
    $content .= "$row[content]<br>";
    $cnt = 1;
}


echo $content;


As of yet, I haven't tried to get "Ephemerids Manager" working so in order to add or modify the data, you'd have to do it directly at the db. Obviously, this would need a lot of work before it could become a true plugin. Right now, as I said, you already need the database table and you need to execute the code in a static page. But it does work. To see the result, check out:

http://monopedilos.com

Comments welcome! Would be happy to leave the rest up to someone more qualified than myself!
 Quote

All times are EDT. The time is now 01:43 am.

  • 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