<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Phorum Support Forums - 5.1 Phorum Hacks</title>
        <description>Hacks are additions that require changes to the core Phorum code. While there is nothing wrong with a hack, it is recommend that you try and create a module if at all possible, as modules are easier to use for other people.</description>
        <link>https://www.phorum.org/support/list.php?18</link>
        <lastBuildDate>Sat, 08 Aug 2026 07:38:25 -0500</lastBuildDate>
        <generator>Phorum 6.0.4</generator>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,155498,155498#msg-155498</guid>
            <title>5.1 Archive or Download (1 reply)</title>
            <link>https://www.phorum.org/support/read.php?18,155498,155498#msg-155498</link>
            <description><![CDATA[ Hello,<br />
<br />
I&#039;m new to the Phorums but I am a member of a 5.1 phorum with much information I wish to save.  As a member, is there a way I can &quot;download&quot; or archive the phorum to save the threads and attachments?  Unfortunately, the forum administrator has passed away and there does not seem to be anyone that will carry it on.  I&#039;m trying to save the information and keep it alive.  I&#039;m trying to contact the family to see if there is any way to take over, but it may be hard.  Thanks for any help!<br />
<br />
Jared]]></description>
            <dc:creator>jschoenly</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Mon, 10 Nov 2014 11:40:12 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,152452,152452#msg-152452</guid>
            <title>Creating mod/hack for PM system. (no replies)</title>
            <link>https://www.phorum.org/support/read.php?18,152452,152452#msg-152452</link>
            <description><![CDATA[ I have created a new form that loads from a button I&#039;ve added to the read.tpl file. This works great. Now that form posts data into the pm.php file. The the new variables load, but I get the &quot;Possible Hack attempted detected&quot;. Is there some place to declare these new variables that will stop this? Thank you!]]></description>
            <dc:creator>PRICECHR</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Tue, 30 Oct 2012 17:12:16 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,141058,141058#msg-141058</guid>
            <title>Chat sidebar (get me out of frames!!) (4 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,141058,141058#msg-141058</link>
            <description><![CDATA[ Currently I have the forum and a chat window in separate vertical frames (see attached picture).  Although I dont enjoy using frames, it allows a user to browse the forums while chatting in the same window quite easily.  However, the URL never changes due to the frameset.  With a forum having the current page link at hand is a requirement.<br />
<br />
My question is, is there a way to integrate the chat into the page so that the URL in the top bar is always correct?  would it make the applet reload each page load?  I suppose I could even settle for a text box with the current forum URL in it or a &#039;breakout&#039; link in my template that would remove the chat frame.  Currently the &quot;I dont like chatz&#039; link above the chat box accomplishes this, but it only redirects to the root folder of the forum.<br />
<br />
Any idea&#039;s that would make this page run smoother would be greatly appreciated!]]></description>
            <dc:creator>b00radley</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Mon, 05 Oct 2009 16:47:52 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,133359,133359#msg-133359</guid>
            <title>phorum_get_url and most read threads (2 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,133359,133359#msg-133359</link>
            <description><![CDATA[ hi there,<br />
<br />
i&#039;ve set up a custom phorums start page, showing some news an all forums an their last 5 recent messages.<br />
how do i get a clean PHORUM_READ_URL on a single message_id?<br />
<br />
my 2nd question is , how to get a list of the 10 or n most viewed threads or posts?<br />
<br />
thx very much<br />
<br />
sorry, wrong board, i&#039;m running 5.2]]></description>
            <dc:creator>Artaud</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Tue, 23 Sep 2008 05:12:22 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,129791,129791#msg-129791</guid>
            <title>How to edit register form (4 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,129791,129791#msg-129791</link>
            <description><![CDATA[ Hi guys, for first sorry for my english.<br />
<br />
I&#039;ve got a simple question for you: is it possible to edit the register form adding some input fields like:<br />
<br />
- date of birth<br />
- job<br />
- city/town<br />
- etc.<br />
<br />
How can i do this?<br />
<br />
Thanks.]]></description>
            <dc:creator>yuri80</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Wed, 30 Apr 2008 02:34:34 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,126346,126346#msg-126346</guid>
            <title>Using Phorum logins (5 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,126346,126346#msg-126346</link>
            <description><![CDATA[ I use the following method of requiring phorum logins on my site in several places:<br />
<br />
<pre class="bbcode">
$pwd = getcwd();
chdir(&quot;../forum&quot;);
define(&#039;phorum_page&#039;, &#039;my_page&#039;);
include_once(&quot;./common.php&quot;); 
phorum_require_login();
chdir($pwd);
unset($pwd);
echo &quot;hi &quot;,$PHORUM[&quot;user&quot;][&quot;username&quot;];</pre>
<br />
<br />
It works as long as the person is already logged into the forum.  I have problems though when they access a page in another directory without being logged in: <br />
<br />
It tries to redirect them to login.php in the wrong directory. (thus giving a 404 error)<br />
<br />
Any advice?]]></description>
            <dc:creator>Steve H</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Fri, 28 Dec 2007 11:35:40 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,125386,125386#msg-125386</guid>
            <title>Converters (4 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,125386,125386#msg-125386</link>
            <description><![CDATA[ Are there any converters around? :)]]></description>
            <dc:creator>shadow82x</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Fri, 16 Nov 2007 02:42:23 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,125067,125067#msg-125067</guid>
            <title>User-Tracking on whole site (8 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,125067,125067#msg-125067</link>
            <description><![CDATA[ HI together,<br />
<br />
I&#039;m searching for a hack, that tracks user-activity over the whole page.<br />
<br />
At our site Phorum is embedded into a sort of community-page with much more content, than just the Phorum. Now, i want to track the user-activity, also if a user doesn&#039;t uses the forum. Anyone know a snipped for this case?<br />
<br />
Thank you<br />
Sun]]></description>
            <dc:creator>Sunbringer</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Mon, 05 Nov 2007 14:39:03 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,124272,124272#msg-124272</guid>
            <title>display new pm in header.tpl (3 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,124272,124272#msg-124272</link>
            <description><![CDATA[ hello phorum community!<br />
<br />
i have added some forum menus to the header of my website, and im having some difficulty displaying if a user has &quot;new&quot; private messages.<br />
<br />
i have added the code<br />
<br />
<pre class="bbcode">{LOOP PM_FOLDERS}{/IF}{IF PM_FOLDERS-&gt;new} ({PM_FOLDERS-&gt;new} {LANG-&gt;newflag}){/IF} {/LOOP PM_FOLDERS}</pre> to the end of the &quot;private messages&quot; menu item, however it only seems to work in the browser when we are on the pm.php page.<br />
<br />
what do i have to include in my header.tpl so this information will display as soon as the user logs in?<br />
<br />
many thanks for your time!]]></description>
            <dc:creator>artisites</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Fri, 14 Sep 2007 10:27:16 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,124265,124265#msg-124265</guid>
            <title>Tagger Hack: Retrieving threads from db (13 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,124265,124265#msg-124265</link>
            <description><![CDATA[ I am currently working on a &quot;tagger&quot; mod/hack for Phorum that will enable users/admins to &quot;tag&quot; posts, search for posts with certain tags, and generate &quot;tag clouds&quot;, ala del.icio.us. It&#039;s a project primarily for my own needs, but if someone else finds it useful, good for them.<br />
<br />
I have managed to bang out a working (albeit private) prototype, but I&#039;m not happy with some of the hacks/patches I&#039;ve needed to make to the source code. The biggest problem involves alterations to the DB handling functions.<br />
<br />
In order to allow users to filter threads by tags, I&#039;d like to overload behavior on the List page. However, the list hook gets to the threads too late: I need to modify the SQL itself that is being used to retrieve the threads (I&#039;m doing some fancy table joins and other things in order to retrieve the tags I want). As of right now, I&#039;ve added in code that injects this extra SQL into the statement generated at phorum_db_get_thread_list(), detecting a &quot;tag&quot; get parameter.<br />
<br />
It is, consequently, extremely messy, and not very forwards compatible. Is there a better way of doing this, or should I just bite my lip and press forward? Also, why do functions defined by modules not seem to be callable from the DB processor?]]></description>
            <dc:creator>Ambush Commander</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Thu, 13 Sep 2007 12:49:19 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,124165,124165#msg-124165</guid>
            <title>Simple piece of php fits nicely into phorum (no replies)</title>
            <link>https://www.phorum.org/support/read.php?18,124165,124165#msg-124165</link>
            <description><![CDATA[ I am not expert with PHP, but I am learning!<br />
<br />
I implemented basic, but fun piece of code on my site to greet people (Good Evening/Afternoon/Morning/ and Late Shift). If you could benefit from this code on your phorum sites, use it and enjoy it:<br />
<br />
<pre class="bbcode">
&lt;?

$afternoon = &quot;Good afternoon! blablablah&quot;;
$evening = &quot;Good evening! blablablah&quot;;
$late = &quot;Glad to see you so late! blahblahblah&quot;;
$morning = &quot;Good morning! blahblahblah&quot;;

//Get the current hour
$current_time = date(G);

// between 12:00 p.m. and 4:00 p.m.
if ($current_time &gt;= 12 &amp;&amp; $current_time &lt;= 16) {
echo $afternoon;
} 
// between 5:00 p.m. and 11:00 p.m.
elseif ($current_time &gt;= 17 &amp;&amp; $current_time &lt;= 24) {
echo $evening;
}
// between midnight and 5:00 a.m.
elseif ($current_time &gt;= 1 &amp;&amp; $current_time &lt;= 5) { 
echo $late;
}
// between 6:00 a.m. and 11:00 a.m.
elseif ($current_time &gt;= 6 &amp;&amp; $current_time &lt;= 11) { 
echo $morning;
}

?&gt;
</pre>]]></description>
            <dc:creator>Danielus</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Sat, 01 Sep 2007 01:08:47 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,122731,122731#msg-122731</guid>
            <title>Alternatives to hacking format_messages() (2 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,122731,122731#msg-122731</link>
            <description><![CDATA[ Hi, I would like to write a module that enables <a href="http://htmlpurifier.org/" target="_blank"  rel="nofollow">HTML Purifier</a> on Phorum posts. After doing some initial work, I have come up with two primary problems with enabling HTML in Phorum posts:<br />
<br />
* Phorum performs too much data cleaning in phorum_format_messages() that cannot be turned off. It does me no good if I get fully escaped input when my format hook finally gets to take a whack at it. I need some way to stop this from happening without editing the file.<br />
<br />
* I need to add a second, &quot;message_cache&quot; field to the database, because it is prohibitively expensive to be running HTML Purifier continually on post data. While the form of the $messages array makes it easy to piggy-back another table field off of, during the installation process how would an extra table row be configured?<br />
<br />
The second question is simply a matter of convention: does Phorum have any facilities in place for mods that need to make DB schema changes, and are there any recommendations on how to make sure said changes are as compatible as possible.<br />
<br />
The first question, I have a few ideas on how this might be worked around. Because I&#039;m caching the fully filtered/formatted output, and that will be in the $messages array, I could cunningly swap in the cached data into [&#039;body&#039;] when my format hook gets called, and hope hard as hell that the post-cleanup format operations don&#039;t do anything too silly to my HTML (phorum break stuff seems innocuous enough). There is no post-format hook, which really ties my hands. Also, I&#039;m not sure this will work very well for preview (although the posting_custom_action hook might save the day), since there will be no cached data to cunningly swap in to begin with! (And there might be other actions that also use format_messages in this manner, it seems that list.php, pm.php, report.php and search.php are subject: is the $messages array coming from the database or the user? Questions, questions!)<br />
<br />
P.S. If this module is successfully written, it means that WYSIWYG editors can be fully integrated with Phorum with no problem at all. :-)]]></description>
            <dc:creator>Ambush Commander</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Wed, 27 Jun 2007 22:41:27 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,122371,122371#msg-122371</guid>
            <title>HotEditor WYSIWYG Hack for Phorum 5.1.x (11 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,122371,122371#msg-122371</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong></strong><br />
##############################################################<br />
## MOD Title: WYSIWYG - Rich Text Editor for posting HTML message<br />
## MOD Author: eCardMAX.com &lt; <a href="mailto:&#119;&#101;&#98;&#109;&#97;&#115;&#116;&#101;&#114;&#64;&#101;&#99;&#97;&#114;&#100;&#109;&#97;&#120;&#46;&#99;&#111;&#109;">&#119;&#101;&#98;&#109;&#97;&#115;&#116;&#101;&#114;&#64;&#101;&#99;&#97;&#114;&#100;&#109;&#97;&#120;&#46;&#99;&#111;&#109;</a> &gt; (Jimbo Hong) [<a href="http://ecardmax.com" target="_blank"  rel="nofollow">ecardmax.com</a>]<br />
## MOD Description: It&#039;s time to turn &lt;textarea&gt; into a powerful Rich Text HTML Editor. Don&#039;t force your users to learn another set of markup tags. With this MOD you can format your posts or Private message just like you would in MS. FrontPage! Our Rich Text Editor will work on all popular browsers such as: IE - FireFox - Netscape - Opera 9x - Safari<br />
## MOD Version: 4.2 for phorum 5.1.22<br />
##<br />
## Installation Level: (Easy)<br />
## Installation Time:  5 ~ 10 Minutes<br />
## Files To Edit: <br />
##	include/format_functions.php<br />
##	mods/bbcode/bbcode.php<br />
##	mods/editor_tools/smileys_panel.php<br />
##	templates/default/posting.tpl<br />
##	templates/default/cc_usersettings.tpl<br />
##	templates/default/pm_post.tpl<br />
##	templates/default/posting_messageform.tpl<br />
##<br />
## Included Files: 0<br />
##	<br />
## Included Folders: [richedit]<br />
## License: [<a href="http://opensource.org/licenses/gpl-license.php" target="_blank"  rel="nofollow">opensource.org</a>] GNU General Public License v2<br />
##############################################################<br />
## For security purposes, please check: [<a href="http://www.phorum.org/" target="_blank" >www.phorum.org</a>]<br />
## for the latest version of this MOD. Although MODs are checked<br />
## before being allowed in the MODs Database there is no guarantee<br />
## that there are no security problems within the MOD. No support<br />
## will be given for MODs not found within the MODs Database which<br />
## can be found at [<a href="http://www.phorum.org/" target="_blank" >www.phorum.org</a>]<br />
##############################################################<br />
## Author Notes:<br />
##<br />
## Upload folder [richedit] to phpbb main (root) folder (same location with file admin.php)<br />
##<br />
##############################################################<br />
## MOD History:<br />
##<br />
##   2007-06-07 - Version 4.2<br />
##<br />
##############################################################<br />
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD<br />
##############################################################</div></blockquote>
<br />
It&#039;s time to turn &lt;textarea&gt; into a powerful Rich Text HTML Editor. Don&#039;t force your users to learn another set of markup tags. With this MOD you can format your posts or Private message just like you would in MS. Word! Our Rich Text Editor will work on all popular browsers such as: IE - FireFox - Netscape - Opera 9x - Safari<br />
<br />
<img src="http://www.ecardmax.com/templates/Main/hoteditor_screenshot_small.gif" class="bbcode" border="0" /><br />
<br />
NOTE: This Hoteditor will output BBCode instead of HTML code like other WYSIWYG, so your forum will be safe to install this hack.<br />
<br />
Phorum &amp; HotEditor DEMO<br />
[<a href="http://www.ecardmax.com/hoteditor_forums/phorum/" target="_blank"  rel="nofollow">www.ecardmax.com</a>]<br />
<br />
Information &amp; Download<br />
[<a href="http://www.ecardmax.com/index.php?step=Hoteditor2Phorum" target="_blank"  rel="nofollow">www.ecardmax.com</a>]<br />
<br />
Hope this help and good luck with you&#039;re all.<br />
<br />
Jim]]></description>
            <dc:creator>eCardMAX.com</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Mon, 27 Aug 2007 16:03:43 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,120285,120285#msg-120285</guid>
            <title>All-in-one Search with additional subject search (no replies)</title>
            <link>https://www.phorum.org/support/read.php?18,120285,120285#msg-120285</link>
            <description><![CDATA[ and backward compatibility to subject search links from 5.0.x search function.<br />
<br />
A search function hack which extends the match_type to &quot;subject&quot;.<br />
Old 5.0.x search-links with &quot;subject=1&quot; are recognized, too.<br />
<br />
The search.tpl is modified to one search field again, the match_type is simply extended.<br />
<br />
mysql.php and search.php had to be modified, too.<br />
<br />
This is not thouroughly tested and just a quick&amp;dirty attempt.<br />
More an inspiration than a solution, though it solves my problem with fine-tuned, subject specific searches.<br />
<br />
regards<br />
<br />
Orinoco]]></description>
            <dc:creator>orinoco</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Tue, 13 Feb 2007 18:35:53 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,120022,120022#msg-120022</guid>
            <title>Ajax template hack to preview messages in a popup (no replies)</title>
            <link>https://www.phorum.org/support/read.php?18,120022,120022#msg-120022</link>
            <description><![CDATA[ Phorum hackers may be interested in this if they haven&#039;t noticed this thread:<br />
<span style="font-size:large"><a href="http://www.phorum.org/phorum5/read.php?21,120021" target="_blank" >Ajax &quot;last post&quot; preview now working in a Phorum template</a></span><br />
<br />
<b>[Brian, could you please close this thread? - /\dam]</b>]]></description>
            <dc:creator>sheik</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Mon, 05 Feb 2007 09:59:02 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,119572,119572#msg-119572</guid>
            <title>insert pre-defined row after every x message on listing page (2 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,119572,119572#msg-119572</link>
            <description><![CDATA[ Similar to <a href="http://www.phorum.org/phorum5/read.php?16,53385,53385" target="_blank" >this post</a> I would like to make every x row on the messages list page contain some predefined text. e.g. after ever 10 messgaes i could show a row that says &quot;register and receive benefits...&quot; or I could place in some some PHPadsnew code.<br />
<br />
Please could someone tell me how to do this if possible?<br />
<br />
thanks<br />
<br />
Mark]]></description>
            <dc:creator>Mark Fresh</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Mon, 26 Feb 2007 15:10:19 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,119347,119347#msg-119347</guid>
            <title>Time_ago module + hack (4 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,119347,119347#msg-119347</link>
            <description><![CDATA[ Hi, I&#039;ve written a little module which changes the display of timestamps to the form &#039;X units ago&#039; (&#039;5 seconds ago&#039;, &#039;1 hour ago&#039;, etc.), which I think is generally a friendlier way to display them. It needs the following hack to work:<br />
<br />
after<br />
<pre class="bbcode">
function phorum_date( $picture, $ts )
{</pre>
in format_functions.php<br />
insert<br />
<pre class="bbcode">
	if(defined(&#039;PHORUM_MOD_TIME_AGO&#039;)) {
		return phorum_time_ago($ts);
	}</pre>
The attached module contains the rest of the code, which is pretty straightforward if not exactly elegant.]]></description>
            <dc:creator>alfaguru</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Mon, 08 Jan 2007 15:23:22 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,119220,119220#msg-119220</guid>
            <title>speed problem (4 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,119220,119220#msg-119220</link>
            <description><![CDATA[ Hello,<br />
i have wrote a hack to display the messages of all forums running in my phorum program in a same page. It&#039;s an adaptation of list.php. You can see it functioning here: [<a href="http://les-mathematiques.u-strasbg.fr/phorum5/list_new.php" target="_blank"  rel="nofollow">les-mathematiques.u-strasbg.fr</a>]. But i have a speed problem. The list.php is very quick to run but my list_new.php is very slow. Could it be a cache problem? I send my list_new.php with this message.<br />
Thank&#039;s in advance for your answer (and sorry about my english...)<br />
Emmanuel Vieillard Baron]]></description>
            <dc:creator>manuvb</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Fri, 05 Jan 2007 15:11:09 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,118708,118708#msg-118708</guid>
            <title>Return-Path mail header (2 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,118708,118708#msg-118708</link>
            <description><![CDATA[ You might need to add a return-path mail header to trouble shoot bounced emails. If you find a lot of pending approvals that are old, some might be there because the user never received the activation email. There could be a few reasons for this. In my case the outgoing mail server did not have reverse DNS lookup, so some ISPs rejected the emails. The hosting folks fixed the problem.<br />
<br />
The mail failure notice is sent to the address in the mails return-path header. Have phorum send you an email and look at the headers (email reader should have a view headers all someplace). If you have access to the indicated email no problem. But you might be on a shared server and the return path might be set to something like root @yourserver.xxx . <br />
<br />
If you think you have bounced email and you cannot read or get the failure notices you need to set the return path to some address that you have access to like the phorum email address set in the control panel. <br />
<br />
First save a copy of email_functions.php in case you mess up, then do the following to email_functions.php:<br />
<br />
change:<br />
<br />
<pre class="bbcode">
 $mailheader =&quot;Content-Type: text/plain; charset={$PHORUM[&quot;DATA&quot;][&quot;CHARSET&quot;]}\nContent-Transfer-Encoding:
 {$PHORUM[&quot;DATA&quot;][&quot;MAILENCODING&quot;]}\nX-Mailer: $mailer$msgid\n&quot;;</pre>
<br />
To:<br />
<br />
<pre class="bbcode">
 $mailheader =&quot;Content-Type: text/plain; charset={$PHORUM[&quot;DATA&quot;][&quot;CHARSET&quot;]}\nContent-Transfer-Encoding:
 {$PHORUM[&quot;DATA&quot;][&quot;MAILENCODING&quot;]}\nX-Mailer: $mailer$msgid\nReturn-Path: $from_address\n&quot;;</pre>
<br />
Return-Path:$from_address\n is added at the end of the statement.<br />
<br />
This will set the retrun path to the phorum email address, you could enter another address directly if you want and know what you are doing.<br />
<br />
Failure notices should now go to this address and you can determine what the problem is.<br />
<br />
There does not seem to be a nice whay to write a module to do this, you could use the phorum_hook(&quot;send_mail&quot;). You would have to have the module set everything up and call the mail function then return 0, when $send_messages is tested the mail email function will not send the mail, not sure if this would produce an error message.<br />
<br />
Frank<br />
<br />
PS<br />
<br />
I just found that this reduces the spam ranking of the email that some spam filters issue, probably because the return path email address is now the same as the from address.]]></description>
            <dc:creator>frankbiff</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Fri, 08 Dec 2006 10:24:10 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,118550,118550#msg-118550</guid>
            <title>Send PM to Group (no replies)</title>
            <link>https://www.phorum.org/support/read.php?18,118550,118550#msg-118550</link>
            <description><![CDATA[ Inspired by Brian&#039;s <a href="http://www.phorum.org/phorum5/read.php?16,116069,116069#msg-116069" target="_blank" >PM All Users Module </a> I wrote a hack that allows admins to send PMs to entire groups. I tried to incorporate the changes into a module but gave up at some point. Making it work as a hack took me only a few minutes, oh my :(<br />
<br />
please note that i am using post by id (i.e. a select form to choose recipients from). for name-based selection (edit form), some more modifications would be required.<br />
<br />
Here&#039;s how it works:<br />
- modified the pm template to present a list of all groups. these are prepended with an &#039;@&#039; and have a leading &#039;g&#039; in the to_id form variable.<br />
<br />
after <br />
<pre class="bbcode">&lt;select id=&quot;userselection&quot; name=&quot;to_id&quot;&gt;</pre> in pm_post.tpl, add<br />
<pre class="bbcode">
                &lt;?php if ($PHORUM[&#039;user&#039;][&#039;admin&#039;] ) {
                        $groups = phorum_db_get_groups();
                        foreach($groups as $group) {
                                echo &quot;&lt;option value=\&quot;g{$group[&#039;group_id&#039;]}\&quot;&gt;@&quot;.htmlspecialchars($group[&#039;name&#039;]).&quot;&lt;/option&gt;\n&quot;;
                        }
                } ?&gt;</pre>
<br />
- modified pm.php to recognize group ids. patch is attached.<br />
<br />
have fun<br />
<br />
achim.]]></description>
            <dc:creator>achim</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Mon, 27 Nov 2006 09:22:45 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,116867,116867#msg-116867</guid>
            <title>include body message &amp; author email in the email moderator (2 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,116867,116867#msg-116867</link>
            <description><![CDATA[ Hy,<br />
I activated the moderator option on my phorum, and I want to know how include body message and poster&#039;s email in the mail alert sended to the moderator. I tried to modified in the language file php some variables, including &#039;%author%&#039; and &#039;%body%&#039; for example, but it doesn&#039;t work. How can i do ? What are the exact variables ?<br />
<br />
Thanks for helping]]></description>
            <dc:creator>raoul_in_ze_zone</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Mon, 25 Sep 2006 06:45:39 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,116655,116655#msg-116655</guid>
            <title>A way to make censor erase the whole msg (Phorum 3) (3 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,116655,116655#msg-116655</link>
            <description><![CDATA[ I am using Phorum 3 (and will not upgrade for my admin dosen&#039;t want me to):<br />
As a last resort for spam block I have decided to use the censor to block messages with malicious spam content and my question is: Can I change the routine in post.php to delete the message instead of just replacing it with $!$?<br />
<br />
here is the code<br />
  <pre class="bbcode">
function censor($author, $subject, $email, $body) {
    global $include_path, $ForumConfigSuffix;
    if(file_exists(&quot;$include_path/censor_$ForumConfigSuffix.php&quot;)){
      include &quot;$include_path/censor_$ForumConfigSuffix.php&quot;;
    } else {
      include &quot;$include_path/censor.php&quot;;
    }

    $blurb = &quot;@!#$&quot;;
    if (is_array($profan)) {
      reset($profan);
      while (list(, $sWord) = each($profan)) {
        if(strstr(strtoupper($author), strtoupper($sWord))){
          if(strtoupper($author)==strtoupper($sWord)) $author=$blurb;
          $author = eregi_replace(&quot;^$sWord([^a-zA-Z])&quot;, &quot;$blurb\\1&quot;, $author);
          $author = eregi_replace(&quot;([^a-zA-Z])$sWord$&quot;, &quot;\\1$blurb&quot;, $author);
          while(eregi(&quot;([^a-zA-Z])($sWord)([^a-zA-Z])&quot;, $author)){
            $author = eregi_replace(&quot;([^a-zA-Z])($sWord)([^a-zA-Z])&quot;, &quot;\\1$blurb\\3&quot;, $author);
          }
        }
        if(strstr(strtoupper($subject), strtoupper($sWord))){
          if(strtoupper($subject)==strtoupper($sWord)) $subject=$blurb;
          $subject = eregi_replace(&quot;^$sWord([^a-zA-Z])&quot;, &quot;$blurb\\1&quot;, $subject);
          $subject = eregi_replace(&quot;([^a-zA-Z])$sWord$&quot;, &quot;\\1$blurb&quot;, $subject);
          while(eregi(&quot;([^a-zA-Z])($sWord)([^a-zA-Z])&quot;, $subject)){
            $subject = eregi_replace(&quot;([^a-zA-Z])($sWord)([^a-zA-Z])&quot;, &quot;\\1$blurb\\3&quot;, $subject);
          }
        }
        if(strstr(strtoupper($email), strtoupper($sWord))){
          if(strtoupper($email)==strtoupper($sWord)) $email=&quot;&quot;;
          $email = eregi_replace(&quot;^$sWord([^a-zA-Z])&quot;, &quot;$blurb\\1&quot;, $email);
          $email = eregi_replace(&quot;([^a-zA-Z])$sWord$&quot;, &quot;\\1$blurb&quot;, $email);
          while(eregi(&quot;([^a-zA-Z])($sWord)([^a-zA-Z])&quot;, $email)){
            $email = eregi_replace(&quot;([^a-zA-Z])($sWord)([^a-zA-Z])&quot;, &quot;\\1$blurb\\3&quot;, $email);
          }
        }
        if(strstr(strtoupper($body), strtoupper($sWord))){
          if(strtoupper($body)==strtoupper($sWord)) $body=$blurb;
          $body = eregi_replace(&quot;^$sWord([^a-zA-Z])&quot;, &quot;$blurb\\1&quot;, $body);
          $body = eregi_replace(&quot;([^a-zA-Z])$sWord$&quot;, &quot;\\1$blurb&quot;, $body);
          while(eregi(&quot;([^a-zA-Z])($sWord)([^a-zA-Z])&quot;, $body)){
            $body = eregi_replace(&quot;([^a-zA-Z])($sWord)([^a-zA-Z])&quot;, &quot;\\1$blurb\\3&quot;, $body);
          }
        }
      }
    }
    return(array($author, $subject, $email, $body));
  }</pre>
My knowledge of php lacks, to say the least so I wonder if some one can tell me, what need I change in order to delete the messege and not cause errors in the ending of the code.<br />
<br />
If it&#039;s not possible, how can I make a function that will act like censor but will delete the messege with no problems for the completion of the loop, thank you all.]]></description>
            <dc:creator>davix</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Mon, 25 Sep 2006 08:22:11 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,116360,116360#msg-116360</guid>
            <title>hack: ensure temp/cache dir exists (no replies)</title>
            <link>https://www.phorum.org/support/read.php?18,116360,116360#msg-116360</link>
            <description><![CDATA[ Recently, in the interest of performance, I turned the folder I was using for the phorum temp dir to a tmpfs/ramdisk.  As such, whenever my system is rebooted, the filesystem was cleared and the cache directory was gone.<br />
<br />
Rather than add something to a startup script which is likely not something most people running phorum can do, it seemed to make more sense to add a line of code in the templates.php file:<br />
<br />
at line 347, I insterted the following line:<br />
    if (!is_dir($bn=dirname($filename))) mkdir($bn,0775); //added 060910 by freedman<br />
<br />
<br />
which makes that block read:<br />
function phorum_write_templatefile($filename, $content, $is_toplevel = false)<br />
{<br />
    if (!is_dir($bn=dirname($filename))) mkdir($bn,0775); //added 060910 by freedman<br />
    if($fp=fopen($filename, &quot;w&quot;)) {<br />
<br />
<br />
it didn&#039;t seem necessary to do anything more robust, since if there&#039;s a problem creating the directory, you get the same error messages as before, and any checking more than looking for the directory to exist would waste time since it is checked possibly numerous times for each page view.]]></description>
            <dc:creator>freedman</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Sun, 10 Sep 2006 03:55:22 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,116160,116160#msg-116160</guid>
            <title>how to include html in the body of messages? (6 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,116160,116160#msg-116160</link>
            <description><![CDATA[ Hello,<br />
<br />
i would need to include some members bios, made of an image and a text description, on a certain posts, in the body of the message.<br />
<br />
as is not possible to use php include or SSI in the body of messages, i wonder if there&#039;s another way to do this. <br />
i&#039;ve seen the Inline-Attachments-Module, but it&#039;s just about images: [<a href="http://www.phorum.org/phorum5/read.php?16,10319" target="_blank" >www.phorum.org</a>]<br />
<br />
please do you have any idea?<br />
<br />
Thanks in advance,<br />
tito]]></description>
            <dc:creator>tito</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Sat, 02 Sep 2006 18:46:07 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,115632,115632#msg-115632</guid>
            <title>Arrange Mails in Groups (no replies)</title>
            <link>https://www.phorum.org/support/read.php?18,115632,115632#msg-115632</link>
            <description><![CDATA[ Morning<br />
<br />
With this hack, the Forums-Mails to the Mod would be arranged in a group, like threaded-Phorum or mailing-lists.<br />
<br />
Find the NEW-Comments ;-)<br />
<br />
<pre class="bbcode">

File: include/email_functions.php

&lt;?php

////////////////////////////////////////////////////////////////////////////////
//                                                                            //
//   Copyright (C) 2006  Phorum Development Team                              //
//   [<a href="http://www.phorum.org" target="_blank" >www.phorum.org</a>]                                                    //
//                                                                            //
//   This program is free software. You can redistribute it and/or modify     //
//   it under the terms of either the current Phorum License (viewable at     //
//   phorum.org) or the Phorum License that was distributed with this file    //
//                                                                            //
//   This program is distributed in the hope that it will be useful,          //
//   but WITHOUT ANY WARRANTY, without even the implied warranty of           //
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     //
//                                                                            //
//   You should have received a copy of the Phorum License                    //
//   along with this program.                                                 //
////////////////////////////////////////////////////////////////////////////////

if(!defined(&quot;PHORUM&quot;)) return;

function phorum_valid_email($email){
    $PHORUM = $GLOBALS[&quot;PHORUM&quot;];

    $ret = false;

    $email = trim($email);

    if(preg_match(&#039;/^([a-z0-9\!\#\$\%\&amp;\&#039;\*\+\-\/\=\?\^\_\`\{\|\}\~]+(\.[a-z0-9\!\#\$\%\&amp;\&#039;\*\+\-\/\=\?\^\_\`\{\|\}\~]+)*)@(((([-a-z0-9]*[a-z0-9])?)|(#[0-9]+)|([((([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\.){3}(([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\]))\.)*((([-a-z0-9]*[a-z0-9])?)|(#[0-9]+)|([((([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\.){3}(([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\]))$/i&#039;, $email)){
        if(!$PHORUM[&quot;dns_lookup&quot;]){
            // format is valid
            // don&#039;t look up mail server
            $ret = true;
        } elseif(function_exists(&#039;checkdnsrr&#039;)) {

            $fulldomain = substr(strstr($email, &quot;@&quot;), 1).&quot;.&quot;;
            // check if a mailserver exists for the domain
            if(checkdnsrr($fulldomain, &quot;MX&quot;)) {
                $ret = true;
            }

            // some hosts don&#039;t have an MX record, but accept mail themselves
            if(!$ret){
                // default timeout of 60 seconds makes the user way too long
                // in case of problems.
                ini_set(&#039;default_socket_timeout&#039;, 10);
                if(@fsockopen($fulldomain, 25)){
                    $ret = true;
                }
            }
        } else {
            // bah, you must be using windows and we can&#039;t run real checks
            $ret = true;
        }
    }

    return $ret;
}

/**
 * function for sending email to users, gets addresses-array and data-array
 */
function phorum_email_user($addresses, $data)
{
    $PHORUM = $GLOBALS[&#039;PHORUM&#039;];

    $mailmessage = $data[&#039;mailmessage&#039;];
    unset($data[&#039;mailmessage&#039;]);
    $mailsubject = $data[&#039;mailsubject&#039;];
    unset($data[&#039;mailsubject&#039;]);

    $teststring = $data[&#039;read_url&#039;];                              /* NEW */
    $parentid = $data[&#039;parentid&#039;];                                /* NEW */


    if(is_array($data) &amp;&amp; count($data)) {
        foreach(array_keys($data) as $key){
            $mailmessage = str_replace(&quot;%$key%&quot;, $data[$key], $mailmessage);
            $mailsubject = str_replace(&quot;%$key%&quot;, $data[$key], $mailsubject);
        }
    }

    $num_addresses = count($addresses);
    $from_address = &quot;\&quot;&quot;.$PHORUM[&#039;system_email_from_name&#039;].&quot;\&quot; &lt;&quot;.$PHORUM[&#039;system_email_from_address&#039;].&quot;&gt;&quot;;

    $hook_data = array(
        &#039;addresses&#039;  =&gt; $addresses,
        &#039;from&#039;       =&gt; $from_address,
        &#039;subject&#039;    =&gt; $mailsubject,
        &#039;body&#039;       =&gt; $mailmessage,
        &#039;bcc&#039;        =&gt; $PHORUM[&#039;use_bcc&#039;]
    );

    /* NEW  NOT NICE BUT WORKS*/
    ereg (&quot;([0-9]{1,2}),([0-9]{1,10}),([0-9]{1,10})#&quot;, $teststring, $teststring100);
    $forum11 = $teststring100[1];
    $parent  = $teststring100[2];
    $thread  = $teststring100[3];

    $send_messages = phorum_hook(&quot;send_mail&quot;, $hook_data);

    /* NEW DISABLE BECAUSE MSGID IS ALWAYS EMPTY */
    /*
    if(isset($data[&quot;msgid&quot;])){
        $msgid=&quot;\nMessage-ID: {$data[&#039;msgid&#039;]}&quot;;
    } else {
        $msgid=&quot;&quot;;
    }
    */

    /* NEW   DOMAIN is only tld-name without .com/.net/.de*/
    $msgid=&quot;\nMessage-ID: &quot;. (md5(&quot;$teststring100[1]$teststring100[2]$teststring100[3]&quot;)) . &quot;.DOMAIN&quot;;
    $reply11=&quot;\nIn-reply-to: &quot;. (md5(&quot;$teststring100[1]$teststring100[2]$parentid&quot;)) . &quot;.DOMAIN&quot;;

    if($send_messages != 0 &amp;&amp; $num_addresses &gt; 0){
        $phorum_major_version = substr(PHORUM, 0, strpos(PHORUM, &#039;.&#039;));
        //$mailer = &quot;Power ForumsMailer&quot;;
        $mailer = &quot;Phorum&quot; . $phorum_major_version;       /* X-HID is not important */
        /* NEW MAILHEADER WITH CORRECT MSGID AND REPLY */
        $mailheader =&quot;Content-Type: text/plain; charset={$PHORUM[&quot;DATA&quot;][&quot;CHARSET&quot;]}\nContent-Transfer-Encoding: {$PHORUM[&quot;DATA&quot;][&quot;MAILENCODING&quot;]}\nX-Mailer: $mailer$msgid$reply11\nX-HID--Forum:$forum11\nX-HID--Parent:$parent\nX-HID--Thread:$thread\n&quot;;

        if(isset($PHORUM[&#039;use_bcc&#039;]) &amp;&amp; $PHORUM[&#039;use_bcc&#039;] &amp;&amp; $num_addresses &gt; 3){
            mail(&quot; &quot;, $mailsubject, $mailmessage, $mailheader.&quot;From: $from_address\nBCC: &quot; . implode(&quot;,&quot;, $addresses));
        } else {
            foreach($addresses as $address){
                mail($address, $mailsubject, $mailmessage, $mailheader.&quot;From: $from_address&quot;);
            }
        }
    }

    return $num_addresses;
}

function phorum_email_pm_notice($message, $langusers)
{
    $mail_data = array(
        &quot;pm_message_id&quot; =&gt; $message[&quot;pm_message_id&quot;],
        &quot;author&quot;        =&gt; $message[&quot;from_username&quot;],
        &quot;subject&quot;       =&gt; $message[&quot;subject&quot;],
        &quot;full_body&quot;     =&gt; $message[&quot;message&quot;],
        &quot;plain_body&quot;    =&gt; wordwrap(phorum_strip_body($message[&quot;message&quot;]),72),
        &quot;read_url&quot;      =&gt; phorum_get_url(PHORUM_PM_URL, &quot;page=read&quot;, &quot;pm_id=&quot; . $message[&quot;pm_message_id&quot;]),
    );

    if (isset($_POST[PHORUM_SESSION_LONG_TERM])) {
        // strip any auth info from the read url
        $mail_data[&quot;read_url&quot;] = preg_replace(&quot;!,{0,1}&quot; . PHORUM_SESSION_LONG_TERM . &quot;=&quot; . urlencode($_POST[PHORUM_SESSION_LONG_TERM]) . &quot;!&quot;, &quot;&quot;, $mail_data[&quot;read_url&quot;]);
    }

    foreach ($langusers as $language =&gt; $users)
    {
        $PHORUM = $GLOBALS[&quot;PHORUM&quot;];

        if ( file_exists( &quot;./include/lang/$language.php&quot; ) ) {
            include( &quot;./include/lang/$language.php&quot; );
        } else {
            include(&quot;./include/lang/{$PHORUM[&#039;language&#039;]}.php&quot;);
        }

        $mail_data[&quot;mailmessage&quot;] = $PHORUM[&quot;DATA&quot;][&quot;LANG&quot;][&#039;PMNotifyMessage&#039;];
        $mail_data[&quot;mailsubject&quot;] = $PHORUM[&quot;DATA&quot;][&quot;LANG&quot;][&#039;PMNotifySubject&#039;];

        $addresses = array();
        foreach ($users as $user) {
            $addresses[] = $user[&quot;email&quot;];
        }

        phorum_email_user($addresses, $mail_data);
    }
}

function phorum_email_notice($message)
{
    $PHORUM=$GLOBALS[&quot;PHORUM&quot;];

    // do we allow email-notification for that forum?
    if(!$PHORUM[&#039;allow_email_notify&#039;]) {
        return;
    }

    include_once(&quot;./include/format_functions.php&quot;);

    $mail_users_full = phorum_db_get_subscribed_users($PHORUM[&#039;forum_id&#039;], $message[&#039;thread&#039;], PHORUM_SUBSCRIPTION_MESSAGE);

    if (count($mail_users_full)) {
        $mail_data = array(
            &quot;forumname&quot;   =&gt; strip_tags($PHORUM[&quot;DATA&quot;][&quot;NAME&quot;]),
            &quot;forum_id&quot;    =&gt; $PHORUM[&#039;forum_id&#039;],
            &quot;message_id&quot;  =&gt; $message[&#039;message_id&#039;],
            &quot;author&quot;      =&gt; $message[&#039;author&#039;],
            &quot;subject&quot;     =&gt; $message[&#039;subject&#039;],
            &quot;full_body&quot;   =&gt; $message[&#039;body&#039;],
            &quot;parentid&quot;    =&gt; $message[&#039;parent_id&#039;],      /* NEW */
            &quot;plain_body&quot;  =&gt; phorum_strip_body($message[&#039;body&#039;]),
            &quot;read_url&quot;    =&gt; phorum_get_url(PHORUM_READ_URL, $message[&#039;thread&#039;], $message[&#039;message_id&#039;]),
            &quot;remove_url&quot;  =&gt; phorum_get_url(PHORUM_FOLLOW_URL, $message[&#039;thread&#039;], &quot;remove=1&quot;),
            &quot;noemail_url&quot; =&gt; phorum_get_url(PHORUM_FOLLOW_URL, $message[&#039;thread&#039;], &quot;noemail=1&quot;),
            &quot;followed_threads_url&quot; =&gt; phorum_get_url(PHORUM_CONTROLCENTER_URL, &quot;panel=&quot; . PHORUM_CC_SUBSCRIPTION_THREADS),
            &quot;msgid&quot;       =&gt; $message[&quot;msgid&quot;]
        );
        if (isset($_POST[PHORUM_SESSION_LONG_TERM])) {
            // strip any auth info from the read url
            $mail_data[&quot;read_url&quot;] = preg_replace(&quot;!,{0,1}&quot; . PHORUM_SESSION_LONG_TERM . &quot;=&quot; . urlencode($_POST[PHORUM_SESSION_LONG_TERM]) . &quot;!&quot;, &quot;&quot;, $mail_data[&quot;read_url&quot;]);
            $mail_data[&quot;remove_url&quot;] = preg_replace(&quot;!,{0,1}&quot; . PHORUM_SESSION_LONG_TERM . &quot;=&quot; . urlencode($_POST[PHORUM_SESSION_LONG_TERM]) . &quot;!&quot;, &quot;&quot;, $mail_data[&quot;remove_url&quot;]);
            $mail_data[&quot;noemail_url&quot;] = preg_replace(&quot;!,{0,1}&quot; . PHORUM_SESSION_LONG_TERM . &quot;=&quot; . urlencode($_POST[PHORUM_SESSION_LONG_TERM]) . &quot;!&quot;, &quot;&quot;, $mail_data[&quot;noemail_url&quot;]);
            $mail_data[&quot;followed_threads_url&quot;] = preg_replace(&quot;!,{0,1}&quot; . PHORUM_SESSION_LONG_TERM . &quot;=&quot; . urlencode($_POST[PHORUM_SESSION_LONG_TERM]) . &quot;!&quot;, &quot;&quot;, $mail_data[&quot;followed_threads_url&quot;]);
        }
        // go through the user-languages and send mail with their set lang
        foreach($mail_users_full as $language =&gt; $mail_users) {
            if ( file_exists( &quot;./include/lang/$language.php&quot; ) ) {
                include( &quot;./include/lang/$language.php&quot; );
            } else {
                include(&quot;./include/lang/{$PHORUM[&#039;language&#039;]}.php&quot;);
            }
            $mail_data[&quot;mailmessage&quot;] = $PHORUM[&quot;DATA&quot;][&quot;LANG&quot;][&#039;NewReplyMessage&#039;];
            $mail_data[&quot;mailsubject&quot;] = $PHORUM[&quot;DATA&quot;][&quot;LANG&quot;][&#039;NewReplySubject&#039;];
            phorum_email_user($mail_users, $mail_data);

        }
    }
}

function phorum_email_moderators($message)
{
    $PHORUM=$GLOBALS[&quot;PHORUM&quot;];

    $mail_users = phorum_user_get_moderators($PHORUM[&#039;forum_id&#039;],false,true);

    if (count($mail_users)) {
        include_once(&quot;./include/format_functions.php&quot;);
        if($message[&quot;status&quot;] &gt; 0) { // just notification of a new message
            $mailtext = $PHORUM[&quot;DATA&quot;][&quot;LANG&quot;][&#039;NewUnModeratedMessage&#039;];
        } else { // posts needing approval
            $mailtext = $PHORUM[&quot;DATA&quot;][&quot;LANG&quot;][&#039;NewModeratedMessage&#039;];
        }
        $mail_data = array(
            &quot;mailmessage&quot; =&gt; $mailtext,
            &quot;mailsubject&quot; =&gt; $PHORUM[&quot;DATA&quot;][&quot;LANG&quot;][&#039;NewModeratedSubject&#039;],
            &quot;forumname&quot;   =&gt; strip_tags($PHORUM[&quot;DATA&quot;][&quot;NAME&quot;]),
            &quot;forum_id&quot;    =&gt; $PHORUM[&#039;forum_id&#039;],
            &quot;message_id&quot;  =&gt; $message[&#039;message_id&#039;],
            &quot;author&quot;      =&gt; $message[&#039;author&#039;],
            &quot;subject&quot;     =&gt; $message[&#039;subject&#039;],
            &quot;full_body&quot;   =&gt; $message[&#039;body&#039;],
            &quot;parentid&quot;    =&gt; $message[&#039;parent_id&#039;],      /* NEW */
            &quot;plain_body&quot;  =&gt; phorum_strip_body($message[&#039;body&#039;]),
            &quot;approve_url&quot; =&gt; phorum_get_url(PHORUM_PREPOST_URL),
            &quot;read_url&quot;    =&gt; phorum_get_url(PHORUM_READ_URL, $message[&#039;thread&#039;], $message[&#039;message_id&#039;])
        );
        if (isset($_POST[PHORUM_SESSION_LONG_TERM])) {
            // strip any auth info from the read url
            $mail_data[&quot;read_url&quot;] = preg_replace(&quot;!,{0,1}&quot; . PHORUM_SESSION_LONG_TERM . &quot;=&quot; . urlencode($_POST[PHORUM_SESSION_LONG_TERM]) . &quot;!&quot;, &quot;&quot;, $mail_data[&quot;read_url&quot;]);
            $mail_data[&quot;approve_url&quot;] = preg_replace(&quot;!,{0,1}&quot; . PHORUM_SESSION_LONG_TERM . &quot;=&quot; . urlencode($_POST[PHORUM_SESSION_LONG_TERM]) . &quot;!&quot;, &quot;&quot;, $mail_data[&quot;approve_url&quot;]);
        }
        phorum_email_user($mail_users, $mail_data);
    }
}

?&gt;</pre>
<br />
<i>Edit by Maurice: surrounded code with code instead of quote tags</i><br />
Edit a NEW-Comment at new Mailheader<br />
<br />
frihu]]></description>
            <dc:creator>frihu</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Sun, 20 Aug 2006 23:08:36 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,114709,114709#msg-114709</guid>
            <title>spam detection (7 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,114709,114709#msg-114709</link>
            <description><![CDATA[ Is there an spamdetection module / hack for phorum ?]]></description>
            <dc:creator>fyrgoss</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Tue, 25 Jul 2006 09:48:01 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,114279,114279#msg-114279</guid>
            <title>javascript breadcrumbs (3 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,114279,114279#msg-114279</link>
            <description><![CDATA[ hey phorum<br />
<br />
a read on a hack a while ago one of the devs had a mod that read url paths and took away the slashes etc to display a clickable breadcrumb path.<br />
<br />
anyone remember what am talking about, and have a link to it? (not phorum specific i dont think)<br />
<br />
many thanks!]]></description>
            <dc:creator>artisites</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Tue, 11 Jul 2006 06:17:11 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,113777,113777#msg-113777</guid>
            <title>hack for stripping meta keywords from posts (3 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,113777,113777#msg-113777</link>
            <description><![CDATA[ I&#039;m currently using the hack to strip the first 200 characters and putting them in the meta description<br />
<br />
Is there a hack available to do the same thing except strip the first 10-20 words and add them as meta keywords?]]></description>
            <dc:creator>solobrian</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Fri, 16 Jun 2006 03:13:31 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,113674,113674#msg-113674</guid>
            <title>Daily/Weekly/Monthly Digest (8 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,113674,113674#msg-113674</link>
            <description><![CDATA[ Hi,<br />
<br />
I was wondering whether I am right to think that a Digest functionality would need to be added as a hack?<br />
<br />
Here is what a Digest would entail:<br />
<br />
constants.php<br />
<br />
Add PHORUM_SUBSCRIPTION_DIGEST_DAILY, ..._WEEKLY, and ..._MONTHLY constants and set its numeric values.<br />
[--- I see there is already a PHORUM_SUBSCRIPTION_DIGEST constant defined, but this is not used anywhere in Phorum. Is a Digest functionality in the pipeline? ---]<br />
<br />
follow.tpl<br />
<br />
Replace the current send_email checkbox with a dropdown select menu containing the existing options, Bookmark and E-mail, as well as 3 new options: Daily Digest, Weekly Digest and Monthly Digest<br />
<br />
follow.php<br />
<br />
Check whether form has been submitted, and instead of setting the type with the ternary operator (to choose between Bookmark and E-mail depending on if the send_email checkbox was checked), rather set type to the value of send_email.<br />
<br />
<br />
The sending of the actual Digest e-mails can be incorporated as a scheduled module. <br />
In the database, a timestamp field will need to be added to the _subscribers table. Each time a digest is sent for a subscription, this field will need to be updated to the timestamp on which the digest was sent. This will allow the scheduled module to know the date from which topic posts should be included in the e-mail, to prevent a digest email from containing all posts from a specific forum topic. Otherwise a fixed valuse can be provided (for example &#039;15&#039;) and the scheduled module will only email the latest x posts from a topic (in this case 15).<br />
<br />
Thus, this type of Digest functionality works in the same way as the &#039;Follow this topic via e-mail&#039; option currently available in Phorum. Each digest only contains posts from one topic.<br />
<br />
I suppose a Digest functionality where one Digest will contain posts from various topics can also be implemented, but this is not what I am interested in at the moment.<br />
<br />
Any comments/ideas will be appreaciated.<br />
madt]]></description>
            <dc:creator>madt</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Tue, 31 Jul 2007 17:27:08 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?18,113031,113031#msg-113031</guid>
            <title>http and https: simple hack to admin/settings.php (2 replies)</title>
            <link>https://www.phorum.org/support/read.php?18,113031,113031#msg-113031</link>
            <description><![CDATA[ I use phorum3 on a site and am setting up phorum5 on another. In the previous case I found that requiring (via apache mod_rewrite) users accessing the site from outside our domain to use the https protocol cut the spam were we getting to a trickle. (We allow anonymous posting). When I was playing with phorum5 it turned out that I was unable to login as a normal user over https because http_path was set to<br />
[<a href="http://host.domain/forums" target="_blank"  rel="nofollow">host.domain</a>] We need our moderators to be able to login remotely.<br />
<br />
So I decided I wanted http_path to be a relative url. The admin GUI did not allow this and when I went into the database and changed it by hand:<br />
<br />
update phorum_settings set data=&#039;/forums&#039; where name = &#039;http_path&#039;;<br />
<br />
This broke the admin GUI as it would trigger the error<br />
<br />
&quot;The provided HTTP Path is not a valid URL.&quot;<br />
<br />
whenever an additional change was attempted.<br />
<br />
Not being able to find any obvious way to achieve the desired modification with a mod hook I modified include/admin/settings.php<br />
to allow any URL beginning w/ &quot;/&quot;<br />
<br />
unified diff attached<br />
<br />
I am still quite unfamiliar w/this version of phorum (version 5.1.12), and realize that there may be a more upgrade friendly way to achieve the<br />
desired result.<br />
<br />
Pete  <br />
<br />
(BTW: preview did not work for me here, was it because of the attachment?)]]></description>
            <dc:creator>krejtep</dc:creator>
            <category>5.1 Phorum Hacks</category>
            <pubDate>Fri, 19 May 2006 18:46:48 -0500</pubDate>
        </item>
    </channel>
</rss>
