You have an e-mail. big_smile

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/

1,103

(2 replies, posted in Programming)

Just wondering if I could ask a favour of someone? smile I'm not too sure what the MySQL syntax for this dbupdate script would be, so is there any chance someone might be able to convert this PgSQL syntax to MySQL?

Thanks ever so much in advance..... big_smile

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


Edit: Wasn't sure if programming was the correct forum for this, so my apologies in advance if it's not. smile

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

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

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

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

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.

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?

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

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

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

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

The e-mail script or the style sheets? big_smile

bingiman wrote:

Well, I have learned that there is no such thing as a 'five minute job' big_smile. I usually obsess by myself with whatever it is and 5 minutes turns into 5 days or more.

Glad to know I'm not alone in that then. big_smile


bingiman wrote:

Anyway, I hope to see it released soon so I can add it to Mega Pun 4.00

If it passes muster now, (I've added multiple recipient support btw, if you want to give it a try), I'll get it back ported to a standard PunBB setup. It also, (if an invalid syntax e-mail address is entered), lists the failed address(es) as well as the succesful one(s).


bingiman wrote:

btw: Is that theme on your forum designed specifically for you or is it available somewhere?

It's just one I've built up myself gradually over time. Found a colour scheme I was happy with and carried on from there. big_smile I can send you the CSS files if you want them, but there will be a lot of 'specific to forum' code to get rid of. big_smile

bingiman wrote:

Your account was approved. I just started manual activation to try and avoid certain people. big_smile

big_smile Cheers. smile Just realised that one thing it is lacking is multiple recipient support. I'll learn one day not to start on one of these 'five minute jobs'. big_smile

How does that look now Bingiman?

bingiman wrote:

http://www.phpfusion-themes.com/recommend.php

just a suggestion big_smile

I'll get that sorted. I tend to forget that things might not be as intuitive as they seem to I when people don't know how they work implicitly. big_smile Btw, any chance you could validate my account on your themes site? One needs to be logged in to see that page, it would appear. smile Have registered with the same username as on here. smile


Cheers.

bingiman wrote:

Well, all I see is this:

[..snipped..]

and everything is blank. Am I doing something wrong?

Apologies. Had a bit of kip so the mind is a tad sharper now. big_smile Realised what you meant previously. Nope. That's correct. Fill in the sender e-mail, recipient e-mail and name, and it'll send an e-mail containg that text, the topic link,  and whatever, (if any), message you entered added. smile Once you click submit, it prints an info screen to show what details have been sent, and then just check your e-mail inbox for the message. smile

bingiman wrote:

I guess you have to be logged in to see it?

Nope. big_smile I've put two icons there that you can access it via. In viewforum, at the side of each topic title, these icons/buttons fire up the script for the relevant topic:

http://forums.bauchan.org/testforum/images/buttons/elink.png

Or, when viewing a topic, this button at the top fires the script up for that topic:

http://forums.bauchan.org/testforum/images/buttons/sendelink.png

I'll pop the code up as soon as I'm happy that it's sorted. smile At the minute, I'm just trying to decide whether to make it so that only guest viewable topics are accepted by the script. If it's a thread that only registered members can access, should the e-mail be allowed, in the hope that the recipient will register to view it, if not already so? Or should it work on the guest viewable threads only principle?

bingiman wrote:

Hi Matt,

What about filling the message box automatically with the actual topic link. Something like: Bingiman's found this topics interesting and would like to share it with you..

Because that info is already in the message that is e-mailed to the recipient. big_smile


bingiman wrote:

It should also pull the member's email addy out of the DB as well and name.

Bingiman

It does pull the e-mail address from the db for a logged in user. The name, however, cannot be relied upon to exist or be realistic. That is a forcible requirement due to the fact that some muppets are over eager with the 'report/classify as spam' buttons on their webmail at the first sign of an e-mail or name they don't recognise. If users were truthful when they entered personal info, I would pull the name for logged in users, but unfortunately, we know they ain't. big_smile

The actual message that is received, (and no-one has obviously tried sending one with it), big_smile is like thus:

The following link was forwarded to you by a visitor at Testforum
[ http://forums.bauchan.org/testforum ]

Senders e-mail address: matt@example.com

Matt, who thought that you would be interested in viewing this topic:

Topic subject: Test post
Topic link: http://forums.bauchan.org/testforum/viewtopic.php?id=1

also added the following message:

Active link test



Please note the this email was initiated by Matt, and not by anyone directly associated with the running of this forum. We do not monitor these emails, nor can we be held responsible for any message or content forwarded by the sender.

We hope you enjoy the recommended page, and would like to mention that you can always access this forum directly at the following uri: http://forums.bauchan.org/testforum

1,122

(5 replies, posted in Programming)

Cheers. smile

1,123

(5 replies, posted in Programming)

Is this correct?

SELECT t.forum_id, f.cat_id, c.cat_name FROM punbb_topics AS t LEFT JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_categories AS c ON c.id=f.cat_id WHERE t.id=1;

My db skills are not exactly great, btw. big_smile



Thanks again,

Matt

1,124

(5 replies, posted in Programming)

I didn't think it was humanly possible to post a reply that fast. big_smile Cheers. smile

1,125

(5 replies, posted in Programming)

Just wondering if it's possible to adapt this query to grab the category in which the forum resides, without doing a second query separately?

$db->query('SELECT forum_id FROM '.$db->prefix.'topics WHERE id='.$topic_id)

Cheers,

Matt