[BETA] Rules Title Changer

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

[BETA] Rules Title Changer

Post by pertneer »

Modification Name: Rules Title Changer
Author: Pertneer
Modification Description: Adding the ability to set the "Forum Rules" text in each forum and category in the ACP
Modification Version: 0.0.5
MOD License: This mod is released under GNU General Public License v2
Requirements:automod,

Features:
  • Ability to change "Forum Rules" to any text you want


Screenshots:
Image
Image
Image
Image
Image

Demo URL: Demo

Modification Download:Version 0.0.5
Git Repository:RulesTitleChanger
Issue Tracker:Tracker

Translations:
  • German (Casual Honorifics) Deutsch (Du)
Last edited by pertneer on Wed Jun 25, 2014 1:24 am, edited 7 times in total.
I intend to live forever. So far, so good.
Steven Wright
User avatar
Neo
Registered User
Posts: 113
Joined: Tue Jul 07, 2009 5:02 am
Location: Holland
Contact:

Re: [BETA] Rules Title Changer

Post by Neo »

Simple bud nice.

Thanks
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [BETA] Rules Title Changer

Post by pertneer »

Neo wrote:Simple bud nice.

Thanks
Thanks.

This was created as a result of this post in mod requests. I just thought others may like it as well. :D
I intend to live forever. So far, so good.
Steven Wright
faulksie47
Registered User
Posts: 78
Joined: Sat Dec 25, 2010 10:11 am
Location: Reading UK and France

Re: [BETA] Rules Title Changer

Post by faulksie47 »

Installed no problem, however, have an issue when replying to a topic or starting a new one, the rule title for that forum section reverts to Forum Rules.
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [BETA] Rules Title Changer

Post by pertneer »

Thanks, looks like I forgot to add the information to the posting_layout.html file.

I will get that fixed today.
I intend to live forever. So far, so good.
Steven Wright
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [BETA] Rules Title Changer

Post by pertneer »

Updated first post to reflect new version
I intend to live forever. So far, so good.
Steven Wright
faulksie47
Registered User
Posts: 78
Joined: Sat Dec 25, 2010 10:11 am
Location: Reading UK and France

Re: [BETA] Rules Title Changer

Post by faulksie47 »

Cool, thank you, nice mod :-)
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [BETA] Rules Title Changer

Post by pertneer »

Added German (Casual Honorifics) Deutsch (Du) translation (Thanks for the contribution Wintstar)

update to version 0.0.4 due to updating modx file and adding translation.

No other changes have been made.
I intend to live forever. So far, so good.
Steven Wright
User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [BETA] Rules Title Changer

Post by javiexin »

What about multi-language support? Problem is that if you have a multi-language board, these new names are not dependent on the user's language, so it might look odd when having the rest of the interface in one language, and just this string in a different one.

-javiexin
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [BETA] Rules Title Changer

Post by pertneer »

Are you talking about the text that is entered into the fields in the ACP not being translated? I will have to find a way to do this, not sure if it is even possible without the use of an outside source to translate.
I intend to live forever. So far, so good.
Steven Wright
User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [BETA] Rules Title Changer

Post by javiexin »

Yes, I was referring to the new "Forum rules" labels. But nevermind, as the forum rules themselves are not multi-language... which is a limitation (nice way to say it is an error), in my POV, but that is the "standard" phpbb3...

If you were to attempt it, a good way to do it would be using the same way that is used in CPFs, with language strings per forum language (for CPFs, Field Name and Field Description, and even Field Value Options for dropdown boxes, are language dependent).

BR,
-javiexin
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [BETA] Rules Title Changer

Post by pertneer »

I never noticed this "feature" (bug) before as I have never added language packs before. Since you brought it up I have tested this for my own experience. What I found is that if you only add the text you add does not get changed, but the word "Rules" does get translated. The reason for this is the software (phpbb3) is not doing the translating, it is just using a different language files. So it would have to somehow translate what was typed and then show it depending on user language. This seems a little up and above of the original intention of the MOD. For the most part the main language of the board is the language it will be typed in anyway, so most users will be able to speak that language. I think for this MOD I will just stick with providing the translation if anyone wants to create them for it.
I intend to live forever. So far, so good.
Steven Wright
User avatar
ViolaF
Registered User
Posts: 1552
Joined: Tue Aug 14, 2012 11:52 pm

Re: [BETA] Rules Title Changer

Post by ViolaF »

I think, its not that complex to add that function ;)
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [BETA] Rules Title Changer

Post by Jessica »

Good mod.
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
mh5bl
Registered User
Posts: 12
Joined: Thu Apr 10, 2014 10:54 pm

Re: [BETA] Rules Title Changer

Post by mh5bl »

This addin works but I have modified it as I'm using it with Styles 'subsilver2' and those files where not modified when installed. I changing it so that the "Link to forum rules:" HTTP file will work and also the CSS styles for the text on the custom title is the some
Adding this code in the 2 files viewtopic_body.html and viewforum_body.html line 3

Code: Select all

<!-- IF S_FORUM_RULES -->
	<div class="forumrules">
		<!-- IF S_FORUM_RULES_TITLE -->
			<!-- IF U_FORUM_RULES -->
				<h3>{U_FORUM_RULES_TITLE}</h3>
				<a href="{U_FORUM_RULES}"><b>{L_FORUM_RULES_LINK}</b></a>
			<!-- ELSE -->
				<h3>{U_FORUM_RULES_TITLE}</h3><br />
				{FORUM_RULES}
			<!-- ENDIF -->
		<!-- ELSE -->
		<!-- IF U_FORUM_RULES -->
			<h3>{L_FORUM_RULES}</h3><br />
			<a href="{U_FORUM_RULES}"><b>{L_FORUM_RULES_LINK}</b></a>
		<!-- ELSE -->
			<h3>{L_FORUM_RULES}</h3><br />
			{FORUM_RULES}
		<!-- ENDIF -->
	<!-- ENDIF -->
	</div>

	<br clear="all" />
<!-- ENDIF -->
Hope this help someone else and thanks pertneer
Locked

Return to “[3.0.x] MODs in Development”