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
You are not logged in. Please login or register.
PunBB Forums → General discussion → Toying with another useless mod idea
The stylesheets for now. Unless you're finished with the email script, that would be great also.
Bingiman
No probs. I'll get those e-mailed over. Just to prewarn you, my CSS skills are about as good as my DB skills.
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. 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.
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. 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.
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
Which part is causing you the problem? Creating the db table or something else?
If I remember correctly it was the db table, but in general I was lost.
Now that I've set that standard test forum up, I'll chuck the code on there and see what it needs. 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.
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.
never mind. I am an idiot. I forgot that it is only present if I am a guest.
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?
never mind. I am an idiot. I forgot that it is only present if I am a guest.
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.
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
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.
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. Does it meet approval then?
Just regarding that download mod, are all your admin files still in the root directory, as is the default?
Yes, it definitely meets my approval.
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.
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.
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. I've just checked, and they're working on a standard PunBB now:
ok, I look forward to them.
Thanks Matt
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:
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.
You can get the MySQL out of the installer and run the MySQL in phpmyadmin.
I did..doesn't' work
Bugger. Forgot to reset the PUN_ROOT on that update script. Apologies. 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.
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.
PunBB Forums → General discussion → Toying with another useless mod idea
Powered by PunBB, supported by Informer Technologies, Inc.