News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

The Rules

Started by Deprecated, August 25, 2008, 05:42:14 PM

Previous topic - Next topic

xrunner

Super! Thanks for this mod - it serves a very useful function!

Sabre™

Deprecated.
You are a valuable asset to those of us unable to write our own code/script, and I sir thank you :)

For the users going on about the title thing, open your Sources/Rules.php


Search for
loadTemplate('Rules');

Add after
// Set the page title to something relevant.
$context['page_title'] = $context['forum_name'] . ' - ' . $txt['rules'];


This is untested, as my custom theme uses my forum name by default.
If it doesnt work, just delete it.
Im not a coder, so if someone sees an error in what Ive added, please fix it.

Thanks again Deprecated  :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Sabre™

#22
Quote from:  bessieThe only thing that concerns me about using any of Deprecated's mods is that he seems more concerned with churning out new mods than supporting his existing mods.

I personally prefer to use mods where the author is happy to help with any problems, than ones where the author complains about how many new mods they've been making.

It's all well and good creating many new mods, but if they're poorly supported they will quickly become out of date, so what is what is the point?

This forum has a wealth of talented  "script monkeys :P"  and alot of people picking up things along the way.
I personally have watched as those that have asked for help, continue by assisting others. Which is great!
Some of Deprecateds mods are quite simple, and others need a little assistance, but we can all help out at times no?
Atleast, in his own way, he has mentioned that he is a little tired, and not just dropped off like others have.

Im greatful to any person that offers their time, knowledge and effort to every/anyone freely.

I say keep up the good work mate, and if you need a rest, youre not bound by any right not to.  ;)

Cheers :)

EDIT: Hmmmmm...  bessies comment was in between these two. Its been removed  :-\
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Deprecated

Xrunner you are certainly welcome! I've been writing my modification packages not only for the community but I'm a forum operator too and I'm writing what I think my forum needs. I've hoped that my forum experience from my first mod gig 10 years ago to my first admin gig 2 years ago to my most recent gig as forum owner a month ago has given me the experience to appreciate what forums need. I expect that everybody who installs The Rules agrees with me that this is a useful mod, particularly because it depersonalizes the rules as coming from the forum management rather than a single individual, and because the rules tab is visible all the time as a constant reminder. I'm glad that you too like the concept.

Sabre, I think you found my missing title! I'll look into that tomorrow morning and there may be a The Rules version 1.02 in the works with the title fixed. I've been occupied with other mods today and I had hoped that somebody would toss the answer in my lap. Thank you!

Ah, I can see why bessie removed her post. Bessie should understand that I spent most of my afternoon trying to help support a SMF member with a problem with his 1.1.5 forum. My heart is in the right place, but it just seems that I cannot provide 36 hours of support every day. Bessie should know that I've worked about 10-12 hours every day for more than a month, and that includes weekends, doing nothing but coding modifications and providing support for SMF installation and operation problems, and trying to find bugs for the Beta 4.0 guys. Perhaps Bessie would be happier coding her own modifications.

Rather than being referred to as a "script monkey" I prefer to be known for what I am, a professional hardware and software developer. I'm on the cusp of retirement, not decided whether to retire or return to a final work assignment, and I've been spending my undecided time here trying to do what I can to improve SMF. I really appreciate the free software package, and I've been paying it forward returning the benefits I've received. Anybody who has any problem with me should read my posts and see that I've been here all day every day since mid-late July when I first heard about SMF. Anybody who spends more time helping SMF move forward has a right to criticize me, eh Becky?

Sabre, thank you for your help, and thank you for understanding. I'll be here again all day tomorrow, and all day every day probably for weeks to come. I have another mod package in the approval queue, and yet another that I've been working on between helping support SMF and supporting my mods. All will out in good time. :)

wmcintosh

@Sabre, seems to work, good job also.

@Deprecated, mentioned already, good job on this, rather have this then a topic.

Made one small change in my code (Sources/Rules.php), removed whats in the code block.

$context['linktree'][] = array(
'url' => $scripturl.'?action=rules',
'name' => $txt['rules'],
);


So it doesn't read as wmcintosh Forum > Rules > Rules

Sabre™

My pleasure mate, glad I could help :)

With the Forum > Rules > Rules  thing.
At first I renamed the second occurrence to "Site Regulations", then decided that I dont even need a linktree there, so removed it from the rules template.

Looks a little cleaner imo.
Especially since my forums a mess in the first place! lol  ;)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Deprecated

@wmcintosh

Yes, I can understand that, and I applaud your customizing my customization. Open source is what it's all about, and my mods are as open as the SMF forum software. If you've got the capability and the desire to change it, by all means change it.

I like my own setup:

Forum Name > Rules > Forum Rules
Forum Name > Rules > Member Agreement

I'm not presently using my additional page but I thought some might like having another page related to rules and member agreement, perhaps FAQ or something, so I added that customizable page.

It's not over for the development of this mod, and I expect to issue enhancements in the future, or possibly an offshoot, a fully customizable "my button and my pages" mod. Now that I've developed the code it won't be that hard to make the extensions, but it's only deciding what the market wants before I start coding again.

Regards,
Greg




@Sabre

Perhaps I may add a configurable option to hide the linktree. That's a thought well worth considering since the linktree issue is not at all decided. With SMF's uneven handling of the linktree it's almost as if some developers want it and some don't.

All I want personally is that everything should be one way or the other, not half and half.

jimvy

This is an awesome mod...

but when I enter the rules I would like to have then Save them, then I go to the rules tab and it tells me "Rules This feature has not yet been configured by the administrator." If I go back to the admin panel and the rules what I put in the boxes is not there.

Deprecated

Enter some text into the configuration and hit Save, when the page updates is the text that you entered still there?

If you can get into your database (use phpMyAdmin from your hosting cpanel) look at smf_settings and browse to the last >> page and you should see the variable the_rules_text. Is your text showing there? (Or you may need to go back < to the last but one page.)

And that brings up an important point, I presume you did not change your database prefix from the default smf_

Finally, attach modified copies of the files this mod changes, and tell me which version SMF you run:

SMF 1.1.5: index.php, Subs.php, Admin.php, ManageSettings.php, index.english.php
SMF 2.0b3.1: index.php, index.template.php, ModSettings.php, index.english.php

Also supply a list of which modifications you have installed.

@L3


jimvy

#30
Quote from: Deprecated on August 27, 2008, 09:09:45 AM
Enter some text into the configuration and hit Save, when the page updates is the text that you entered still there?
No, it is not still there

Quote from: Deprecated on August 27, 2008, 09:09:45 AM
If you can get into your database (use phpMyAdmin from your hosting cpanel) look at smf_settings and browse to the last >> page and you should see the variable the_rules_text. Is your text showing there? (Or you may need to go back < to the last but one page.)
This could be the problem. I don't seem to have the_rules_text in the smf_settings table.

Quote from: Deprecated on August 27, 2008, 09:09:45 AM
And that brings up an important point, I presume you did not change your database prefix from the default smf_
Tables are all default smf_, and I'm using 1.1.5

I just realized that this same problem occurs when I add info. into the affiliates mod settings area and try to add anything there as well. I added the fields into the table and then tried to enter in the text I want in the forum admin and it still doesn't show up. So I then tried entering the information into the value fields in the table and it does show up. So it seems that there's something stopping the write line process.

damnitmike

QuoteI'm not presently using my additional page but I thought some might like having another page related to rules and member agreement, perhaps FAQ or something, so I added that customizable page.

And I like that! My site is baseball themed, so I am doing the sites rules, and baseball rules....

A nice addition to the forum, IMO!

Keep em coming Depracated!!!!  Tweaking them should be the easy , fun part, eh!

Deprecated

That's great Mike! I had a feeling people would like the extra page, and when I was coding it up the page was easy to add. Actually I could have added any number of pages. I think when this mod gets a bit more feedback and I get a bit more assurance that I've fixed any bugs, then I can probably just tweak it a bit and come out with a new mod package for a universal pages addition, perhaps add up to 10 pages to a new tab which you get to pick the name of the tab, the names of all the pages, and fill the pages with any content you like, and enable/disable display of any pages however you like. It would be a minor rewrite of The Rules.

I've got a TODO item on my list today, to fix the <TITLE> of this mod. I expect to update the mod site with version 1.02 later today.

Greg

Deprecated

I have just released The Rules version 1.03 which has the following changes:

1.) Fixes problem with SMF 2.0 installation script introduced in The Rules 1.01. If you installed 1.01 and have no configuration panel for The Rules, uninstall it and then install the new version 1.03. (Version 1.02 was withdrawn because it did not fix this problem.)

2.) The Rules now has a proper title that appears in the title bar of your broswer. I analyzed the behavior of other SMF sections and the usual title consists of the last level of the linktree. For example, if you go to Personal Messages -> Manage Rules, the browser's title bar shows "Manage Rules." Now if you go to Rules -> Agreement the browser will show "Agreement." If you have customized your agreement title like I have you will see e.g. "Member Agreement." Thanks to L.G.S. for pointing this out, and thanks to Sabre who dropped the clue for me to look at $context['page_title']. :)

3.) As pointed out by wmcintosh it makes no sense if you do not have the agreement and additional page enabled to show a linktree like Forum Name > Rules > Rules. I have modified The Rules so that if you do not have either of the other pages enabled it will drop the last level of linktree and you will see the simple display Forum Name > Rules. Thanks for your suggestion William! :)

Deprecated

Quote from: jimvy on August 27, 2008, 10:32:52 AM
I just realized that this same problem occurs when I add info. into the affiliates mod settings area and try to add anything there as well. I added the fields into the table and then tried to enter in the text I want in the forum admin and it still doesn't show up. So I then tried entering the information into the value fields in the table and it does show up. So it seems that there's something stopping the write line process.

Please reply and attach a copy of your modified ModSettings.php to your post.

jimvy


Deprecated

Okay jimvy here's your file hand modified so that The Rules should work now. The ModifyRulesSetting() function was missing. I added it.

You apparently have 4 mods in addition to mine:

1.) Custom BB Code
2.) Your Button
3.) Affiliates
4.) Flash Chat

It is possible that one or more of them is a bit "off." I predict you will have problems if you ever want to uninstall. My advice is to uninstall them in reverse order to that which you installed them in, and whether or not that goes okay when they are all uninstalled you should copy a fresh ModSettings.php over whatever is left. Let's hope you don't have to uninstall any of them at all.

Report back when you have tried this file. Good luck!

jimvy

I'm getting Fatal error: Cannot redeclare modifyrulessettings() (previously declared in /home/twfamily/public_html/Bunny-Troopers/Sources/ModSettings.php:403) in /home/twfamily/public_html/Bunny-Troopers/Sources/ModSettings.php on line 497
as soon as I try to go into features and settings.

Deprecated

OIC :)

It appears that you installed the affiliates over the top of my mod. My routine wasn't at the bottom where I expected it.

I've fixed the file and attached. I am optimistic this will fix your problem. Report back! :)

SgtMic

Installed this on a very modded SMF 115 with no problems.

By far the best mod for such a simple "clean up" task. It really helped clean up all of our boards. We had the rules stickied on all of them.

Thanks you for this mod. Much needed.
There is nothing more deadly than a US Marine and his rifle.
A close second is a US Marine and his K-BAR.
2/5 Fox Co.  (BlackHearts)
FAST Co. 5th Plt. (FIDO)

Advertisement: