Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Other
Author Message
doffer83
Worker
Worker



Joined: Apr 17, 2011
Posts: 117
Location: Amsterdam

PostPosted: Mon Sep 23, 2013 7:29 am Reply with quote

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\">&nbsp;</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 "&nbsp;";
   }
}

// 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 
View user's profile Send private message Visit poster's website
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1123

PostPosted: Mon Sep 23, 2013 5:25 pm Reply with quote

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&amp;page=comment&amp;moderateVS=1&amp;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">&nbsp;</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&amp;file=index&amp;mode=post&amp;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'] . '&amp;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'] . '&amp;.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 '&nbsp;';
   }
}

// 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>';
         }
      }
   }
}
 
View user's profile Send private message
doffer83







PostPosted: Mon Sep 23, 2013 5:47 pm Reply with quote

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
 
hicuxunicorniobestbuildpc







PostPosted: Mon Sep 23, 2013 6:10 pm Reply with quote

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.
 
doffer83







PostPosted: Tue Sep 24, 2013 8:59 am Reply with quote

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
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Other

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©