Re: Toying with another useless mod idea

The stylesheets for now. Unless you're finished with the email script, that would be great also.

Bingiman

27

Re: Toying with another useless mod idea

No probs. I'll get those e-mailed over. smile Just to prewarn you, my CSS skills are about as good as my DB skills. big_smile

The e-mail script is up and running now. Have just copied it over to a standard PunBB install to give it a try, and it appears to be working a treat, so I'll get that uploaded shortly. smile This is the test forum I've just popped it onto:

http://forums.bauchan.org/punbb/email_topic.php?tid=1

That link takes you straight to the script, as there's only the standard install topic on that forum. big_smile

28 (edited by MattF 2007-12-23 03:43)

Re: Toying with another useless mod idea

I've uploaded the script: http://forums.bauchan.org/unix/viewdownloads.php?dcid=1

It uses Mediator's captcha mod for the captcha image, which I've tarred up with the scripts just for the sake of ease. His code is obviously GPL and not BSD, however. smile Just copy the email_topic.php and the captcha directory to the root forum directory, the lang file to the lang/English directory, and then link to the script via the ./email_topic.php?tid=[topic id selected] method. I've tested it as much as possible, but if anyone finds any problems with it, just give me a shout. smile

Re: Toying with another useless mod idea

Thanks Matt.

btw: I still never got that download mod to work. The one you coded. I don't have any realy mysql or php experience so I got lost after trying it 3 times today. Will you eventually make an install script for it?

Bingiman

30

Re: Toying with another useless mod idea

Which part is causing you the problem? Creating the db table or something else?

Re: Toying with another useless mod idea

If I remember correctly it was the db table, but in general I was lost.

32

Re: Toying with another useless mod idea

Now that I've set that standard test forum up, I'll chuck the code on there and see what it needs. smile With regards to the db table, pop that code in the programming forum and see if someone may be kind enough to do the deed of converting the table to MySQL syntax. I must admit, I'm not too familiar with MySQL semantics myself. big_smile

Re: Toying with another useless mod idea

Hey Matt,

I don't see the captcha image on my version of the email script. It should work on my local machine because I also use it for the registration form.

Re: Toying with another useless mod idea

never mind. I am an idiot. I forgot that it is only present if I am a guest.

35

Re: Toying with another useless mod idea

You have copied the captcha folder across with the contents intact to the root dir? Does the httpd user have read permissions on that folder and its contents?

36

Re: Toying with another useless mod idea

bingiman wrote:

never mind. I am an idiot. I forgot that it is only present if I am a guest.

big_smile big_smile big_smile

Btw, you can disable the captcha and guest use of the script if you desire with two variables near the top of the script.

$usecaptcha = '1';
$allow_guest = '1';

Setting those to 0, (zero), will disable the respective portion.

37 (edited by bingiman 2007-12-23 04:39)

Re: Toying with another useless mod idea

ok, cool. I actually don't need the captcha folder because I am already using it for the registration and the files reside in the root. Anyway, I also had to change the link forum.php to index.php for the "back to index link". Other than that, it works great!

Thanks
Bingiman

38

Re: Toying with another useless mod idea

If you already have the captcha files, just change this line:

<img src="<?php echo $forumuri ?>captcha/ran.php" alt="verification text image"/><br/>

to:

<img src="<?php echo $forumuri ?>ran.php" alt="verification text image"/><br/>

That'll use the files you already have there in the root dir. smile

39

Re: Toying with another useless mod idea

bingiman wrote:

Anyway, I also had to change the link forum.php to index.php for the "back to index link". Other than that, it works great!

Aye. That's just due to me having the sub forum mod. big_smile Does it meet approval then? big_smile

40 (edited by MattF 2007-12-23 05:19)

Re: Toying with another useless mod idea

Just regarding that download mod, are all your admin files still in the root directory, as is the default?

Re: Toying with another useless mod idea

Yes, it definitely meets my approval. big_smile

As for the download mod. I copied all the files to the required folders but I never found out what to run in phpmyadmin to create the tables. Can you tell me? I am sure that's all I need to do.

42 (edited by MattF 2007-12-23 13:28)

Re: Toying with another useless mod idea

With the tables, I'm honestly not sure. I've never diddled with MySQL as such, so not sure what the syntax is. I'll pop the code up here and see if someone can convert it to Mysql and tell you what you need to do. smile

Edit: Btw, I've just redone those files, as I think I made some minor alterations to some of them after sending you them last time, so I'll get the new ones sent through. smile I've just checked, and they're working on a standard PunBB now:

http://forums.bauchan.org/punbb/downloads.php

Re: Toying with another useless mod idea

ok, I look forward to them.

Thanks Matt big_smile

44 (edited by MattF 2007-12-23 14:15)

Re: Toying with another useless mod idea

This directory contains an unmodified and modifed common_admin file, so that you can see the changes required for that file. I've also done a diff of the two, which is the common_admin.patch file:

http://outgoing.bauchan.org/unix/download_mod/

45

Re: Toying with another useless mod idea

You have an e-mail. big_smile

46 (edited by bingiman 2007-12-23 20:54)

Re: Toying with another useless mod idea

Well Matt, I've tried and tried to run the dbupdate script and I can't get it to work. I don't know how it works for you but not for me. I finally managed to change this area:

// Circumvent maintenance mode
define('PUN_TURN_OFF_MAINT', 1);
define('PUN_ROOT', './');
require $pun_root.'include/common.php';

// We want the complete error message if the script fails
if (!defined('PUN_DEBUG'))
    define('PUN_DEBUG', 1);

Yours for some reason didn't work, but at least this takes me to the actual screen when I can click on install. When I do click on install I get the following:

An error was encountered
File:
Line:

PunBB reported: Unable to insert into table pundownload_cats. Please check your configuration and try again.

47 (edited by FSX 2007-12-23 21:03)

Re: Toying with another useless mod idea

You can get the MySQL out of the installer and run the MySQL in phpmyadmin.

Re: Toying with another useless mod idea

I did..doesn't' work

49

Re: Toying with another useless mod idea

Bugger. Forgot to reset the PUN_ROOT on that update script. big_smile Apologies. smile Until the syntax is converted to MySQL rather than PgSQL syntax, the table creation won't work. I'll just repost the link to that dbupdate file if anyone is feeling in a kindhearted converting mood. big_smile

http://outgoing.bauchan.org/unix/downlo … update.txt

50 (edited by MattF 2007-12-23 23:19)

Re: Toying with another useless mod idea

Just had a look at install.php, to try and get an idea of the syntax. Change those create table statements to this:

        $db->query("CREATE TABLE ".$db_prefix."download_cats (
        cid INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
        cat_name VARCHAR(80) NOT NULL DEFAULT 'New Category',
        cat_desc TEXT,
        total_files INT NOT NULL DEFAULT 0,
        disp_position INT AUTO_INCREMENT,
        PRIMARY KEY (cid)
        ) TYPE=MyISAM;");

    $db->query("CREATE TABLE ".$db_prefix."downloads (
        download_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
        download_name VARCHAR(80) NOT NULL DEFAULT 'New Download',
        download_desc TEXT,
        cat_id INT NOT NULL DEFAULT 0,
        download_uri VARCHAR(150),
        file_location VARCHAR(150),
        download_count INT NOT NULL DEFAULT 0,
        file_size VARCHAR(25),
        file_version VARCHAR(25),
        file_licence VARCHAR(100),
        file_os_types VARCHAR(100),
        date_added VARCHAR(25),
        link_status VARCHAR(8),
        PRIMARY KEY (download_id)
        ) TYPE=MyISAM;");

I haven't tested this, obviously, but I *think* that should work. smile