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

Deprecated

That looks like an error I fixed on an earlier version of The Rules. Please verify you are using the latest version of the package and report what version package that is.

Not on Beta 4 yet? Good God man!!! :)

tk2012

LOL... No, I'm not on beta 4...  I'm finally down to the last two errors on my 3.1 forum!  LOL  I'm not going to switch until every mod I've added is available for 4.0   I've been doing all of this between and during hospital visits, so it has taken me a long time to complete.. I'm not ready to do that ALL over again just to get to 4.0!

I was using The Rules.. 1.0   on my 2.0 b3.1

BTW- don't you wish the package manager would include the DATE you installed mods?  Then, we could all figure out WHEN we installed things and could figure out what it is that may be causing our errors quicker...  Maybe someone should suggest that function... or mod.

Deprecated

QuoteVersion 1.04 (Sept. 7, 2008) Fixed bug in SMF 2 installation script, verified SMF 2.0 Beta 4 compatibility.

Well I already fixed your bug in The Rules version 1.04, but I'd be happy to go fix it again just for you. Mmmmm... Mmmmm Yeppers, I just now fixed it again and the fix is still the same! Throw away version 1.0 and install version 1.04. That's your fix!

Ding! Ding! Next customer please! ;) :P


The first thing you should do when you have problems with a mod package is to go to the mod site and verify that you are using the latest version so that you can take advantage of mod authors such as myself who try to fix any bugs that come up in the mod support threads. :D

tk2012

Will do.. I need to go copy my rule pages real quick so I don't lose anything that I included in there.

Thanks!

Deprecated

You shouldn't lose a thing. I like local copies too, but the text goes into the database, not into the mod, so deleting the mod doesn't delete the settings. They'll just come back as whatever they were set at before. I gar-on-tee it! :D

Bugpac ™

Will this work with 1.1.6, I did try to install the package and got an error...

3.     Execute Modification     ./Sources/ModSettings.php     Test failed

badping


Deprecated

#67
Beats the heck out of me. I've been busy 18 hours today focusing on the Beta 4. Please feel free to bump me in the next few days if you have no answer. I'm going to move on to 1.1.6 upgrades within about 24-36 hours.

Thank god I got my ~1,000 member 1.1.5 site upgraded to Beta 4. To be perfectly honest, I'm drinking right now (wine, celebrating) and you would be well advised to not listen to anything that I type. :) Lord it has been a long day! :) Thirteen hours! :)

Don't pay any attention to my posts from here on, until tomorrow, or you'll be sorry. :)

God... what a day. 13 hours to upgrade a 1.1.5 to 2.0b4... It drove me to drinking for sure.

But my forum sure loves it! (The Beta 4, not my drinking.)

tk2012

Quote from: Deprecated on September 10, 2008, 10:29:05 PM
Beats the heck out of me. I've been busy 18 hours today focusing on the Beta 4. Please feel free to bump me in the next few days if you have no answer. I'm going to move on to 1.1.6 upgrades within about 24-36 hours.

Thank god I got my ~1,000 member 1.1.5 site upgraded to Beta 4. To be perfectly honest, I'm drinking right now (wine, celebrating) and you would be well advised to not listen to anything that I type. :) Lord it has been a long day! :) Thirteen hours! :)



Don't pay any attention to my posts from here on, until tomorrow, or you'll be sorry. :)

God... what a day. 13 hours to upgrade a 1.1.5 to 2.0b4... It drove me to drinking for sure.

But my forum sure loves it! (The Beta 4, not my drinking.)

A well deserved drink, too!

Deprecated

Please bump this topic about Friday/Saturday when I will be better able to look at 1.1.6 problems. I think I'm done with my Beta 4 stuff, and just want a bit of a rest. Woah, what a big deal that was! I'm sobering up now, didn't really drink that much, but it's such a relief to not have my 1,000 member 1.1.5 site hanging over me now. Now they're a Beta 4 site, hopefully with no members lost.

Sabre™

#70
lol
Congrats mate, and good work. :)

Enjoy your evening

@ Bugpac ™ & badping
If you would like to do a little manual install, you will have this up and running after 4 simple steps. :)
Remember to always make copies of any file you change :)

Wanna continue?
Ok..
Install the mod regardless of the error.
It usually means that the place this code is sent to, already has code from another mod in its place. So we will add this code there aswell :)

Now go into your forums root directory where you will see your Smileys folder, your Packages folder etc..
This is in the C/Panel of your host.
Enter your  Sources  folder, and open the  ModSettings.php

Now this is where the fun begins :)

Look for
$context['sub_template'] = 'show_settings';

$subActions = array(
'basic' => 'ModifyBasicSettings',
'layout' => 'ModifyLayoutSettings',


And add after it
'rules' => 'ModifyRulesSettings',

then look for
'layout' => array(
'title' => $txt['mods_cat_layout'],
'href' => $scripturl . '?action=featuresettings;sa=layout;sesc=' . $context['session_id'],
),


and add after it
'rules' => array(
'title' => $txt['mods_cat_rules'],
'href' => $scripturl . '?action=featuresettings;sa=rules;sesc=' . $context['session_id'],
),


Now find
require_once($sourcedir . '/ManageServer.php');

$subActions = array(
'basic' => 'ModifyBasicSettings',
'layout' => 'ModifyLayoutSettings',


and add after it
'rules' => 'ModifyRulesSettings',

Now scroll down to the bottom of the file, and add this
function ModifyRulesSettings()
{
global $txt, $scripturl, $context, $settings, $sc;

$config_vars = array(

array('check', 'rules_enable_guest_access'),
'',
array('text', 'the_rules_display_name', '20'),
array('large_text', 'the_rules_text', '12'),
'',
array('check', 'the_rules_enable_agreement'),
array('text', 'the_rules_agreement_display_name'),
'',
array('check', 'the_rules_enable_additional'),
array('text', 'the_rules_additional_display_name', '20'),
array('large_text', 'the_rules_additional_text', '12'),
);

if (isset($_GET['save']))
{
checkSession();

saveDBSettings($config_vars);
writeLog();

redirectexit('action=featuresettings;sa=rules');
}

$context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=rules';
$context['settings_title'] = $txt['rules_title'];

prepareDBSettingContext($config_vars);
}


And hey presto!!
It is done!

If you have any problems understanding any step, or still need assistance, then please post back :)

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


DonaldDasher

I have "The Rules" installed, but when I switch themes it vanishes from my links. I've just installed the "Musiconica" theme and again it's missing. It's enabled in Features and Options, can anybody please help me to get it working again?

www.pre-cert.co.uk
SMF 1.1.8
TinyPortal v0.9.8
pre-certification video

Deprecated

The Rules installs in the default theme. Honestly I haven't gotten into themes yet, although planning on it. I think the way it works, some themes don't call the default functions so those themes have to be manually edited to add the modification.

I can hazard a guess about what's wrong, but not until you say what version SMF you're running.

Deprecated

Please note that The Rules 1.05 has been released. It corrects a bug in the package-info.xml of version 1.04 which prevented uninstallation.

I wouldn't ordinarily issue a second file with no revision change, but I have replaced version 1.04 with a repaired version 1.04 so that people who have installed 1.04 can replace their copy of the package to remove the mod. The best way to do this is to just FTP to your site and overwrite your the_rules_1.04.zip file in your Packages directory. It wouldn't work if the version wasn't still 1.04.

Just to make it clear: If you have already installed 1.04, use the new 1.04 to uninstall. If you are doing a new installation use version 1.05.

I expect to address SMF 1.1.6 compatibility perhaps over the weekend.

Bugpac ™

Im up for it, but i crashed the whole site last night, Now im really in over my head...After i get that figured out ill give it a try... 8)

Deprecated

Version 1.06 released, corrects removal problem in package-info.xml. Earlier versions should not be used.

Cal O'Shaw

HELP!

I upgraded to 1.06.  I now have THREE "Rules" buttons.  I also lost the ability to look at features and options!

HELP!

Cal O'Shaw

I cleaned out the THREE sets of Rules changes in Sources/ModSettings.php, which has given me back features and options.  Now to find out how to get down to just one Rules button...

Cal O'Shaw

Used the instructions for doing a manual install of the mod to reverse engineer a removal of the two duplicates of each edit... I'm very glad SMF added the feature on each MOD page that shows the manual edits :)

Still think this is a great MOD, and glad you wrote it.  Grazie!

Bugpac ™

I got the 1.04 i guess, and it wont uninstall. says i have a fatal error, Any help?

Fatal error: Cannot redeclare modifyrulessettings() (previously declared in /home/bugpac/public_html/index/Sources/ModSettings.php:344) in /home/bugpac/public_html/index/Sources/ModSettings.php on line 410

Advertisement: