Code: Select all
# Forums table
CREATE TABLE subject_prefix_forums (
prefix_id mediumint(8) NOT NULL DEFAULT '0',
forum_id mediumint(8) NOT NULL DEFAULT '0',
KEY prefix_id (prefix_id),
KEY forum_id (forum_id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Code: Select all
<!-- IF SUBJECT_PREFIX_TITLE --><span class="subjectprefix">{SUBJECT_PREFIX_TITLE}</span> <!-- ENDIF -->
Code: Select all
<!-- IF SUBJECT_PREFIX_TITLE --><span class="subjectprefix"<!-- IF SUBJECT_PREFIX_COLOUR --> style="color: #{SUBJECT_PREFIX_COLOUR};"<!-- ENDIF -->>{SUBJECT_PREFIX_TITLE}</span> <!-- ENDIF -->
Well, unless it is actually a full release, don't use it live.t_backoff wrote:This MOD does seem to support subsilver2, but it is ALPHA SOFTWARE. Alpha software should NEVER be used on a live board.
Any word (at least on point 1)?t_backoff wrote:*EDIT* OK, I think I found most of the bugs.![]()
- In viewtopic, when I use the change topic prefix tool, I get an error "The submitted form was invalid. Try submitting again". I created a new module category (subject prefix) and added the subject_prefix_quick_change module to that category, and enabled it. I'm not really sure what's going on.
- viewtopic_print does not support prefix color. This is pretty easy, change this:
to this:Code: Select all
<!-- IF SUBJECT_PREFIX_TITLE --><span class="subjectprefix">{SUBJECT_PREFIX_TITLE}</span> <!-- ENDIF -->
Code: Select all
<!-- IF SUBJECT_PREFIX_TITLE --><span class="subjectprefix"<!-- IF SUBJECT_PREFIX_COLOUR --> style="color: #{SUBJECT_PREFIX_COLOUR};"<!-- ENDIF -->>{SUBJECT_PREFIX_TITLE}</span> <!-- ENDIF -->
Ehm yah that is most likely caused by:onel0ve wrote:cant open subject_prefix_install.xml getting error mod x please
when i open subject_prefix_install.xml then i am getting that kind of error modx file is missing .Erik Frèrejean wrote:Ehm yah that is most likely caused by:onel0ve wrote:cant open subject_prefix_install.xml getting error mod x please
What is the error?
Code: Select all
This document had no style information.
<?xml-stylesheet type="text/xsl" href="contrib/modx.prosilver.en.xsl"?>
<!-- For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD. Although MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD. No support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/ -->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.5.xsd">
<header>
<license>
http://opensource.org/licenses/gpl-license.php GNU General Public License v2
</license>
<title lang="en">
Subject Prefix
</title>
<description lang="en">
A MOD that allows users to easily give topics a subject prefix. This may be through a dropdown menu, radio boxes, a custom text input field, etc where a user can select the appropriate option and have it appended to the front of the topic title.
</description>
<author-notes lang="en">
This MOD is part of the MOD teams "Summer of MODs"
</author-notes>
<author-group>
<author>
<realname>
Erik Frèrejean
</realname>
<username>
Erik Frèrejean
</username>
<homepage>
http://www.erikfrerejean.nl
</homepage>
<contributions-group>
<contributions status="current" from="2010-05-19" position="Developer"/>
</contributions-group>
</author>
</author-group>
<mod-version>
1.0.0-a1
</mod-version>
<installation>
<level>
easy
</level>
<time>
160
</time>
<target-version>
3.0.7-PL1
</target-version>
</installation>
<history>
<entry>
<date>
2010-05-20
</date>
<rev-version>
1.0.0-a1
</rev-version>
<changelog lang="en">
<change>
First Alpha release
</change>
</changelog>
</entry>
</history>
<link-group>
<link type="template" realname="SubSilver2" href="contrib/subsilver2.xml" lang="en">
SubSilver2
</link>
</link-group>
</header>
<action-group>
<!-- Queries -->
<sql>
<![CDATA[CREATE TABLE subject_prefix ( prefix_id mediumint(8) NOT NULL AUTO_INCREMENT, prefix_title varchar(255) NOT NULL, prefix_colour varchar(6) DEFAULT NULL, PRIMARY KEY (prefix_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;]]>
</sql>
<sql>
<![CDATA[INSERT INTO phpbb_acl_options (auth_option_id,auth_option,is_global,is_local,founder_only) VALUES (NULL,'a_subject_prefix','1','0','0');]]>
</sql>
<sql>
<![CDATA[ALTER TABLE phpbb_topics ADD COLUMN subject_prefix_id mediumint(8) DEFAULT '0';]]>
</sql>
<sql>
<![CDATA[CREATE INDEX topic_first_post_id ON phpbb_topics (topic_first_post_id);]]>
</sql>
<sql>
<![CDATA[CREATE INDEX subject_prefix_id ON phpbb_topics (subject_prefix_id);]]>
</sql>
<!-- File copy -->
<copy>
<file from="root/adm/style/acp_subject_prefix.html" to="adm/style/acp_subject_prefix.html"/>
<file from="root/includes/acp/acp_subject_prefix.php" to="includes/acp/acp_subject_prefix.php"/>
<file from="root/includes/acp/info/acp_subject_prefix.php" to="includes/acp/info/acp_subject_prefix.php"/>
<file from="root/includes/mods/subject_prefix/*.*" to="includes/mods/subject_prefix/*.*"/>
<file from="root/language/en/mods/info_acp_subject_prefix.php" to="language/en/mods/info_acp_subject_prefix.php"/>
</copy>
<!-- File edits -->
<open src="includes/functions_posting.php">
<edit>
<find>
// Submit new topic
</find>
<action type="before-add">
//-- Begin Subject Prefix //-- Add: subject_prefix_core::add_prefix_to_posting_sql($post_mode, $sql_data); //-- End Subject Prefix
</action>
</edit>
</open>
<open src="styles/prosilver/theme/common.css">
<edit>
<comment lang="en">
This find only reflects the last occurance in the file. This means, perform the action after the last line in this file
</comment>
<find>
}
</find>
<action type="after-add">
<![CDATA[/* Begin Subject Prefix ---------------------------------------- */ .subjectprefix { font-family: "Trebuchet MS", Helvetica, Arial, Sans-serif; font-size: 1.2em; font-weight: bold; color: #000000; text-decoration: none; } .content h2 .subjectprefix { color: #000000; } /* End Subject Prefix +---------------------------------------- */]]>
</action>
</edit>
</open>
<open src="styles/prosilver/template/posting_editor.html">
<edit>
<find>
<![CDATA[<!-- IF S_POST_ACTION or S_PRIVMSGS or S_EDIT_DRAFT -->]]>
</find>
<action type="before-add">
<![CDATA[ <!-- IF SUBJECT_PREFIX_DROPDOWN_OPTIONS --> <dt><label for="prefixes">{L_ACP_SUBJECT_PREFIX}</label></dt> <dd><select name="prefixes" id="prefixes">{SUBJECT_PREFIX_DROPDOWN_OPTIONS}</select></dd> <!-- ENDIF --> ]]>
</action>
</edit>
</open>
<open src="styles/prosilver/template/viewtopic_body.html">
<edit>
<find>
<![CDATA[<h2><a href="{U_VIEW_TOPIC}">]]>
</find>
<inline-edit>
<inline-find>
<![CDATA[<h2>]]>
</inline-find>
<inline-action type="after-add">
<![CDATA[<!-- IF SUBJECT_PREFIX_TITLE --><span class="subjectprefix"<!-- IF SUBJECT_PREFIX_COLOUR --> style="color: #{SUBJECT_PREFIX_COLOUR};"<!-- ENDIF -->>{SUBJECT_PREFIX_TITLE}</span> <!-- ENDIF -->]]>
</inline-action>
</inline-edit>
</edit>
</open>
<open src="styles/prosilver/template/viewforum_body.html">
<edit>
<find>
<![CDATA[<dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image:]]>
</find>
<inline-edit>
<inline-find>
<![CDATA[<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">]]>
</inline-find>
<inline-action type="before-add">
<![CDATA[<!-- IF topicrow.SUBJECT_PREFIX_TITLE --><span class="subjectprefix"<!-- IF topicrow.SUBJECT_PREFIX_COLOUR --> style="color: #{topicrow.SUBJECT_PREFIX_COLOUR};"<!-- ENDIF -->>{topicrow.SUBJECT_PREFIX_TITLE}</span> <!-- ENDIF -->]]>
</inline-action>
</inline-edit>
</edit>
</open>
<open src="viewforum.php">
<edit>
<find>
$s_type_switch = ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) ? 1 : 0;
</find>
<action type="before-add">
//-- Begin Subject Prefix //-- Add: subject_prefix_core::add_subject_prefix_to_blockrow($row, 'topicrow'); //-- End Subject Prefix
</action>
</edit>
</open>
<open src="viewtopic.php">
<edit>
<find>
$topic_data['topic_title'] = censor_text($topic_data['topic_title']);
</find>
<action type="after-add">
//-- Begin Subject Prefix //-- Add: subject_prefix_core::add_subject_prefix_to_blockrow($topic_data, '.'); //-- End Subject Prefix
</action>
</edit>
</open>
</action-group>
</mod>