Author |
Message |
doffer83
Worker
![Worker Worker](modules/Forums/images/ranks/3stars.gif)
![](modules/Forums/images/avatars/d5c522c25233365e6b83d.jpg)
Joined: Apr 17, 2011
Posts: 117
Location: Amsterdam
|
Posted:
Mon Sep 23, 2013 7:29 am |
|
the comment systeem of this module won't show the comment text.. when I submit a comment everything seems to be okey.. as a visitor I can see that someone added a comment but there is no text ..
Code:<script type="text/javascript">
function disp_confirm(id)
{
var name = confirm("<?php echo ""._AREUSURE.""; ?>")
if (name==true)
{
window.open('modules.php?name=Video_Stream&page=comment&moderateVS=1&id='+id+'','','scrollbars=no,menubar=no,height=250,width=500,resizable=no,toolbar=no,location=no,status=no');
}
}
</script>
<?php
/************************************************************************/
/* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Video Stream Module for PHP-Nuke with many features */
/* */
/* Copyright (c) 2006 by Scott Cariss (Brady) */
/* http://www.steezmatic-designs.com */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if ( !defined('MODULE_FILE') )
{
die("You can't access this file directly...");
}
if(($commentEDDD == 1) && ($request == "")) {
// Comments Layout
echo "<br /><br /><div align=\"center\"><FONT class=title>"._VS_COMMENTS."</FONT></div>";
$result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream_comments WHERE vidid='$id'");
$commentstoshow = $db->sql_numrows($result);
// $result = $db->sql_query($sql));
if($commentstoshow == "0") {
echo "<br><center><i>"._NOCOMMENTS."</i></center>";
} else {
echo "<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\"><tr>
<td width=\"150\"><div align=\"center\"> ÇÓã ÇáÚÖæ</div></td><td><div align=\"center\"><b>"._VS_COMMENT."</b></div></td></tr>";
while($row = $db->sql_fetchrow($result, SQL_ASSOC)) {
echo "<tr><td valign=\"top\"><p><b>".$row['user']."</b><br />";
$userav = $row['user'];
avatars($userav);
echo "<br /><br />";
if($userav != "Anonymous") {
// Gets total comments user has posted
$totcoms = $db->sql_query("SELECT * FROM ".$prefix."_video_stream_comments WHERE user='$userav'");
$totcomsnum = $db->sql_numrows($totcoms);
echo "<b>"._VS_COMMENTS.":</b> ".$totcomsnum."<br />";
// When User Joined
$joindate = $db->sql_query("SELECT user_regdate FROM ".$prefix."_users WHERE username='$userav'");
$rowjoin = $db->sql_fetchrow($joindate);
echo "<b>"._JOINON.":</b> ".$rowjoin['user_regdate']."<br />";
}
echo "</p></td><td valign=\"top\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr><td align=\"left\"><b>"._POSTEDON.":</b> ".$row['date']."</td>
<td align=\"right\">";
$commentidDE = $row['id'];
editdeletecontrolsVS($userav, $commentidDE);
echo "</td></tr><tr><td colspan=\"2\"><hr></td></tr><tr><td colspan=\"2\">".$row['comment']."</td></tr></table></td>
</tr><tr><td><a href=\"#VStop\">"._BACKTOTOP."</a></td><td>";
userdetailsVS($userav);
echo "</td></tr><tr><td colspan=\"2\"> </td></tr>";
}
echo "
</table>";
}
}
CloseTable();
// Function to get the users email, YIM, AIM, etc
function userdetailsVS($userav) {
global $db, $prefix;
if($userav != "Anonymous") {
$result = $db->sql_query("SELECT * FROM ".$prefix."_users WHERE username='$userav'");
$row = $db->sql_fetchrow($result);
echo "<a href=\"messages-post-.html".$row['user_id']."\"><img src=\"images/Video_Stream/comment_pm.gif\" alt=\""._SENDPMESS."\" border=\"0\" /></a> ";
echo "<a href=\"mailto:".$row['user_email']."\"><img src=\"images/Video_Stream/comment_email.gif\" alt=\""._SENDEMAIL."\" border=\"0\" /></a>";
if($row['user_website'] != "") {
echo " <a href=\"".$row['user_website']."\"><img src=\"images/Video_Stream/comment_www.gif\" alt=\""._VISITPOSTWEB."\" border=\"0\" /></a>";
}
if($row['user_aim'] != "") {
echo " <a href=\"aim:goim?screenname=".$row['user_aim']."&message=Hello+Are+you+there?\"><img src=\"images/Video_Stream/comment_aim.gif\" alt=\""._AIMADDRESS."\" border=\"0\" /></a>";
}
if($row['user_yim'] != "") {
echo " <a href=\"http://edit.yahoo.com/config/send_webmesg?.target=".$row['user_yim']."&.src=pg\"><img src=\"images/Video_Stream/comment_yim.gif\" alt=\""._YIMADDRESS."\" border=\"0\" /></a>";
}
if($row['user_msnm'] != "") {
echo " <a href=\"profile-.html".$row['user_id']."\"><img src=\"images/Video_Stream/comment_msn.gif\" alt=\""._MSNMESSENGERADD."\" border=\"0\" /></a>";
}
if($row['user_icq'] != "") {
echo " <a href=\"http://wwp.icq.com/scripts/search.dll?to=".$row['user_icq']."\"><img src=\"images/Video_Stream/comment_icq.gif\" alt=\""._ICQNUMBER."\" border=\"0\" /></a>";
}
} else {
echo " ";
}
}
// Function to determine when the Edit and Delete buttons are shown.
function editdeletecontrolsVS($userav, $commentidDE) {
global $db, $prefix, $looker, $isvidstreamadmin;
if($isvidstreamadmin == 1) {
echo "<a href=\"javascript:loadcomment(".$commentidDE.", 2)\"><img src=\"images/Video_Stream/comment_edit.gif\" alt=\""._EDITCOMM."\" border=\"0\" /></a>
<a href=\"#VStop\" onClick=\"javascript:disp_confirm(".$commentidDE.")\"><img src=\"images/Video_Stream/comment_delete.gif\" alt=\""._DELETECOMM."\" border=\"0\" /></a>";
} else {
if ($userav != "Anonymous") {
if($userav == $looker) {
echo "<a href=\"javascript:loadcomment(".$commentidDE.", 2)\"><img src=\"images/Video_Stream/comment_edit.gif\" alt=\""._EDITCOMM."\" border=\"0\" /></a>
<a href=\"#VStop\" onClick=\"javascript:disp_confirm(".$commentidDE.")\"><img src=\"images/Video_Stream/comment_delete.gif\" alt=\""._DELETECOMM."\" border=\"0\" /></a>";
}
}
}
}
?>
|
would you look at the code please.. |
_________________ We are sorry that Tony Soprano is dead, We wish Assad the Syrian maffia boss had died instead. RIP Tony |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm
![](modules/Forums/images/avatars/5ed231554a8492e2e09da.gif)
Joined: Aug 13, 2009
Posts: 1123
|
Posted:
Mon Sep 23, 2013 5:25 pm |
|
Hi doffer83
Try this one and take a look so u can finish the rest to validate it 100%. I did already lots of changes.
Code:<script type="text/javascript">
function disp_confirm(id)
{
var name = confirm('<?php echo '' . _AREUSURE . ''; ?>')
if (name==true)
{
window.open('modules.php?name=Video_Stream&page=comment&moderateVS=1&id='+id+'','','scrollbars=no,menubar=no,height=250,width=500,resizable=no,toolbar=no,location=no,status=no');
}
}
</script>
<?php
/************************************************************************/
/* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Video Stream Module for PHP-Nuke with many features */
/* */
/* Copyright (c) 2006 by Scott Cariss (Brady) */
/* http://www.steezmatic-designs.com */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (!defined('MODULE_FILE')) die('You can\'t access this file directly...');
if(($commentEDDD == 1) && ($request == "")) {
// Comments Layout
echo '<br /><br /><div align="center"><font class="title">' . _VS_COMMENTS . '</font></div>';
$result = $db->sql_query('SELECT * FROM `' . $prefix . '_video_stream_comments` WHERE `vidid` = \'' . $id . '\'');
$commentstoshow = $db->sql_numrows($result);
// $result = $db->sql_query($sql));
if($commentstoshow == '0') {
echo '<br /><center><i>' . _NOCOMMENTS . '</i></center>';
} else {
echo '<table width="100%" border="1" cellspacing="0" cellpadding="0"><tr>
<td width="150"><div align="center"> ÇÓã ÇáÚÖæ</div></td><td><div align="center"><b>' . _VS_COMMENT . '</b></div></td></tr>';
while($row = $db->sql_fetchrow($result, SQL_ASSOC)) {
echo '<tr><td valign="top"><p><b>' . $row['user'] . '</b><br />';
$userav = $row['user'];
avatars($userav);
echo "<br /><br />";
if($userav != 'Anonymous') {
// Gets total comments user has posted
$totcoms = $db->sql_query('SELECT * FROM `' . $prefix . '_video_stream_comments` WHERE `user` = \'' . $userav . '\'');
$totcomsnum = $db->sql_numrows($totcoms);
echo '<b>' . _VS_COMMENTS . ':</b> ' . $totcomsnum . '<br />';
// When User Joined
$joindate = $db->sql_query('SELECT `user_regdate` FROM `' . $prefix . '_users` WHERE `username` = \'' . $userav . '\'');
$rowjoin = $db->sql_fetchrow($joindate);
echo '<b>' . _JOINON . ':</b> ' . $rowjoin['user_regdate'] . '<br />';
}
echo '</p></td><td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td align="left"><b>' . _POSTEDON . ':</b> ' . $row['date'] . '</td>
<td align="right">';
$commentidDE = $row['id'];
editdeletecontrolsVS($userav, $commentidDE);
echo '</td></tr><tr><td colspan="2"><hr /></td></tr><tr><td colspan="2">' . $row['comment'] . '</td></tr></table></td>
</tr><tr><td><a href="#VStop">' . _BACKTOTOP . '</a></td><td>';
userdetailsVS($userav);
echo '</td></tr><tr><td colspan="2"> </td></tr>';
}
echo '</table>';
}
}
CloseTable();
// Function to get the users email, YIM, AIM, etc
function userdetailsVS($userav) {
global $db, $prefix;
if($userav != 'Anonymous') {
$result = $db->sql_query('SELECT * FROM `' . $prefix . '_users` WHERE `username` = \'' . $userav . '\'');
$row = $db->sql_fetchrow($result);
echo '<a href="modules.php?name=Private_Messages&file=index&mode=post&u=' . $row['user_id'] . '"><img src="images/Video_Stream/comment_pm.gif" alt="' . _SENDPMESS . '" border="0" /></a>';
echo '<a href="mailto:' . $row['user_email'] . '"><img src="images/Video_Stream/comment_email.gif" alt="' . _SENDEMAIL . '" border="0" /></a>';
if($row['user_website'] != "") {
echo ' <a href="' . $row['user_website'] . '"><img src="images/Video_Stream/comment_www.gif" alt="' . _VISITPOSTWEB . '" border="0" /></a>';
}
if($row['user_aim'] != '') {
echo ' <a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?"><img src="images/Video_Stream/comment_aim.gif" alt="' . _AIMADDRESS . '" border="0" /></a>';
}
if($row['user_yim'] != '') {
echo ' <a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg"><img src="images/Video_Stream/comment_yim.gif" alt="' . _YIMADDRESS . '" border="0" /></a>';
}
if($row['user_msnm'] != '') {
echo ' <a href="profile-.html' . $row['user_id'] . '"><img src="images/Video_Stream/comment_msn.gif" alt="' . _MSNMESSENGERADD . '" border="0" /></a>';
}
if($row['user_icq'] != "") {
echo ' <a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '"><img src="images/Video_Stream/comment_icq.gif" alt="' . _ICQNUMBER . '" border="0" /></a>';
}
} else {
echo ' ';
}
}
// Function to determine when the Edit and Delete buttons are shown.
function editdeletecontrolsVS($userav, $commentidDE) {
global $db, $prefix, $looker, $isvidstreamadmin;
if($isvidstreamadmin == 1) {
echo '<a href="javascript:loadcomment(' . $commentidDE . ', 2)"><img src="images/Video_Stream/comment_edit.gif" alt="' . _EDITCOMM . '" border="0" /></a>
<a href="#VStop" onClick="javascript:disp_confirm(' . $commentidDE . ')"><img src="images/Video_Stream/comment_delete.gif" alt="' . _DELETECOMM . '" border="0" /></a>';
} else {
if ($userav != 'Anonymous') {
if($userav == $looker) {
echo '<a href="javascript:loadcomment(' . $commentidDE . ', 2)"><img src="images/Video_Stream/comment_edit.gif" alt="' . _EDITCOMM . '" border="0" /></a>
<a href="#VStop" onClick="javascript:disp_confirm(' . $commentidDE . ')"><img src="images/Video_Stream/comment_delete.gif" alt="' . _DELETECOMM . '" border="0" /></a>';
}
}
}
}
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
doffer83
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Sep 23, 2013 5:47 pm |
|
hicuxunicorniobestbuildpc, thanks for ur response
Please can you try to submit
http://faresalkhoury.nl/modules.php?name=Video_Stream&page=watch&id=27&d=1
I made it possible even for guests. There is something wrong with this module... too wide (see scrolbar) and the comment system still not okey.. after changing the code as you did suggest I could not even delete the comment
it worked well with the old weak phpnuke 7.9 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Sep 23, 2013 6:10 pm |
|
That means u need to fix the whole module. Yeah I understand your point.That's what I've been saying all the times. Lots of old modules do not work anymore with RaveNuke and most of them are not safe anymore. It takes lots of times to fix them and nobody want to do it at least you pay for it. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
doffer83
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Sep 24, 2013 8:59 am |
|
hicuxunicorniobestbuildpc wrote: | That means u need to fix the whole module. Yeah I understand your point.That's what I've been saying all the times. Lots of old modules do not work anymore with RaveNuke and most of them are not safe anymore. It takes lots of times to fix them and nobody want to do it at least you pay for it. | when some one make a stream module special for raven I will use it online ![Sad](modules/Forums/images/smiles/icon_sad.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|