Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Latest Comment Panel

Asked Modified Viewed 39,164 times
D
Druid
D
Druid 10
  • Member, joined since
  • Contributed 110 posts on the community forums.
  • Started 56 threads in the forums
  • Started this discussions
asked
Member

I recently updated to V 7.00 RC2 and my latest comment page has being showing the following error

Notice: Undefined index: comment_smileys in /home/fhlinux176/c/caernarfon8ball.co.uk/user/htdocs/viewpage.php(34) : eval()'d code on line 21


http://www.caernarfon8ball.co.uk/view...age_id=149



on the bottom of the page it displays my Google Adsense Shoutbox plus my users panel i had not noticed if the Adsense and Shoutbox and Users panel Should Be There or if they were there before upgrade.
Edited by Druid on 27-06-2008 19:02,
0 replies

6 posts

B
Basti
B
Basti 10
[PHP-Fusion Crew Member & Admin from June 2008 - December 2010]

http://basti2web.de - Support Site for my infusions
  • Veteran Member, joined since
  • Contributed 1,099 posts on the community forums.
  • Started 32 threads in the forums
answered
Veteran Member

Thread moved from "PHPFusion 6 Support" to "PHPFusion 7 Support".

@Druid: It is a custom page, so we need the code, you are using there ;)
0 replies
D
Druid
D
Druid 10
  • Member, joined since
  • Contributed 110 posts on the community forums.
  • Started 56 threads in the forums
  • Started this discussions
answered
Member

My apologies here is the code

<!--p //opentable("Latest Comments"); $i = 0; $result = dbquery( "SELECT * FROM fusion_comments LEFT JOIN fusion_users ON fusion_comments.comment_name=fusion_users.user_id ORDER BY comment_datestamp DESC LIMIT 50" ); if (dbrows($result)) { echo "
<table width='100%' align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
\n"; while ($data = dbarray($result)) { echo "
<tr>
\n
<td class='".($i% 2==0?"tbl1":"tbl2").-->
<p><span class="comment-name">"; if ($data['user_name']) { echo "<a href="&quot;.BASEDIR.&quot;profile.php?lookup=&quot;.$data[">".$data['user_name']."</a>"; } else { echo $data['comment_name']; } $comment_message = nl2br(parseubb($data['comment_message'])); $comment_item_id = $data['comment_item_id']; $comment_type = $data['comment_type']; if ($data['comment_smileys'] == "1") $comment_message = parsesmileys($comment_message); echo "</span> <span class="small">".$locale['041'].showdate("longdate", $data['comment_datestamp'])."</span><br />".$comment_message."<br />"; if ($data['comment_type'] == "N") { echo "<a href="&quot;.BASEDIR.&quot;news.php?readmore=&quot;.$data[">View News Comment</a><br />"; } else if ($data['comment_type'] == "A") { echo "<a href="&quot;.BASEDIR.&quot;readarticle.php?article_id=&quot;.$data[">View Article Comment</a><br />"; } else if ($data['comment_type'] == "P") { echo "<a href="&quot;.BASEDIR.&quot;photogallery.php?photo=&quot;.$data[">View Photo Comment</a><br />"; } else if ($data['comment_type'] == "C") { echo "<a href="&quot;.BASEDIR.&quot;viewpage.php?page_id=&quot;.$data[">View Custom Page Comment</a><br />"; } else { echo "No link."; } echo "\n\n"; $i++; } echo "\n"; } else { echo "</p>
<br />There are no comments.<br /><br />
<p>\n"; } closetable(); echo "\n"; ?&gt;</p>
Edited by Druid on 28-06-2008 11:54,
0 replies
— 8 months later —
Y
Yxos
Y
Yxos 10
Yxos

The best solution is not necessarily a technical solution !
  • Senior Member, joined since
  • Contributed 277 posts on the community forums.
  • Started 28 threads in the forums
answered
Senior Member

<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: latestcomments.php
| Enhanced, W3C passed, non-localized by: Yxos
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
require_once LOCALE.LOCALESET."comments.php";
require_once LOCALE.LOCALESET."admin/main.php";

opentable($locale['c100']);
$result = dbquery("SELECT * FROM ".DB_COMMENTS." c LEFT JOIN ".DB_USERS." u ON c.comment_name=u.user_id ORDER BY comment_datestamp DESC LIMIT 25");
if (dbrows($result)) {
$i = 0;
echo "<table width='100%' align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n";
while ($data = dbarray($result)) {

$comment_name = (($data['user_name']) ? "<a href='".BASEDIR."profile.php?lookup=".$data['comment_name']."' class='slink'>".$data['user_name']."</a>" : $data['comment_name']);
$comment_name = "<span class='comment-name'>".$comment_name."</span>";
$comment_item_id = $data['comment_item_id'];
$comment_type = $data['comment_type'];
$comment_message = parsesmileys(nl2br(parseubb($data['comment_message'])));
$comment_opt = " alt='' border='0' style='border: 0pt none; margin-left: 2px; margin-right: 2px;'";

if ($data['comment_type'] == "N") {
$comment_link = "<a href='".BASEDIR."news.php?readmore=".$data['comment_item_id']."'><img src='".ADMIN."images/news.gif'".$comment_opt." title='".$locale['216']."' /></a>";
} else if ($data['comment_type'] == "A") {
$comment_link = "<a href='".BASEDIR."readarticle.php?article_id=".$data['comment_item_id']."'><img src='".ADMIN."images/articles.gif'".$comment_opt." title='".$locale['203']."' /></a>";
} else if ($data['comment_type'] == "P") {
$comment_link = "<a href='".BASEDIR."photogallery.php?photo_id=".$data['comment_item_id']."'><img src='".ADMIN."images/photoalbums.gif'".$comment_opt." title='".$locale['218']."' /></a>";
} else if ($data['comment_type'] == "C") {
$comment_link = "<a href='".BASEDIR."viewpage.php?page_id=".$data['comment_item_id']."'><img src='".ADMIN."images/c-pages.gif'".$comment_opt." title='".$locale['206']."' /></a>";
} else if ($data['comment_type'] == "K") {
$comment_link = "<a href='".INFUSIONS."the_kroax/embed.php?panel&url=".$data['comment_item_id']."'><img src='".ADMIN."images/faq.gif'".$comment_opt." title='The Kroax' /></a>";
} else if ($data['comment_type'] == "B") {
$comment_link = "<a href='".INFUSIONS."weblog/blog.php?readmore=".$data['comment_item_id']."'><img src='".ADMIN."images/faq.gif'".$comment_opt." title='WebLog' /></a>";
} else {
$comment_link = "<img src='".ADMIN."images/faq.gif'".$comment_opt." />";
}

echo "<tr>\n";
echo "<td class='".($i% 2==0?"tbl1":"tbl2")."'>";
echo $comment_link;
echo "</td>\n";

echo "<td class='".($i% 2==0?"tbl1":"tbl2")."'>";
echo $comment_name." <span class='small'>".$locale['global_071'].showdate("longdate", $data['comment_datestamp'])."</span><br />";
echo $comment_message;

echo "</td>\n</tr>\n";
$i++;
}
echo "</table>\n";
} else {
echo "<center><br />".$locale['c101']."<br /><br /></center>\n";
}
closetable();

require_once THEMES."templates/footer.php";
?>
Edited by Yxos on 01-03-2009 12:11,
0 replies
— 1 year later —
J
Jack Daniels
J
  • Member, joined since
  • Contributed 77 posts on the community forums.
  • Started 9 threads in the forums
answered
Member

This is not working in 7.01.03.
Not as a page and not as a panel.
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

For a custom Page try this...
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]
<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| <a href="http://www.php-fusion.co.uk/" target="_blank" title="autolink">http://www.php-fu...</a>
+--------------------------------------------------------+
| Filename: latestcomments.php
| Enhanced, W3C passed, non-localized by: Yxos
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at <a href="http://www.gnu.org/licenses/agpl.html." target="_blank" title="autolink">www.gnu.org/licen...</a> Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/

require_once LOCALE.LOCALESET."comments.php";
require_once LOCALE.LOCALESET."admin/main.php";

opentable($locale['c100']);
$result = dbquery("SELECT * FROM ".DB_COMMENTS." c LEFT JOIN ".DB_USERS." u ON c.comment_name=u.user_id ORDER BY comment_datestamp DESC LIMIT 25"wink;
if (dbrows($result)) {
$i = 0;
echo "<table width='100%' align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n";
while ($data = dbarray($result)) {

$comment_name = (($data['user_name']) ? "<a href='".BASEDIR."profile.php?lookup=".$data['comment_name']."' class='slink'>".$data['user_name']."</a>" : $data['comment_name']);
$comment_name = "<span class='comment-name'>".$comment_name."</span>";
$comment_item_id = $data['comment_item_id'];
$comment_type = $data['comment_type'];
$comment_message = parsesmileys(nl2br(parseubb($data['comment_message'])));
$comment_opt = " alt='' border='0' style='border: 0pt none; margin-left: 2px; margin-right: 2px;'";

if ($data['comment_type'] == "N"wink {
$comment_link = "<a href='".BASEDIR."news.php?readmore=".$data['comment_item_id']."'><img src='".ADMIN."images/news.gif'".$comment_opt." title='".$locale['216']."' /></a>";
} else if ($data['comment_type'] == "A"wink {
$comment_link = "<a href='".BASEDIR."readarticle.php?article_id=".$data['comment_item_id']."'><img src='".ADMIN."images/articles.gif'".$comment_opt." title='".$locale['203']."' /></a>";
} else if ($data['comment_type'] == "P"wink {
$comment_link = "<a href='".BASEDIR."photogallery.php?photo_id=".$data['comment_item_id']."'><img src='".ADMIN."images/photoalbums.gif'".$comment_opt." title='".$locale['218']."' /></a>";
} else if ($data['comment_type'] == "C"wink {
$comment_link = "<a href='".BASEDIR."viewpage.php?page_id=".$data['comment_item_id']."'><img src='".ADMIN."images/c-pages.gif'".$comment_opt." title='".$locale['206']."' /></a>";
} else if ($data['comment_type'] == "K"wink {
$comment_link = "<a href='".INFUSIONS."the_kroax/embed.php?panel&url=".$data['comment_item_id']."'><img src='".ADMIN."images/faq.gif'".$comment_opt." title='The Kroax' /></a>";
} else if ($data['comment_type'] == "B"wink {
$comment_link = "<a href='".INFUSIONS."weblog/blog.php?readmore=".$data['comment_item_id']."'><img src='".ADMIN."images/faq.gif'".$comment_opt." title='WebLog' /></a>";
} else {
$comment_link = "<img src='".ADMIN."images/faq.gif'".$comment_opt." />";
}

echo "<tr>\n";
echo "<td class='".($i% 2==0?"tbl1":"tbl2"wink."'>";
echo $comment_link;
echo "</td>\n";

echo "<td class='".($i% 2==0?"tbl1":"tbl2"wink."'>";
echo $comment_name." <span class='small'>".$locale['global_071'].showdate("longdate", $data['comment_datestamp'])."</span>";
echo $comment_message;

echo "</td>\n</tr>\n";
$i++;
}
echo "</table>\n";
} else {
echo "<center>".$locale['c101']."</center>\n";
}
closetable();



?>[/syntaxhighlighter]

For A panel try this...

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| <a href="http://www.php-fusion.co.uk/" target="_blank" title="autolink">http://www.php-fu...</a>
+--------------------------------------------------------+
| Filename: latestcomments.php
| Enhanced, W3C passed, non-localized by: Yxos
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at <a href="http://www.gnu.org/licenses/agpl.html." target="_blank" title="autolink">www.gnu.org/licen...</a> Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/

require_once LOCALE.LOCALESET."comments.php";
require_once LOCALE.LOCALESET."admin/main.php";

opentable($locale['c100']);
$result = dbquery("SELECT * FROM ".DB_COMMENTS." c LEFT JOIN ".DB_USERS." u ON c.comment_name=u.user_id ORDER BY comment_datestamp DESC LIMIT 25"wink;
if (dbrows($result)) {
$i = 0;
echo "<table width='100%' align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n";
while ($data = dbarray($result)) {

$comment_name = (($data['user_name']) ? "<a href='".BASEDIR."profile.php?lookup=".$data['comment_name']."' class='slink'>".$data['user_name']."</a>" : $data['comment_name']);
$comment_name = "<span class='comment-name'>".$comment_name."</span>";
$comment_item_id = $data['comment_item_id'];
$comment_type = $data['comment_type'];
$comment_message = parsesmileys(nl2br(parseubb($data['comment_message'])));
$comment_opt = " alt='' border='0' style='border: 0pt none; margin-left: 2px; margin-right: 2px;'";

if ($data['comment_type'] == "N"wink {
$comment_link = "<a href='".BASEDIR."news.php?readmore=".$data['comment_item_id']."'><img src='".ADMIN."images/news.gif'".$comment_opt." title='".$locale['216']."' /></a>";
} else if ($data['comment_type'] == "A"wink {
$comment_link = "<a href='".BASEDIR."readarticle.php?article_id=".$data['comment_item_id']."'><img src='".ADMIN."images/articles.gif'".$comment_opt." title='".$locale['203']."' /></a>";
} else if ($data['comment_type'] == "P"wink {
$comment_link = "<a href='".BASEDIR."photogallery.php?photo_id=".$data['comment_item_id']."'><img src='".ADMIN."images/photoalbums.gif'".$comment_opt." title='".$locale['218']."' /></a>";
} else if ($data['comment_type'] == "C"wink {
$comment_link = "<a href='".BASEDIR."viewpage.php?page_id=".$data['comment_item_id']."'><img src='".ADMIN."images/c-pages.gif'".$comment_opt." title='".$locale['206']."' /></a>";
} else if ($data['comment_type'] == "K"wink {
$comment_link = "<a href='".INFUSIONS."the_kroax/embed.php?panel&url=".$data['comment_item_id']."'><img src='".ADMIN."images/faq.gif'".$comment_opt." title='The Kroax' /></a>";
} else if ($data['comment_type'] == "B"wink {
$comment_link = "<a href='".INFUSIONS."weblog/blog.php?readmore=".$data['comment_item_id']."'><img src='".ADMIN."images/faq.gif'".$comment_opt." title='WebLog' /></a>";
} else {
$comment_link = "<img src='".ADMIN."images/faq.gif'".$comment_opt." />";
}

echo "<tr>\n";
echo "<td class='".($i% 2==0?"tbl1":"tbl2"wink."'>";
echo $comment_link;
echo "</td>\n";

echo "<td class='".($i% 2==0?"tbl1":"tbl2"wink."'>";
echo $comment_name." <span class='small'>".$locale['global_071'].showdate("longdate", $data['comment_datestamp'])."</span>";
echo $comment_message;

echo "</td>\n</tr>\n";
$i++;
}
echo "</table>\n";
} else {
echo "<center>".$locale['c101']."</center>\n";
}
closetable();[/syntaxhighlighter]

BTW: There is no Group Access on this.
Edited by Craig on 15-01-2011 11:22,
0 replies
J
Jack Daniels
J
  • Member, joined since
  • Contributed 77 posts on the community forums.
  • Started 9 threads in the forums
answered
Member

Not working as a side and not as a panel.

yes, working, but I took the page part and set it som panel script and then it works.

Thanks man :D

Polarfox:
http://www.php-fusion.co.uk/coc.php#12x
Edited by PolarFox on 15-01-2011 18:23,
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 6 posts
  • Votes 0 votes
  • Topic users 5 members

5 participants

C
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
D
D
Druid 10
  • Member, joined since
  • Contributed 110 posts on the community forums.
  • Started 56 threads in the forums
  • Started this discussions
Y
Y
Yxos 10
Yxos

The best solution is not necessarily a technical solution !
  • Senior Member, joined since
  • Contributed 277 posts on the community forums.
  • Started 28 threads in the forums
B
B
Basti 10
[PHP-Fusion Crew Member & Admin from June 2008 - December 2010]

http://basti2web.de - Support Site for my infusions
  • Veteran Member, joined since
  • Contributed 1,099 posts on the community forums.
  • Started 32 threads in the forums
J
J
  • Member, joined since
  • Contributed 77 posts on the community forums.
  • Started 9 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet