PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
CodyG
PHP-Portal Project


Joined: Jan 02, 2003
Posts: 580
Location: Vancouver Island

PostPosted: Tue Apr 11, 2006 1:16 pm Reply with quote Back to top

My 850 members have sent approx 80,000 IMs since 2003. They would not be happy campers without this module. I'm working on the upgrade for the production site and would like to have as few errors as possible before the final data set.

And maybe this module has some bad 7.6/3.x standards too. It's spooky putting old apps on Raven's beautiful new distro without a clear clue how to upgrade. (btw, SM at FN was once free and is not now. And the forums were deactivated on the support site. There hasn't been an update since 2003.)

I'm buggy eyed and clueless for a solution to a js Object Expected error at modules.php?name=Site_Messenger


Viewing source points to the divEvent() at the end of the data table output.

Here is the function from functions.php
Code:
function divEvent() {
        if(nc) document.captureEvents(Event.MOUSEMOVE);
        document.onmousemove = divPos;
        }



It is implemented in the module/index.php like this:

Code:
if ($havemessages) {
                echo "&nbsp;<input type=\"image\" src=\"$url_button/delete.gif\" name=\"delete_messages\" value=\"delete_messages\" style=\"border: 0px\" width=\"103\" height=\"20\" alt=\""._PMSDELETE."\">";
                echo "<input type=\"hidden\" name=\"total_messages\" value=\"$total_messages\">";
                echo "<input type=\"hidden\" name=\"op\" value=\"delete_messages\">\n";
                }
        echo "</td>\n</tr>\n</table>\n</form>";
        if ($havemessages) {
                echo "<scr ipt language=\"JavaScript1.2\" type=\"text/javascript\">\n<!--\n divEvent()\n //-->\n</scr ipt>";
                }


The error occurs when viewing the "Your Messages" table.

A tiny example of view source for the last table row and script tag.
(from my test site)
Code:
<tr>
        <td bgcolor="#EDD1EF" width="2%" align="center"><input type="checkbox" onclick="CheckCheckAll();" name="msg_id[8]" value="3" style="background-color: transparent;"></td>
        <td width="5%" align="center" bgcolor="#EDD1EF">&nbsp;        <td bgcolor="#EDD1EF" width="10%"><font class="content" color="#735288">User</font></td>
        <td bgcolor="#F3E6F8"><a href="modules.php?name=Site_Messenger&op=read&id=3" onmouseover="on('ebene8')" onmouseout="off('ebene8')"><font class="tiny" color="#735288">Re: heh, heh</font></a></td>
        <td bgcolor="#EDD1EF" align="center" width="18%"><font class="tiny" color="#735288">06-04-01 01:27 01:27:58 PM</font></td>
</tr>
<tr bgcolor="#EFDEF6">
        <td colspan="6"><a href="modules.php?name=Site_Messenger"><img src="modules/Site_Messenger/images/buttons/english/index.gif" width="55" height="20" border="1" alt="You can click here to reload your instant messages." align="right"></a> <a href="modules.php?name=Site_Messenger&op=send"><img src="modules/Site_Messenger/images/buttons/english/senden.gif" border=0 width="103" height="20"></a> &nbsp;<input type="image" src="modules/Site_Messenger/images/buttons/english/delete.gif" name="delete_messages" value="delete_messages" style="border: 0px" width="103" height="20" alt="Delete Message"><input type="hidden" name="total_messages" value="9"><input type="hidden" name="op" value="delete_messages">
</td>
</tr>
</table>
</form><scr ipt language="JavaScr ipt1.2" type="text/javascr ipt">
<!--
 divEvent()
 //-->
</scr ipt>
<!-- end Site_Messenger output -->

</td>
</table>


I suspected a conflict with a block, so did a search for all instances of divEvent() in public_html/ and only found it in the above two files.


If anyone has a moment to help me rid myself and users of this error I'd be most grateful and take you to lunch if you're ever in Victoria.

Have a happy nuking day.

Cool
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7330
Location: Arizona

PostPosted: Wed Apr 12, 2006 6:27 am Reply with quote Back to top

CodyG, may I see the two functions "on" and "off" where they are defined? See this line of code:


<td bgcolor="#F3E6F8"><a href="modules.php?name=Site_Messenger&op=read&id=3" onmouseover="on('ebene8')" onmouseout="off('ebene8')"><font class="tiny" color="#735288">Re: heh, heh</font></a></td>
View user's profile Send private message Visit poster's website
CodyG
PHP-Portal Project


Joined: Jan 02, 2003
Posts: 580
Location: Vancouver Island

PostPosted: Wed Apr 12, 2006 11:39 am Reply with quote Back to top

oh right ... I was playing around with this bit of code .... Sad I knew there was something to do with off and on somewhere ... it's in the block-Site_Messenger.php file. Which is totally confuddling because the error only appears when accessing the module/index.php.

Code:

SCR IPT LANGUAGE="javascr ipt" TYPE="text/javascr ipt">
        <!--
     if (document.images){
               BC_on = new Image();
                BC_on.src = "<?php echo "modules/$pm_module_name/images/Themes/$themename/copyrighta.gif" ?>";
                BC_off = new Image();
                BC_off.src = "<?php echo "modules/$pm_module_name/images/Themes/$themename/copyright.gif" ?>";
          B0_on = new Image();
                B0_on.src = "<?php echo "modules/$pm_module_name/images/Themes/$themename/b0a.gif" ?>";
                B0_off = new Image();
                B0_off.src = "<?php echo "modules/$pm_module_name/images/Themes/$themename/b0.gif" ?>";
          B1_on = new Image();
                B1_on.src = "<?php echo "modules/$pm_module_name/images/Themes/$themename/b1a.gif" ?>";
                B1_off = new Image();
                B1_off.src = "<?php echo "modules/$pm_module_name/images/Themes/$themename/b1.gif" ?>";
          B2_on = new Image();
                B2_on.src = "<?php echo "modules/$pm_module_name/images/Themes/$themename/b2a.gif" ?>";
                B2_off = new Image();
                B2_off.src = "<?php echo "modules/$pm_module_name/images/Themes/$themename/b2.gif" ?>";
        }
     function off(offImageArray){
             if (document.images){
                     for (i=0;i<offImageArray.length;i++){
                             document[offImageArray[i]].src = eval(offImageArray[i] + "_off.src");
                     }
             }
     }
     function on(onImageArray){
             if (document.images){
                     for (i=0;i<onImageArray.length;i++){
                             document[onImageArray[i]].src = eval(onImageArray[i] + "_on.src");
                     }
             }
     }
     //-->
     </SCR IPT>

View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7330
Location: Arizona

PostPosted: Fri Apr 14, 2006 10:51 am Reply with quote Back to top

CodyG,
Not sure if this is it, but I am wondering about the two lines that are like this:

document[offImageArray[i]].src

doesn't this need to be:

document.[offImageArray[i]].src

I think it needs to have the "dot"?
View user's profile Send private message Visit poster's website
evaders99
Moderator


Joined: Apr 30, 2004
Posts: 2793

PostPosted: Fri Apr 14, 2006 9:02 pm Reply with quote Back to top

What I'm thinking is that its supposed to change the images source path

So that would be
document.images[offImageArray[i]].src
View user's profile Send private message Visit poster's website
CodyG
PHP-Portal Project


Joined: Jan 02, 2003
Posts: 580
Location: Vancouver Island

PostPosted: Sat Apr 15, 2006 10:57 am Reply with quote Back to top

In block-Site_Messenger.php I added dots..
Code:

function off(offImageArray){
             if (document.images){
                     for (i=0;i<offImageArray.length;i++){
                             document.[offImageArray[i]].src = eval(offImageArray[i] + "_off.src");
                     }
             }
     }
     function on(onImageArray){
             if (document.images){
                     for (i=0;i<onImageArray.length;i++){
                             document.[onImageArray[i]].src = eval(onImageArray[i] + "_on.src");
                     }
             }
     }


That's not working for me ... and now gives me a new js error on the home page, not just at the modules/Site_Messenger/index.php.

The error is: Expected identifier.

The script has this thing where it changes images according to some state of the block... on and off ... and this is configurable in the module config file. I turned it off. Maybe I should try turning it on.

Thanks for helping.
View user's profile Send private message
CodyG
PHP-Portal Project


Joined: Jan 02, 2003
Posts: 580
Location: Vancouver Island

PostPosted: Sat Apr 15, 2006 11:02 am Reply with quote Back to top

I tried turning it, it is an animated gif as part of the block file, I put it ON ... but it doesn't help, it looks funny. Sad
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum