[ABD] Subject Prefix

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [ALPHA] Subject Prefix

Post by Erik Frèrejean » Fri May 28, 2010 1:29 pm

I've just released alpha 2 of this MOD through my github repository. I think that I've added all main features, but if you think I've missed something please let me know.
I hope to get a beta/rc package ready beginning next week.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

User avatar
tbackoff
Former Team Member
Posts: 7022
Joined: Thu Jun 04, 2009 1:41 am
Location: cheerleading practice
Name: Tabitha Backoff

Re: [ALPHA] Subject Prefix

Post by tbackoff » Fri May 28, 2010 3:54 pm

I'm missing a table (subject_prefix_forums). Do you have the parameters for it?
Flying is the second best thrill to cheerleaders; being caught is the first.

User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [ALPHA] Subject Prefix

Post by Erik Frèrejean » Fri May 28, 2010 4:05 pm

Forgot to add that one to my files. Here's the create query:

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;
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

User avatar
tbackoff
Former Team Member
Posts: 7022
Joined: Thu Jun 04, 2009 1:41 am
Location: cheerleading practice
Name: Tabitha Backoff

Re: [ALPHA] Subject Prefix

Post by tbackoff » Fri May 28, 2010 4:17 pm

Thanks. I've run into some issues, but I'm going to thoroughly test before posting.

*EDIT* OK, I think I found most of the bugs. :D
  • 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:

    Code: Select all

    <!-- IF SUBJECT_PREFIX_TITLE --><span class="subjectprefix">{SUBJECT_PREFIX_TITLE}</span> <!-- ENDIF -->
    to this:

    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 -->
Flying is the second best thrill to cheerleaders; being caught is the first.

Balamand
Registered User
Posts: 64
Joined: Sun Jan 31, 2010 12:18 pm

Re: [ALPHA] Subject Prefix

Post by Balamand » Fri May 28, 2010 9:00 pm

I was looking for this mod for long time. please tell me it supports subsilver 2 :?

can i install it on a live board?

User avatar
tbackoff
Former Team Member
Posts: 7022
Joined: Thu Jun 04, 2009 1:41 am
Location: cheerleading practice
Name: Tabitha Backoff

Re: [ALPHA] Subject Prefix

Post by tbackoff » Sat May 29, 2010 2:30 am

This MOD does seem to support subsilver2, but it is ALPHA SOFTWARE. Alpha software should NEVER be used on a live board.
Flying is the second best thrill to cheerleaders; being caught is the first.

Desdenova
Registered User
Posts: 646
Joined: Sat Feb 23, 2008 7:25 pm

Re: [ALPHA] Subject Prefix

Post by Desdenova » Sat May 29, 2010 4:49 am

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.
Well, unless it is actually a full release, don't use it live.

Erik, I'll go sniff the code again soon and let you know if you nubbed anything or if there's an optimization I can suggest.

User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [ALPHA] Subject Prefix

Post by Erik Frèrejean » Sat May 29, 2010 3:05 pm

Damian, thanks for the feedback so far :).

As a heads up I've just increased the minimum MOD requirements to php 5.1.0. This means that you'll have to run at least php 5.1.0 to use this MOD.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [ALPHA] Subject Prefix

Post by Erik Frèrejean » Sat May 29, 2010 4:34 pm

Last minute feature addition, I've just added the ability to localise prefixes, just as you do with user groups.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

User avatar
tbackoff
Former Team Member
Posts: 7022
Joined: Thu Jun 04, 2009 1:41 am
Location: cheerleading practice
Name: Tabitha Backoff

Re: [ALPHA] Subject Prefix

Post by tbackoff » Sat May 29, 2010 10:05 pm

t_backoff wrote:*EDIT* OK, I think I found most of the bugs. :D
  • 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:

    Code: Select all

    <!-- IF SUBJECT_PREFIX_TITLE --><span class="subjectprefix">{SUBJECT_PREFIX_TITLE}</span> <!-- ENDIF -->
    to this:

    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 -->
Any word (at least on point 1)?
Flying is the second best thrill to cheerleaders; being caught is the first.

onel0ve
Registered User
Posts: 182
Joined: Thu Aug 21, 2008 6:26 pm

Re: [ALPHA] Subject Prefix

Post by onel0ve » Sun May 30, 2010 5:33 am

cant open subject_prefix_install.xml getting error mod x please

User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [ALPHA] Subject Prefix

Post by Erik Frèrejean » Sun May 30, 2010 6:57 am

@ t_backoff,
With regards to 1, I've noticed that as well but I can't reproduce it all the time. It looks like that error only appears in certain circumstances but I don't know the circumstances right now.
As for the print I've purposely removed colouring from their as all colours (except those posted) are dropped from there.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [ALPHA] Subject Prefix

Post by Erik Frèrejean » Sun May 30, 2010 6:57 am

onel0ve wrote:cant open subject_prefix_install.xml getting error mod x please
Ehm yah that is most likely caused by:
What is the error? ;)
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

onel0ve
Registered User
Posts: 182
Joined: Thu Aug 21, 2008 6:26 pm

Re: [ALPHA] Subject Prefix

Post by onel0ve » Sun May 30, 2010 5:34 pm

Erik Frèrejean wrote:
onel0ve wrote:cant open subject_prefix_install.xml getting error mod x please
Ehm yah that is most likely caused by:
What is the error? ;)
when i open subject_prefix_install.xml then i am getting that kind of error modx file is missing .

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>

User avatar
tbackoff
Former Team Member
Posts: 7022
Joined: Thu Jun 04, 2009 1:41 am
Location: cheerleading practice
Name: Tabitha Backoff

Re: [ALPHA] Subject Prefix

Post by tbackoff » Sun May 30, 2010 6:01 pm

Check the NOTICE at the bottom of this post.
Flying is the second best thrill to cheerleaders; being caught is the first.

Locked

Return to “[3.0.x] Abandoned MODs”