Advertisement:

Author Topic: The Rules  (Read 88301 times)

Offline Deprecated

  • SMF Hero
  • ******
  • Posts: 3,031
  • Gender: Male
  • I tried being reasonable... I didn't like it.
The Rules
« on: August 25, 2008, 05:42:14 PM »
Link to Mod

Almost every forum has some form of their rules and the usual practice is to post them in the forum's announcements board. This is problematic because new members are generally unfamiliar with the forum's organization and may overlook reading the rules post.

The Rules solves this problem by adding a "Rules" tab to SMF's top menu, visible from every page on the site. Not only does this make the rules easy to access, but the tab serves as a constant reminder that the site has rules that members are expected to obey. Additionally, the rules are presented in an integrated fashion rather than having been posted by some specific person. This depersonalizes the presentation of the rules so that they appear to come from the forum manangement team rather than from any specific individual.

Features

  • Adds a new "Rules" tab to SMF's top menu. Accessing this tab displays your forum's rules.
  • Enter your rules contents into the configuration settings of The Rules using plain text plus BBCodes.
  • Optionally displays the agreement.txt file on a separate page, when feature is enabled.
  • Optionally displays an additional page which you may customize for anything you want, when feature is enabled.
  • The titles of all three pages are configurable by the administrator.
  • The "Rules" tab label can be customized to suit your preferences or to aid internationalization.
Full configuration instructions are provided in the included readme.txt file.
« Last Edit: April 21, 2012, 04:21:48 PM by Deprecated »
No support PMs please!

Offline stikkki

  • SMF Hero
  • ******
  • Posts: 2,537
  • im just the idiot the pc employs 2 click the mouse
    • eots dzine smf themes
Re: The Rules
« Reply #1 on: August 25, 2008, 07:16:34 PM »
wainting to see if deprecated can manage to squeeze this mod in via a manual edit with all the other mods ive got but if he can then bonus as this is a very proffessional looking modification that does add real functionality and does away with posts about site rules to create a cleaner more accessable forum rules presentation

Offline Deprecated

  • SMF Hero
  • ******
  • Posts: 3,031
  • Gender: Male
  • I tried being reasonable... I didn't like it.
Re: The Rules
« Reply #2 on: August 25, 2008, 07:21:13 PM »
I'm coming up on 11 hours straight programming today, so I don't think that's going to happen. :) I've just posted your files for the other mod. Get that working before you tackle another one. You've finally driven me to drink! :) Now if I can just figure out how to get the cork out of my dinner... ;)
No support PMs please!

Offline Charles Hill

  • Sophist Member
  • *****
  • Posts: 1,007
  • Gender: Male
  • question everything
    • Degrees of Zero :: Websites That Work.
Re: The Rules
« Reply #3 on: August 25, 2008, 07:23:20 PM »
I'm coming up on 11 hours straight programming today, so I don't think that's going to happen. :) I've just posted your files for the other mod. Get that working before you tackle another one. You've finally driven me to drink! :) Now if I can just figure out how to get the cork out of my dinner... ;)

lol.... yawn @ 11 hours.... I've been pulling 12-16 hours of programming daily for a few days trying to get a beta of blog community ready.  We should talk on aim sometime, deprecated.  You seem quite creative :)
Web Design Services

SMF Modifications:
Drafts

Offline stikkki

  • SMF Hero
  • ******
  • Posts: 2,537
  • im just the idiot the pc employs 2 click the mouse
    • eots dzine smf themes
Re: The Rules
« Reply #4 on: August 25, 2008, 07:28:07 PM »
today, 2mora, the next day whenever............. will still be a more than worth while mod to have

Offline Deprecated

  • SMF Hero
  • ******
  • Posts: 3,031
  • Gender: Male
  • I tried being reasonable... I didn't like it.
Re: The Rules
« Reply #5 on: August 25, 2008, 07:31:24 PM »
@Charles

I've been programming 10-12 hours a day for every day the last month or so since I started my first SMF forum. I've got nearly a dozen mods now, the latest due to hit the fan any time now. ;) I'm thinking that all work and no play is making me pretty dull, and that all my recently released mods are going to add up to supporting them rather than spending as much time making new ones. And finally, my forum has a reason to exist, focusing on a hobby/handicraft, and I need to take some time out to participate in my own forum and the hobby activities before I lose touch with my members.

I don't have any chat or other programs. Just forums and emails. :) Thank you for the compliment. :)
No support PMs please!

Offline Azhtek

  • Semi-Newbie
  • *
  • Posts: 15
Re: The Rules
« Reply #6 on: August 26, 2008, 03:04:59 AM »
Great mod! This'll be a big help and stop people from claiming to not know the rules when they get in trouble.

I was wondering though, is there a way to add other sections to it? For instance, as well as the main site rules section, member agreement and the additional section, I'm wanting to add individual areas for a chat and gallery's rules, just so people don't have to sift through walls of text.

Offline tk2012

  • Full Member
  • ***
  • Posts: 401
  • Gender: Male
  • Thank U 2 those who create, assist, & sustain SMF!
Re: The Rules
« Reply #7 on: August 26, 2008, 03:17:13 AM »
Just added this to my site (v2.0 b3.1) and had one test fail.  (Admin.php) because the Custom Form Mod interferes with the coding it is looking for.

It is looking for:
Code: [Select]
// Mod Authors for a "ADD AFTER" on this line. Ensure you end your change with a comma. For example:
// 'shout' => array($txt['shout']),
// Note the comma!! The setting with automatically appear with the first mod to be added.

But, because of Custom Form Mod, this is changed already to:
Code: [Select]
// Mod Authors for a "ADD AFTER" on this line. Ensure you end your change with a comma. For example:
// Place the Custom Form Mod Link.
'customform' => array($txt['CustomForm_tabheader']),
// 'shout' => array($txt['shout']),
// Note the comma!! The setting with automatically appear with the first mod to be added.

If you shortened the search code to just:
Code: [Select]
// 'shout' => array($txt['shout']),
// Note the comma!! The setting with automatically appear with the first mod to be added.

it would work without a failed test.

Anyway, just wanted anyone who uses Custom Forms to know the mod will work perfectly as soon as you make the manual edit to the Admin.php file in Sources.

Offline Nathaniel

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,118
  • Gender: Male
    • Verbtest.com
Re: The Rules
« Reply #8 on: August 26, 2008, 03:28:08 AM »
@tk2012,
Thats an interesting mod confliction issue. I am pretty sure that the Custom Form Mod used to make that edit the way that this mod does, but I changed it after it conflicted with another mod. ;)

It should work perfectly. :)
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Offline tk2012

  • Full Member
  • ***
  • Posts: 401
  • Gender: Male
  • Thank U 2 those who create, assist, & sustain SMF!
Re: The Rules
« Reply #9 on: August 26, 2008, 03:31:34 AM »
I didn't do a manual edit in Admin.php when I installed the CFM.  Both of the mods are working perfectly though!   :D

Offline L.G.S

  • SMF Hero
  • ******
  • Posts: 2,666
  • Gender: Male
  • RuthlessIntent.com !
    • GamesandGoals.com
Re: The Rules
« Reply #10 on: August 26, 2008, 05:54:13 AM »
Can you please make it so that the Rules page has a proper title? It doesn't look good with just the link up there.
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Offline damnitmike

  • Semi-Newbie
  • *
  • Posts: 95
  • Gender: Male
Re: The Rules
« Reply #11 on: August 26, 2008, 08:23:44 AM »
I am going to keep trying , when time allows....but for now, 2 problems occurred...

1....I somehow managed to get 2 of the Rules Mod Packages in my Packages Listing....(Usually it says something like, You Dummy, You already downloaded it)

2. A Mod Settings error....

Anyhow, What A Great Idea for a mod.....

Another question. Would this be a great mod to made into a universal type mod.....where you could name the button whatever you wish, and then add the pages to correspond to it?

For  example....Download the now "Universal Mod", Name the button FiFi, then add FiFi pages to it?


Anyhow......I'll work on the Rules install later....Nice Addition to a forum!

Offline Deprecated

  • SMF Hero
  • ******
  • Posts: 3,031
  • Gender: Male
  • I tried being reasonable... I didn't like it.
Re: The Rules
« Reply #12 on: August 26, 2008, 08:52:10 AM »
Just added this to my site (v2.0 b3.1) and had one test fail.  (Admin.php) because the Custom Form Mod interferes with the coding it is looking for...

Anyway, just wanted anyone who uses Custom Forms to know the mod will work perfectly as soon as you make the manual edit to the Admin.php file in Sources.

Thank you very much tk2012 for not only pointing out the conflict but even including a fix!

I had read the code where it says, "Mod Authors for a "ADD AFTER" on this line. Ensure you end your change with a comma. For example:" and it appears that I should have taken it literally. As a neat coder I unconsciously added my code after the comment block. I have decided to follow Custom Form's lead and construe the comment line literally.

Revision 1.01 of The Rules has been updated to the mod site. The change affects only the install script for 2.0, and the search has been reduced to looking for the single line per the above.

Thanks again for the feedback! I think this is the first time somebody actually helped ME in one of my mod support threads! :D
No support PMs please!

Offline Deprecated

  • SMF Hero
  • ******
  • Posts: 3,031
  • Gender: Male
  • I tried being reasonable... I didn't like it.
Re: The Rules
« Reply #13 on: August 26, 2008, 09:00:38 AM »
Can you please make it so that the Rules page has a proper title? It doesn't look good with just the link up there.

OIC. You mean there is no proper <TITLE>. Can you give me a quick pointer to where that is invoked?
No support PMs please!

Offline Deprecated

  • SMF Hero
  • ******
  • Posts: 3,031
  • Gender: Male
  • I tried being reasonable... I didn't like it.
Re: The Rules
« Reply #14 on: August 26, 2008, 09:15:02 AM »
I am going to keep trying , when time allows....but for now, 2 problems occurred...

1....I somehow managed to get 2 of the Rules Mod Packages in my Packages Listing....(Usually it says something like, You Dummy, You already downloaded it)

2. A Mod Settings error....

It seems to me that you've got a problem with SMF and the package installer. The mod author has no control over how this process works, and as far as I know the mod package is designed properly as far as the modification script and package-info are concerned.

I don't know how many mods you have installed so this could be a biatch but in my test forum I would uninstall all the packages, then delete the mod list, and then I would delete and replace or copy over all the PHP scripts any of the mods touched, then reinstall any desired mods.

I don't know of any other way to resolve a muck-up when a package is inadvertently installed twice, partially installed, partially removed, etc.

Another question. Would this be a great mod to made into a universal type mod.....where you could name the button whatever you wish, and then add the pages to correspond to it?

For  example....Download the now "Universal Mod", Name the button FiFi, then add FiFi pages to it?

Well actually at the beginning of coding I had considered adding 10 custom pages to make it an even dozen, but then I thought that was overkill, decided that very few people would use even the one additional page. I decided that adding the configuration code for that would make the configuration page about 4 feet tall (1.3 meters to you international folks! ;)) and I thought that would make the configuration page look really ugly. Then I noticed other configuration areas of SMF where you can click links to expand blocks that configure additional features, and that looked like a good solution. However, I wanted to release the modification so that people could begin using it, and every software developer knows that at some point you have to quit bloating the features and ship it!

I'll consider adding additional "additional" pages at a future date depending on demand.

As far as the universal mod, IIRC there is one like that for SMF 1.1.5 although maybe it's just adding buttons and actions but no provision for adding pages. I'll entertain the idea of making a new, different mod that does that depending on if there is any demand. Feedback on this would be helpful as I have many other mods that are also in the idea stages and a few further along than that, so I have to budget where I put my time.

Feedback on universal mod?  Note that this would be a separate mod.
No support PMs please!

Offline damnitmike

  • Semi-Newbie
  • *
  • Posts: 95
  • Gender: Male
Re: The Rules
« Reply #15 on: August 26, 2008, 09:36:04 AM »
Thanks Deprecated!

I enjoy reading/discussing/ the troubleshooting of these mods. For myself, and others I would guess, this is the only way we can improve our sites, and learn while doing it....

When you guys discuss it in a polite tone, it really is encouraging. For now it is my only teaching method, being totally self taught...

The double install was weird....it only happened that once. The site works, and has gotten to the point where it looks pretty good also....the thoughts of a total rebuild at this time is scarey....

I'm not worried.....I'll figure it out...its how I learn.....and....If I have to manually install this mod, no problemo!

Thanks for taking the time to reply!


Offline Deprecated

  • SMF Hero
  • ******
  • Posts: 3,031
  • Gender: Male
  • I tried being reasonable... I didn't like it.
Re: The Rules
« Reply #16 on: August 26, 2008, 10:37:05 AM »
You don't really need a total rebuild. First look at the files that The Rules touched, make sure that the code isn't included twice. If it is, just manually edit and remove the extra instance of the duplicate code. At that point it should be only your installed list that is borked up, a minor annoyance. I'm fairly certain that the installed list is kept in the database, so you should be able to phpMyAdmin into it and just delete the extra instance from the installed list, and at that point you should be good to go.

Look into it and get back and tell us what you found and what you fixed and whether your SMF is back to normal. I'll look into it myself after you've made an effort to fix it yourself and haven't succeeded.
No support PMs please!

Offline damnitmike

  • Semi-Newbie
  • *
  • Posts: 95
  • Gender: Male
Re: The Rules
« Reply #17 on: August 26, 2008, 05:22:57 PM »
Deprecated, Thanks for your time!

I checked for double occurrences of the code.....none....checked phpmyadmin for same....none.....Went to MYSQL and did a database repair....everything was fine....

I manually editted the modsettings page after I installed it through Package manager.....2 of the 3 edits were there, I did the 3rd manually....

It works nicely.....everything on the forum is working nicely....

The only thing I did notice, was my host a few weeks ago upgraded cpanel...I hadn't been into it in a few days and noticed when I went to it today it had yet changed again......

So I have to think maybe thats what goobered it up....I am certain they are probably tweaking it........

But I rate my host as Superb, am totally confident if there's a problem, they will rescue it, as they have in the past....and do it happily.

I did learn  something after viewing your mod....and I kick myself for not figuring it out....and that was how to mod different versions of SMF....I am finally getting some time to sit and give things a good look....

Thanks!!! Love your work!

wmcintosh

  • Guest
Re: The Rules
« Reply #18 on: August 26, 2008, 05:33:24 PM »
Looks good, except for no title.

Offline Deprecated

  • SMF Hero
  • ******
  • Posts: 3,031
  • Gender: Male
  • I tried being reasonable... I didn't like it.
Re: The Rules
« Reply #19 on: August 26, 2008, 05:42:01 PM »
I did learn  something after viewing your mod....and I kick myself for not figuring it out....and that was how to mod different versions of SMF....I am finally getting some time to sit and give things a good look....

Thanks!!! Love your work!

 :D

Yes, I imagine you DID learn something!!! In fact I wondered how long it would take for my mod to become a good example of dual-1.1.5/2.0 capable coding. It took me literally days to figure that little trick out! I won't say there are no other mods doing that but I've looked through as many as I can and I haven't found one yet that installs under Modifications for 2.0 and under Features and Options for 1.1.5.

I hate to think that the new Modifications section was included so that mod authors would have an easier time of coding their modifications, but what it has done for me is double the coding job for adding the configuration screens and making them work with both SMF versions.

IIRC it took me three full days to get it working perfectly. However, I coded up another mod that also had the dual SMF version feature, and the configuration panel coding took me less than 2 hours. :)

There are a lot of other mod authors out there who have 1.1.5-only mods, and I hope some of them will benefit from my work. One thing about open source code, once you invent a coding trick it becomes everybody's coding trick. :)
« Last Edit: August 27, 2008, 11:26:15 AM by Deprecated »
No support PMs please!