Rules page

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
bob_raid
Registered User
Posts: 166
Joined: Thu Jan 17, 2008 12:53 am

Re: Rules page

Post by bob_raid » Sat Feb 23, 2008 9:24 am

Can anyone help I had follow the instruction but I can't add this mod
in the acp module as I couldn't find anything regarding the rules page?

User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Rules page

Post by igorw » Sat Feb 23, 2008 12:06 pm

Renodil wrote:Great. Thanks. Now how do I add more arrays? I tried adding

Code: Select all

$help = array(
	array(
		0	=> '--',
		1	=> 'Rules Category',
	),
	array(
		0	=> 'Rules Item',
		1	=> 'This item demonstrates the rules page. To edit/add/remove items, please edit language/en/mods/rules_page.php.<br /><br /><i>HTML is also possible!</i><br /><br />You can also edit the rules using phpBB3\'s language editor. In the ACP go to System->Language Packs, and select help_rules_page.php from the list.<br /><br /><b>Enjoy!</b>',
		2	=>Title of rule 
		3	=>blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah,
	),
);
But it didn't work. All I got was the first letter of the title showing up.
It would have to be like this, do not forget single quotes around the text:

Code: Select all

$help = array(
	array(
		0	=> '--',
		1	=> 'Rules Category',
	),
	array(
		0	=> 'Rules Item',
		1	=> 'This item demonstrates the rules page. To edit/add/remove items, please edit language/en/mods/rules_page.php.<br /><br /><i>HTML is also possible!</i><br /><br />You can also edit the rules using phpBB3\'s language editor. In the ACP go to System->Language Packs, and select help_rules_page.php from the list.<br /><br /><b>Enjoy!</b>',
	),
	array(
		0	=> 'Title of rule',
		1	=> 'blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah',
	),
);
Renodil wrote:Also how do I place smilies in it? The guy who made the Welcome PM mod used this

Code: Select all

	// Parse the text with the bbcode parser and write into $text
	$subject	= $config['wpm_subject'];
	$message	= $config['wpm_message'];
	$text		= utf8_normalize_nfc($message);

	$uid			= $bitfield			= $options	= '';	// will be modified by generate_text_for_storage
	$allow_bbcode	= $allow_smilies	= true;
	$allow_urls		= false;
	generate_text_for_storage($text, $uid, $bitfield, $options, $allow_bbcode, $allow_urls, $allow_smilies);
	$text			= generate_text_for_display($text, $uid, $bitfield, $options);

	$user->add_lang('ucp');
Problem is when I tried placing it into the file I got a blank page again. I placed it just before the

Code: Select all

if (!defined('IN_PHPBB'))
Since I have no clue on how to write php code I have no idea where it should be placed.
Don't! Never place anything before that line! That line is there for security issues, if you add something before it, you're opening up potential holes.

You can add it before the first:

Code: Select all

$lang = array_merge($lang, array(
But before your stuff you need to add:

Code: Select all

global $config, $user;
bob_raid wrote:Can anyone help I had follow the instruction but I can't add this mod in the acp module as I couldn't find anything regarding the rules page?
This MOD doesn't include an ACP module ;)
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

User avatar
Renodil
Registered User
Posts: 668
Joined: Mon Nov 14, 2005 8:48 am
Contact:

Re: Rules page

Post by Renodil » Sat Feb 23, 2008 10:04 pm

eviL<3 wrote: Don't! Never place anything before that line! That line is there for security issues, if you add something before it, you're opening up potential holes.

You can add it before the first:

Code: Select all

$lang = array_merge($lang, array(
But before your stuff you need to add:

Code: Select all

global $config, $user;
Could you write out the way the code should be and show me where to place it? As I said I have no idea how to write php code.

BTW thanks for showing me how to do the arrays properly.

bob_raid
Registered User
Posts: 166
Joined: Thu Jan 17, 2008 12:53 am

Re: Rules page

Post by bob_raid » Sun Feb 24, 2008 2:33 am

evil<3 wrote:
bob_raid wrote:Can anyone help I had follow the instruction but I can't add this mod in the acp module as I couldn't find anything regarding the rules page?
This MOD doesn't include an ACP module ;)
But why I still can't see it on the index page?

User avatar
Renodil
Registered User
Posts: 668
Joined: Mon Nov 14, 2005 8:48 am
Contact:

Re: Rules page

Post by Renodil » Sun Feb 24, 2008 2:40 am

bob_raid wrote:
evil<3 wrote:
bob_raid wrote:Can anyone help I had follow the instruction but I can't add this mod in the acp module as I couldn't find anything regarding the rules page?
This MOD doesn't include an ACP module ;)
But why I still can't see it on the index page?
Dude. Clear the cache and refresh the theme.

bob_raid
Registered User
Posts: 166
Joined: Thu Jan 17, 2008 12:53 am

Re: Rules page

Post by bob_raid » Sun Feb 24, 2008 2:53 am

I had done that too but I still can't see the Rules beside the FAQ?

I had edit & upload the following files anything I miss out?

Files to Edit
faq.php,
includes/functions.php,
language/en/common.php
Included Files
root/language/en/mods/help_rules_page.php

upload image file
styles/prosilver/theme/images/icon_rule.gif

User avatar
Renodil
Registered User
Posts: 668
Joined: Mon Nov 14, 2005 8:48 am
Contact:

Re: Rules page

Post by Renodil » Sun Feb 24, 2008 3:01 am

bob_raid wrote:I had done that too but I still can't see the Rules beside the FAQ?

I had edit & upload the following files anything I miss out?

Files to Edit
faq.php,
includes/functions.php,
language/en/common.php
Included Files
root/language/en/mods/help_rules_page.php

upload image file
styles/prosilver/theme/images/icon_rule.gif
Uh, yea! Try the entire prosilver.xml or subsilver2.xml instructions found in the templates folder. Depening on which theme you are using follow those instructions. You need to edit the following files.

* styles/prosilver/template/overall_header.html,
* styles/prosilver/theme/bidi.css,
* styles/prosilver/theme/buttons.css,
* styles/prosilver/theme/colours.css

Or:

styles/subsilver2/template/overall_header.html

bob_raid
Registered User
Posts: 166
Joined: Thu Jan 17, 2008 12:53 am

Re: Rules page

Post by bob_raid » Sun Feb 24, 2008 9:31 am

hurray thanks for your help :D now I need to figure out how to add the rules.

If I am not wrong I should edit language/en/mods/rules_page.php. right?

User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Rules page

Post by igorw » Sun Feb 24, 2008 10:22 am

Renodil wrote:Could you write out the way the code should be and show me where to place it? As I said I have no idea how to write php code.
Find this code:

Code: Select all

$help = array_merge($help, array(
Before, add:

Code: Select all

global $config, $user;
Now inside your text, you can use them like this:

Code: Select all

0 => 'Rules from ' . $config['sitename'],
So it would use your board name in there.
bob_raid wrote:If I am not wrong I should edit language/en/mods/rules_page.php. right?
Correct :)
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

User avatar
Renodil
Registered User
Posts: 668
Joined: Mon Nov 14, 2005 8:48 am
Contact:

Re: Rules page

Post by Renodil » Sun Feb 24, 2008 10:39 am

bob_raid wrote:hurray thanks for your help :D now I need to figure out how to add the rules.

If I am not wrong I should edit language/en/mods/rules_page.php. right?
And if you need help with that look above. 2nd post from the top of this page.
eviL<3 wrote:Now inside your text, you can use them like this:

Code: Select all

0 => 'Rules from ' . $config['sitename'],
Use what like what and explain that last sentence.
eviL<3 wrote:So it would use your board name in there.
And BTW is this instructions on how to add smilies to the code, 'cause that's what I'm looking for right now. Also there is no

Code: Select all

$help = array_merge($help, array(
in the help_rules_page.php to find.

User avatar
GoBieN
Registered User
Posts: 543
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Re: Rules page

Post by GoBieN » Tue Mar 04, 2008 10:26 pm

I don't have this mod but i think it would be something like this:

Code: Select all

       $message= ' Your message with smilies and stuff here   :) :p  ';
       $text      = utf8_normalize_nfc($message);
       $uid         = $bitfield         = $options   = '';   // will be modified by generate_text_for_storage
       $allow_bbcode   = $allow_smilies   = true;
       $allow_urls      = false;  //disallow URL BBCODE in the message to be parsed into a working link
       generate_text_for_storage($text, $uid, $bitfield, $options, $allow_bbcode, $allow_urls, $allow_smilies);
       $text         = generate_text_for_display($text, $uid, $bitfield, $options);

  $help = array(
       array(
          0   => '--',
          1   => 'Rules Category',
       ),
       array(
          0   => 'Rules Item',
          1   => $text,
       ),
       array(
          0   => 'Title of rule',
          1   => 'blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah',
       ),
    );

So first you enter your text in the $message variabele, the functions for recognizing BBCODE and smilies do their work and you end up with a variabele called $text with the parsed text in it.
Use this in the help array.

odriego
Registered User
Posts: 158
Joined: Sat Jan 05, 2008 2:25 pm

Re: Rules page

Post by odriego » Sat Mar 15, 2008 3:23 pm

I can`t write Æ ø Å... They all show up like "?" Is it something I have to add in my php dockument for it to display those characters right?.. :D

Anywas thanks for mod!

User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Rules page

Post by igorw » Sat Mar 15, 2008 3:30 pm

You have to save the file with UTF-8 encoding. ;)
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

odriego
Registered User
Posts: 158
Joined: Sat Jan 05, 2008 2:25 pm

Re: Rules page

Post by odriego » Sat Mar 15, 2008 3:41 pm

How do I do that with php?

(got dreamweaver and I know how to do it with html. but not php)

EDIT: I made it. I had to set it to utf-8 in page prefrences.

Great mod

User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Rules page

Post by igorw » Sat Mar 15, 2008 3:46 pm

Should be the same, it's not file extension dependant.
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

Locked

Return to “[3.0.x] MOD Database Releases”