1 (edited by Greg 2007-02-26 01:42)

Topic: Private Messaging Problem

Ok i downloaded the mod, put the files into the correct position.

but, each time i go to install_mod.php,

This script will update your database to work with the following modification:

Mod title: Private Messaging System 1.2.2

Author: Connorhd original 1.1.x version by David 'Chacmool' Djurbäck (connorhd@mypunbb.com)

Disclaimer: Mods are not officially supported by PunBB. Mods generally can't be uninstalled without running SQL queries manually against the database. Make backups of all data you deem necessary before installing.

INSTALL

that is O.K.

But when i press install the following error comes up.

File: /www/110mb.com/a/c/k/acks/htdocs/forums/install_mod.php
Line: 62

PunBB reported: Unable to create table a1messages.

Database reported: Invalid default value for 'owner' (Errno: 1067)

anybody know the solution to it.
thank you

Re: Private Messaging Problem

You have to edit install_mod.php to change the default values for some int columns (ie: owner) to be actual integers

3

Re: Private Messaging Problem

I still don't know what you mean. sorry

owner int(10) NOT NULL DEFAULT '',

what do i edit?

Re: Private Messaging Problem

In that case, you would change default '' to default 0
However, as I said, that's not the only change necessary

5 (edited by Greg 2007-02-26 03:16)

Re: Private Messaging Problem

sorry for being a pest.

i got it

6

Re: Private Messaging Problem

I would like to be a pest and ask for which lines need to be edited ?

Landen Meadows Residents Forum - http://www.landenmeadows.net

7

Re: Private Messaging Problem

download this its a php editor.

http://www.tswebeditor.tk/

it tell you the lines.

notepad fails at telling you.

8

Re: Private Messaging Problem

Thanks Greg - but I was referring to specifically which instances should be edited, and to what.

Landen Meadows Residents Forum - http://www.landenmeadows.net

9

Re: Private Messaging Problem

owner int(10) NOT NULL DEFAULT '',

to

owner int(10) NOT NULL DEFAULT '0',

i just added 0 and it worked.

thats only the first error there is two more.

10 (edited by axa 2007-02-27 02:50)

Re: Private Messaging Problem

Thanks - got that part right - however in editing the file include/functions.php acording to the readme, the following correction...

#---------[ 10. OPEN ]---------------------------------------------------------
#

include/functions.php

#
#---------[ 11. FIND (line: 250) ]-------------------------------------------------
#

        if ($pun_user['g_id'] > PUN_MOD)
        {
            if ($pun_user['g_search'] == '1')
                $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';

            $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
            $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
        }
        else
        {
            $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';
            $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
            $links[] = '<li id="navadmin"><a href="admin_index.php">'.$lang_common['Admin'].'</a>';
            $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
        }
    
#
#---------[ 12. REPLACE WITH ]---------------------------------------------------------
#

        if ($pun_user['g_id'] > PUN_MOD)
        {
            if ($pun_user['g_search'] == '1')
                $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';

            $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
            require(PUN_ROOT.'include/pms/functions_navlinks.php');
            $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
        }
        else
        {
            $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';
            $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
            $links[] = '<li id="navadmin"><a href="admin_index.php">'.$lang_common['Admin'].'</a>';
            require(PUN_ROOT.'include/pms/functions_navlinks.php');
            $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
        }

#

Produces the following error....  Parse error: syntax error, unexpected $end in /home/virtual/site133/fst/var/www/html/lmforum/include/functions.php on line 1078

Which is weird, since line 1078 is blank. When I delete the line, I get the same error. Further, if I revert to an untouched versio nof the file, the error disappears, as does the pm function.

Thanks for any suggestions, apologies for my rudimentary knowledge.
Just another thing - why is it that in virtually all of the instructions for editing files, invariably there is a line number quoted wrong in the instructions ?

Landen Meadows Residents Forum - http://www.landenmeadows.net

Re: Private Messaging Problem

axa: Make sure your braces are matching up: you most likely have too few ending braces.
And the line numbers being wrong are usually due to a change in version number between when the mod was created and when you use it. They can also be wrong if you already applied a mod. They're meant to be a guide, not to be exact.

12

Re: Private Messaging Problem

Amazing - thanks for the quick reply.
You were right. I have reedited the files carefully, with success this time.

Just a word - the support here on the forums is amazing, and the members are hugely knowledgeable and helpful. I have learned so much in the last week ! Thanks again.

Landen Meadows Residents Forum - http://www.landenmeadows.net