what I mean is, when someone is subscribed to a topic and have the "include message" enabled,  any BBCode that was in the post is in the e-mail...  Is this right? or did I screw something up with my code mods...

isn't it possible to strip out the BBcode during the e-mail process?

Is the BBcode in posts supposed to show up when subscription e-mails are sent that include the message?  (the code itself, not the effect)

Seems a little odd and makes it hard to read...

Ok, so first off you have to read this topic.

Is there any way to have new members subscribed to a forum by default when they register?

I haven't really thought through the registration process yet (code-wise), but I'm thinking that maybe adding them to the forum subscription table during registration?

Basically, I want everyone to be automatically subscribed to my 'Announcements' forum unless they specifically choose not to be.

Thoughts?

I've added a second DL link since the PunRes DL doesn't seem to be working...

30

(2 replies, posted in General discussion)

That's what I thought... but I thought I should check!

31

(2 replies, posted in General discussion)

Can someone explain the Kennel thing?  Seems to refer to Rickard most of the time...  A nickname, perhaps?

Cailean wrote:

1) Mail Templates
I basically copied and modified reply_topic.tpl and reply_topic_full.tpl and renamed them new_topic.tpl and new_topic_full.tpl.
How do I go about adding 'forum_name' to the new templates?

2) $is_subscribed
I have hit a brick wall on setting $is_subscribed in viewforum.php.  I've tried transplanting some queries from viewtopic but nothing I try seems to work.  (the subscription itself works but it always says "Subscribe to this forum" even if you already are!)

I'd really like to solve these two issues so I can release this as a Mod...  perhaps I need to explain the problems more clearly...

1)Mail Templates
My new_topic.tpl look like this:

Subject: New topic: <topic_subject> in a subscribed forum.

<replier> has created a topic <topic_subject> in a forum to which you are subscribed.

The post is located at <post_url>

You can unsubscribe by going to <unsubscribe_url>

-- 
<board_mailer>
(Do not reply to this message)

I would like to be able to identify the forum in which the topic was created.

2)$is_subscribed
This is severely annoying...  I'm not sure how to explain this better...  basically, I transplanted the code from viewtopic.php that displays either 'Subscribe to this topic' or 'You are subscribed to this topic - Unsubscribe' changing 'topic' to 'forum'.  Unfortunately it always displays the first option, even if you are subscribed!  I'm sure ut has to do with the $is_subscribed reference but since I don't understand fully how it works, I can't debug it... sad

33

(8 replies, posted in PunBB 1.2 troubleshooting)

yeah, I grabbed the source after posting...  thanks anyway!

well, my first thought would be to determine if it's a 'subscribe' problem or an 'email' problem...  try sending a normal email to yourself through the form-mail... if that doesn't work then your problem is with 'email' not 'subscribe'.

oh, ok.  I had just used (10) because that was what most of the other ID fields in the other tables (topics, etc) use.

The ZIP and readme have been updated at PunRes.

Thanks Jansson.. I'll add it to the .zip and update the readme when I have a chance..

EDIT: just looked at the install script....  wondered why id is int(255) instead of int(10)

excellent!!  Works like a charm!  If only my web-host support guys were so helpful!!!

Thanks, again.

ok, I'll try it...  but just so I understand what's happening:

the first line looks for the '@musicamp.ca' and if it's there the second line replaces '@' with '%' and tacks on '@dpmail', etc.

should work!!

my e-mail address as forum admin is 'forum_admin@musicamp.ca' but my web-host requires that it be formatted as 'forum_admin%musicamp.ca@dpmail05.doteasy.com' because it's being sent within the server (at least I think that's why...)
I don't know what PHP's text manipulation features are but it would something along the lines of:

when emailing...
if an address contains '@musicamp.ca', cut that and replace it with '%musicamp.ca@dpmail05.doteasy.com' before sending.

Is something like this possible?

40

(8 replies, posted in PunBB 1.2 troubleshooting)

I get the editing the .tpl file but how do you get it aligned to the right on the same line as the nav-bar?
As it is now I have a link right-aligned on the line between the nav and the status line using <p>.

Fair enough...  Any thoughts on the problem?

I put it in troubleshooting because I figured it was a fairly unique problem.  I tend to think of Mods as things that everyone might use.  Your forum, your call! wink

Okay here's my problem... according to my web-host, e-mails sent WITHIN my domain must be formatted a certain way for them to be sent (i.e.  user%mydomain.com@hostdomain.com)

Obviously, I ran into trouble with the forum because I can't use the same domain for e-mails as I use for the forum... follow so far?

As workaround, my host suggests entering the special format in profiles of members from my domain.  This works but is annoying a) some of my members with my domain addresses aren't very techie and ar easily confused...  b) the addresses are displayed to all forum users in the special format.

What I need...
Special code (in email.php, I presume) to automatically check for a specific domain and reformat the address appropriately.

alternatively, some code to display addresses from a specific domain differently (this is presumably easier but less helpful because my users would still have to know the special format.)

FAQ Mod v1.0 released!!!

##
##        Mod title:  FAQ Mod
##
##      Mod version:  1
##   Works on PunBB:  1.1.2
##     Release date:  2004-03-18
##           Author:  Colin Carmichael (colin.carmichael@sympatico.ca)
##
##      Description:  This Mod adds a fully-customizable FAQ page that is
##                    managed through the admin panel.  Add/delete/edit/reorder
##                    questions and answers to suit your changing needs!
##
##   Affected files:  common_admin.php
##                    functions.php
##                    en_common.php
##
##       Affects DB:  Yes
##
##            Notes: *****IMPORTANT*****
##                    
##                    Before uploading faq.php you MUST do the following...
##                    
##                    1) Create a topic in your forum where users can can
##                       ask questions to be answered/added to the FAQ
##                    
##                    2) Open faq.php... find line:40... change URL to
##                       reflect the URL of your new topic.
##                    
##                    OPTIONS:
##                    1) If you do not want moderators to edit the FAQ, ignore
##                    steps 8 & 9. (They could still do it by manually entering
##                    the URL, but if you can't trust your mods....)
##                    
##                    2) I have removed the set relative widths for the admin
##                    nav bar to make room for the FAQ link (steps 8 & 9). You 
##                    could, alternatively, just add the FAQ line and manually 
##                    adjust the widths of the rest.
##                    
##                    ::::::::::::::::::::::::::::::::::::::::::::::::::::::
##                    This is my first Mod... If there are errors please be
##                    kind! Thanks to MarcB and Rickard for their help! 
##                    Thanks to Jansson for the install_mod script!
##                    ::::::::::::::::::::::::::::::::::::::::::::::::::::::
##
##                    Generated with ModGenerator (http://modgen.cactuz.nu/)
##                    on: 2004-03-18 17:18:28
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

The mod can be downloaded from Punres here: FAQ Mod
or directly here: FAQ Mod

EDIT:  [DONE]If someone wants to create an install_mod.php for me I'll include it...  my DB skills are sorely lacking!![/DONE]  Thanks, Jansson

I just 'Refresh' and then 'Retry' when the alert box (resend info) comes up...

SUCCESS!!!!!!

sorry 'bout the confusion but it's working now as expected!!

Thanks a ton for your help, MarcB!!!
Stay tuned for a MOD release....

Well, progress, I think...

As you can see in the code below...
I changed the while statement as you suggested (correcting for the round bracket ending up on the next line...)
I also commented out the first list statement since it was not in your code...

// Fetch some info from the faq
$result = $db->query('SELECT faq_name, question, answer, disp_position FROM '.$db->prefix.'faq ORDER BY disp_position') or error('Unable to fetch faq info', __FILE__, __LINE__, $db->error());
if (!$db->num_rows($result))
    message($lang_common['Bad request'], true);

//list($faq_name, $question, $answer, $disp_position) = $db->fetch_row($result);


if ($db->num_rows($result))
{
    while (list($id, $faq_name, $question, $answer, $disp_position) = $db->fetch_row($result))
    {
    list($faq_name, $question, $answer, $disp_position) = $db->fetch_row($result);
?>    

    <tr>
        <td class="puncon1" style="width: 25%; vertical-align: top" ><p style="margin-bottom: 0"><b><?php echo $lang_faq['question'].$disp_position.'</p><p style="margin-left: 10px; margin-top: 5px; margin-bottom: 5px"></b>'.$question ?></p></td>
        <td class="puncon2" style="vertical-align: top"><p style="margin-bottom: 0"><b><?php echo $lang_faq['answer'].'</b></p><p style="margin-left: 10px; margin-top: 5px; margin-bottom: 5px">'.$answer ?></p></td>
    </tr>

<?php    
        }
}
else    
    echo "\t".'<tr><td class="puncon1" colspan="6">'.$lang_faq['Empty FAQ'].'</td></tr>'."\n";

?>

I now get record #2 only and a blank record. (there should be 3 records.)
I didn't really understand what you said about this in your last post, could you clarify it for me?

I really appreciate your help on this!!!

did some more messing around with the code (you're all cringing, aren't you!)
Anyway, the updated code is above and I'm only getting the first record which means that it's not looping, right?  well, that probably has to do with the fact that $id is undefined (as Rickard noted). You'll see that I've commented out Rickard's suggestion because it was causing the Bad Request because there is no value for 'Get' to get.

edit:
actually, I get the last record...

Thanks MarcB, that helped...
{updated above code, again}

but if it ain't one thing.... it's something else!!

now I only get the last record (as determined by dips_position) if a change the order in the admin_faq, the displayed record changes appropriately...  I suspect I need to reset the array or something like that?  I'm going to poke around the other files and see what I find. (It's kinda like a scavenger hunt!)