PDA

View Full Version : Last Commented with Archivecalendar


cbtoday
07-22-2006, 08:15 AM
I downloaded archivecalendar addon, and I put <LAST_COMMENTS> in my archivecalendar_template.html, it doesn't work, the Lastcomment addon is working on other template html. But if I rename archivecalendar_template.html to browse_template.html, the Lastcomment works, but archivecalendar does not!
So is there anyway that I could make both addon works on a same template html!?
PLEASE HELP, thanks.

GeoS
07-22-2006, 11:27 AM
You probably have to look into the addon code and manualy add there one more template to the list of supported.

cbtoday
07-22-2006, 04:29 PM
where is the list of supported? The code is like this :

$addon_name = "Most Recent Comments";
$addon_description = "Adds one new tag to display the most recent set of comments. <br /><br />
&lt;LAST_COMMENTS&gt;<br /><br />

This addon will show the most recent set of comments that were left. The value is decided by you.<br /><br />

";
$addon_version = "0.1";

$limit_comments = 20; // Change this to show however many you want
$recent_comments = ""; // comments stored in this string
if($_GET['showimage'] == "") { $imageid = $image_id; } else { $imageid = $_GET['showimage']; }
$recentquery = mysql_query("select t1.parent_id, t1.message, t1.name, t1.url, t2.headline, t2.id from ".$pixelpost_db_prefix."comments as t1 inner join pixelpost_pixelpost t2 on t1.parent_id = t2.id where t1.name != '-mark-' ORDER BY t1.id DESC limit $limit_comments");
while(list($parent_id, $comment_message, $comment_name, $comment_url, $comment_headline, $comment_image_id) = mysql_fetch_row($recentquery)) {
$comment_message = pullout($comment_message);
$comment_name = pullout($comment_name);
$comment_headline = pullout($comment_headline);
$comment_image = pullout($comment_image);
if($comment_url != "") {
$comment_url = "http://$comment_url"; // i'm running for president...
$comment_url = str_replace("http://http://","http://",$comment_url); // you see?
$comment_name = "<a href='$comment_url' title='$lang_visit_homepage' target='_blank'>$comment_name</a>";
}
$comment_headline = "<a href='/index.php?showimage=$comment_image_id' title='$comment_headline' target='_blank'>$comment_headline</a>";
$recent_comments .= "<b>$comment_name</b> on <b>$comment_headline</b><br />$comment_message <br /><br />";
}
$recent_comments .= "";
$tpl = ereg_replace("<LAST_COMMENTS>",$recent_comments,$tpl);

?>

cbtoday
07-22-2006, 04:52 PM
doesn't matter, I got it solved. Thanks.