[ABD] - Voice Forum 2.1

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
lukjez
Registered User
Posts: 34
Joined: Sun Nov 01, 2009 10:51 pm

Re: [DEV] - Little Revolution - Voice Forum

Post by lukjez »

Is it error in you forum?
What souce code is in this lines?
Did you created columns :

Code: Select all

ALTER TABLE phpbb_topics ADD post_sound_filename VARCHAR(15) NULL;
        ALTER TABLE phpbb_topics ADD post_sound_filelength INTEGER NULL;
        ALTER TABLE phpbb_posts ADD post_sound_filename VARCHAR(15) NULL;
        ALTER TABLE phpbb_posts ADD post_sound_filelength INTEGER NULL;
indijanac
Registered User
Posts: 105
Joined: Wed Jan 14, 2009 1:10 am

Re: [DEV] - Little Revolution - Voice Forum

Post by indijanac »

lukjez wrote:Is it error in you forum?
What souce code is in this lines?
Did you created columns :

Code: Select all

ALTER TABLE phpbb_topics ADD post_sound_filename VARCHAR(15) NULL;
        ALTER TABLE phpbb_topics ADD post_sound_filelength INTEGER NULL;
        ALTER TABLE phpbb_posts ADD post_sound_filename VARCHAR(15) NULL;
        ALTER TABLE phpbb_posts ADD post_sound_filelength INTEGER NULL;
Yes in my forum, when i open viewforum and viewtopic.php. And you can't run all queries which you said, you can run just two of them, because you get error:
#1060 - Duplicate column name 'post_sound_filelength'

This are lines 1163 and 1164 in viewtopic.php:
'post_sound_filename' => $row['post_sound_filename'],
'post_sound_filelength' => $row['post_sound_filelength'],

This are lines 637 and 638 in viewforum.php:
'POST_SOUND_FILENAME' => $row['post_sound_filename'],
'POST_SOUND_FILELENGTH' => $row['post_sound_filelength'],

Enable debug and extra debug and you will see errors in your forum.
lukjez
Registered User
Posts: 34
Joined: Sun Nov 01, 2009 10:51 pm

Re: [DEV] - Little Revolution - Voice Forum

Post by lukjez »

Don't revoke this queries to database 2 times, it's needed only one revoke - in second time you get this errors: duplicate column...

I will look at this hidden erros soon.
User avatar
Draketornado
Registered User
Posts: 29
Joined: Wed Dec 09, 2009 8:29 pm

Re: [DEV] - Little Revolution - Voice Forum

Post by Draketornado »

Hy

I installed this Mod and it works great on my lokal Server, but after trying it on my online server it puts me out the following error (even if trying the demo applet) after pshing the send button:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 1826: fopen(e814c9c9.spx) [function.fopen]: failed to open stream: Permission denied
can't open file
If i go than and look into my sound folder, it's empty!

I tryed even to Chmod my whole forum included subfolders and files to 777 ... without result.

In the php.ini fopen is enabled....now i have no other idea...what is this mod requesting else on serverside to work? Is there a way to let run this script from a second server but throug the forum of the first server?

Thanks

Kindly regards

Draketornado
User avatar
Draketornado
Registered User
Posts: 29
Joined: Wed Dec 09, 2009 8:29 pm

Re: [DEV] - Little Revolution - Voice Forum

Post by Draketornado »

Hi

Is there realy no one who can help me out with this strange problem? I have to get it work, so where is the problem...any suggestions would help...

Kindly regards

Christian
lukjez
Registered User
Posts: 34
Joined: Sun Nov 01, 2009 10:51 pm

Re: [DEV] - Little Revolution - Voice Forum

Post by lukjez »

Hello, I invite to tested second version of Voice forum - look at the first edited post in this topic.

Draketornado, did you resolve your problem?
User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [DEV] - Voice Forum 2.0

Post by keith10456 »

Thanks for updating the mod :)
gylippus
Registered User
Posts: 50
Joined: Mon Nov 12, 2007 1:53 am

Re: [DEV] - Voice Forum 2.0

Post by gylippus »

Well, I just edited all files and uploaded them and then I purged the cache. When I go to my forum I get this error when I try to post new topic:

Parse error: syntax error, unexpected $end in /var/www/vhosts/mrdgeography.com/httpdocs/phpBB3/includes/functions_posting.php on line 2649

When I go to private messages I get this error:

Parse error: syntax error, unexpected $end in /var/www/vhosts/mrdgeography.com/httpdocs/phpBB3/includes/functions_privmsgs.php on line 1904

I went back and checked the files for edit mistakes but I don't see any. Also, line 2649 is the last line in the file so that doesn't help much. Does anyone know what the problem is?
gylippus
Registered User
Posts: 50
Joined: Mon Nov 12, 2007 1:53 am

Re: [DEV] - Voice Forum 2.0

Post by gylippus »

Ok, I fixed that problem. I believe the edits are missing two curly brackets in those two specific files. I added the brackets and everything works fine.
lukjez
Registered User
Posts: 34
Joined: Sun Nov 01, 2009 10:51 pm

Re: [DEV] - Voice Forum 2.0

Post by lukjez »

Where was this missing curly brackets, about which you say??
By the way I fixed small error in record applet. Applet is avaible in MOD pack.
gylippus
Registered User
Posts: 50
Joined: Mon Nov 12, 2007 1:53 am

Re: [DEV] - Voice Forum 2.0

Post by gylippus »

Code: Select all

if (!empty($data['mp3'])) {
        $ret = '';
        $mp3 = base64_decode($data['mp3'],$ret);

        if (!empty($data['mp3_filename'])) {
            $fileName = $data['mp3_filename'];
            $newFile = $sound_dir.$fileName;
            unlink($newFile);
        }

            $isOK = false;
            while($isOK != true) {
                $fileName = getUniqueCode(8).".spx";
I changed to:

Code: Select all

if (!empty($data['mp3'])) {
        $ret = '';
        $mp3 = base64_decode($data['mp3'],$ret);

        if (!empty($data['mp3_filename'])) {
            $fileName = $data['mp3_filename'];
            $newFile = $sound_dir.$fileName;
            unlink($newFile);
        }

            $isOK = false;
            while($isOK != true) {
                $fileName = getUniqueCode(8).".spx";
}
}
That fixed my problem and it works. that was the same bit of code in forums_posting and the private messages file.
lukjez
Registered User
Posts: 34
Joined: Sun Nov 01, 2009 10:51 pm

Re: [DEV] - Voice Forum 2.0

Post by lukjez »

Prbably I know what you did wrong. You did'nt insert all needed code to the files, only a part. This code have to look that:

Code: Select all

if (!empty($data['mp3'])) {
        $ret = '';
        $mp3 = base64_decode($data['mp3'],$ret);

        if (!empty($data['mp3_filename'])) {
            $fileName = $data['mp3_filename'];
            $newFile = $sound_dir.$fileName;
            unlink($newFile);
        }

            $isOK = false;
            while($isOK != true) {
                $fileName = getUniqueCode(8).".spx";

                $sql = "SELECT COUNT(p.post_id) AS num_posts".
                    " FROM ". POSTS_TABLE." as p LEFT JOIN "  . TOPICS_TABLE. " as t ON p.topic_id = t.topic_id ".
                    " WHERE p.post_sound_filename = '".$fileName."' OR t.post_sound_filename = '".$fileName."'";
                $result = $db->sql_query($sql);
                $posts_count = (int) $db->sql_fetchfield('num_posts');
                $db->sql_freeresult($result);

                $sql = "SELECT COUNT(pm.msg_id) AS num_posts".
                    " FROM ". PRIVMSGS_TABLE. " as pm".
                    " WHERE pm.post_sound_filename = '".$fileName."'";
                $result = $db->sql_query($sql);
                $posts_count2 = (int) $db->sql_fetchfield('num_posts');
                $db->sql_freeresult($result);

                if ($posts_count == 0 && $posts_count2==0) {
                    $isOK=true;
                }
            }
        $newFile = $sound_dir.$fileName;
        $fh = fopen($newFile, 'w') or die("can't open file");
        fwrite($fh, $mp3);
        fclose($fh);
        chmod($newFile, 0604);
        $filesize = filesize($newFile);
    }
    else {
        if (!empty($data['mp3_filename'])) {
            $fileName = $data['mp3_filename'];
            $newFile = $sound_dir.$fileName;
            $filesize = filesize($newFile);
        }
    }
gylippus
Registered User
Posts: 50
Joined: Mon Nov 12, 2007 1:53 am

Re: [DEV] - Voice Forum 2.0

Post by gylippus »

You are absolutely right, I didn't scroll down the entire way on that edit. Stupid error on my part. However, I fixed the edit and I am getting these two errors when I try to post. I notice that the second error is the same as draketornado above.

[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 1693: base64_decode() expects exactly 1 parameter, 2 given
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 1723: fopen(sound/1a7264c8.spx): failed to open stream: Permission denied
can't open file
lukjez
Registered User
Posts: 34
Joined: Sun Nov 01, 2009 10:51 pm

Re: [DEV] - Voice Forum 2.0

Post by lukjez »

gylippus wrote:You are absolutely right, I didn't scroll down the entire way on that edit. Stupid error on my part. However, I fixed the edit and I am getting these two errors when I try to post. I notice that the second error is the same as draketornado above.

[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 1693: base64_decode() expects exactly 1 parameter, 2 given
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 1723: fopen(sound/1a7264c8.spx): failed to open stream: Permission denied
can't open file
To resolve first problem try to use that code:

Code: Select all

$mp3 = base64_decode($data['mp3']);
To resolve second problem: I don't know why some people have this problem, and I can't help them. This is a devious access error. Mayby try to set acces right to directory 'sound' to 777, or/and create in this directory htaccess file with "Allow from all". I don't have more ideas :)
User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [DEV] - Voice Forum 2.0

Post by keith10456 »

In v2, is it possible via the ACP to only have it for PM's (disable in the Forum)?
Locked

Return to “[3.0.x] Abandoned MODs”