The Rules

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

Previous topic - Next topic

Gidget Claire

Hi Deprecated,

First of all thanx all a lor creating this great mod.  :)

I have a little problem and I don't know how to solve it. Here's the situation:
I use smf 2.0 beta public 3. 1 and I did all the necessary file editing. At first things looked okay, I had a rule button and it said 'the admin hasn't configured' or something. So I went to my admin pannel and looked for the area where I could add my forum rules. I realized i was getting blank pages in certain important areas like 'modifications', 'security and moderation' and 'feature and configuration'.
This is the kind of thing I get
www.mydomain.com/forum/index.php?action=admin;area=securitysettings;sesc=f823233d750136b5c5e083df2c651140

I went to packages and unsinstalled the mod. Then I went back to my admin to check on the features and other links that had gotten wrong and everything was back to normal.  :P Back to the modification page, I saw there was indeed a button called the rules, so I added my forum rules and saved the modifications. Then I applied the mod again, saw it really works, people can read the rules... but those three admin functions aforementioned can' t be accessed.
I don't really need those functions at the moment, but I'm really scratching my head at finding a solution.  :-\ Basically, the only option I have at the moment is to unstall the mod whenever I need to access some admin pages and if I do so, people can't view the rules (they're still in a thread at the board though  ;D). 

Active mods: smf gallery (edited for my board, works alright, was added yesterday)
                     the rules ( edited files, was added today)

Inactive packages: more spiders
                               remove quoted images (added yesterday, for this last one the file editing has been performed but the mod didn't seem to work, so I temporarily uninstalled it).


Any idea on what got wrong?  ???



Friend of the friends!

Deprecated

It sounds like you made a mistake on your editing. It's hard to know now exactly what is and isn't right. Probably the best thing to do is to remove ALL of your mods, then copy over your main SMF files from a local archive of the original files. That would be the files in your source, theme and languages directory, plus the basic index.php.

It's probably your ManageSettings.php that is corrupted.

Costa

Translation to brazilian

$txt['the_rules_not_configured'] = 'Esta opção não está ainda configuraada pelo administrador.';
$txt['agreement'] = 'Acordo de registo';
$txt['rules_enable_guest_access'] = 'Permitir o acesso de visitantes:'; $txt['the_rules_display_name'] = 'Nome visível da página das regras:'; $txt['the_rules_agreement_display_name'] = 'Nome visível da página do Acordo de registo:';
$txt['mods_cat_rules'] = 'As Regras';
$txt['rules'] = 'Regras';
$txt['rules_title']='As Regras';
$txt['rules_title_rules'] = 'Regras';
$txt['the_rules_text'] = 'Texto que será mostrado:';
$txt['additional'] = 'Adicional';
$txt['the_rules_additional_display_name'] = 'Nome visível da página adicional:';
$txt['the_rules_additional_text'] = 'Texto que será mostrado:'; $txt['the_rules_enable_additional'] = 'Permitir a visualização da página adicional:';
$txt['rules_title_additional'] = 'Adicional';
$txt['rules_title_agreement'] = 'Acordo de registo';
$txt['the_rules_enable_agreement'] = 'Permitir a visualização do Acordo de registo (agreement.txt):';
$txt['the_rules_edit_name'] = 'Editar o Acordo de registo (agreement.txt)';


If you add this i test again and review the mistakes  :P

Congrats
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

Gidget Claire

Quote from: Deprecated on September 24, 2008, 09:43:31 AM
It sounds like you made a mistake on your editing. It's hard to know now exactly what is and isn't right. Probably the best thing to do is to remove ALL of your mods, then copy over your main SMF files from a local archive of the original files. That would be the files in your source, theme and languages directory, plus the basic index.php.

It's probably your ManageSettings.php that is corrupted.

I removed the mod a few minutes ago and I simply deleted any code I had added, backwards mode - the code that was added last was the first to go. It was very easy to do that, actually, since your modification requires extra code and not the replacing of an existing part. I checked on everything before I deleted each part, and saw nothing wrong. I have no idea on where the installation went wrong.

Friend of the friends!

W. Riker

When I want access my admin -> modifications and setting i get

Fatal error: Cannot redeclare modifyrulessettings() (previously declared in /home/censured/public_html/forum/Sources/ModSettings.php:383) in /home/censured/public_html/forum/Sources/ModSettings.php on line 449


I will bold the line 449:
Quote$context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=rules';
   $context['settings_title'] = $txt['rules_title'];

   prepareDBSettingContext($config_vars);
}

?>


Please help...  :'(

Deprecated

Riker, you have a failed removal or a double installation. You've got two copies of the modifications in one file. You'll either have to manually remove the edits or you can remove all your mods then copy over the file (and any others touched by your mods).

W. Riker


W. Riker

If I want to change the name of "rules" button on forum main page how can i do that?

edi67

CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

edi67

Quote from: W. Riker on September 30, 2008, 09:07:22 AM
If I want to change the name of "rules" button on forum main page how can i do that?

In file languages Modifications.english.php edit this line:

$txt['rules_title_rules'] = 'Rules';

change Rules with word that you prefer ;) 
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Deprecated

Thanks for the compliment. :)

I didn't verify the rules_title_rules thing but Riker let us know if that works for you. If not I'll look into it.

Actually adding the capability to rename the tab sounds like a good idea, and I'll see if I can add it to the standard features. I will of course update the thread if I add this feature.

W. Riker

That change has no effect.

Deprecated

Heh. LoL. I had hoped edi67 had the right answer. I didn't want to look into it because sometimes tab behavior can get pretty complicated. What I mean is that if you get one small thing wrong you can get some very bizarre results. Ask me how I know. ;)

You want to change the text in $txt['rules']. It will appear upper case on the tab no matter what case your label is. If you change your Modifications.english.php file directly (and running SMF 2) you will want to clear your SMF file cache before you can see the change.

Let me know how $txt['rules'] works for you.

W. Riker

Yes i also know that when you change small thing in wrong way there can be great mess. I also felt it on my own skin. ;)

Never mind this change. Let it stay Rules. It is not that big problem to wast so much of your time.

Thanks anyway. O:)

Deprecated

Well I like the idea of being able to change the tab label, so I may go ahead and add that anyway. I got to thinking that some people might like a little less authoritative title, and non-English speaking can easily change the name of the tab to something meaningful in their own language. You could of course change the language file but the option would make the change much easier. I may do it just for fun. :)

Necto

I installed it on 1.1.6 and on default theme works perfect so i edited files to get it working on custom theme and im stuck here atm.
Don't know what to edit to fix Rules possition in header.

Pics.
[nofollow]

[nofollow]

Help please  O:)

Deprecated

I hate to tell you but I know virtually nothing about themes other than the default theme. Either somebody else will have to help you, or I suggest you should post your question in a theme related board here at SMF.

edi67

Quote from: W. Riker on October 01, 2008, 09:35:46 AM
That change has no effect.

Dude my suggest WORK perfectly i USING the same thing for my italian version if work for ME must work for you too ;)
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Costa

Quote from: Necto on October 01, 2008, 04:32:33 PM
I installed it on 1.1.6 and on default theme works perfect so i edited files to get it working on custom theme and im stuck here atm.
Don't know what to edit to fix Rules possition in header.

Pics.




Help please  O:)

Dude, send the index.template.php for me and i try to help you
that happens to me too, with dilber MC, and in dilber it's simple, but i need to look at you index.template
after that i post here and explain the process

Farewell

Quote from: edi67 on October 02, 2008, 07:20:04 AM
Quote from: W. Riker on October 01, 2008, 09:35:46 AM
That change has no effect.

Dude my suggest WORK perfectly i USING the same thing for my italian version if work for ME must work for you too ;)
It's true, you only need to change:

File: Modifications.english.php
Find the string: $txt['rules_title_rules'] = 'Rules';
And chage the Rules for the word you want, banana, Giraffe, wathever you want  :P
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

italo_anonimo

thanks for mod! Use it to show my forum rules in the menu. But one question about it:

I get a lot of errors logs like this:
http://www.mysite.com/foro/index.php?board=68.0
8: Use of undefined constant rules - assumed 'rules'
Archivo: /home/****/public_html/foro/Themes/default/languages/ThankYouPost.spanish_es.php (main_above sub template - eval?)
Línea: 914


http://www.mysite/foro/index.php?topic=947.0;prev_next=next8: Use of undefined constant rules - assumed 'rules'
Archivo: /home/*****/public_html/foro/Themes/default/Display.template.php (main_above sub template - eval?)
Línea: 914

http://www.mysite.com/foro/index.php
8: Use of undefined constant rules - assumed 'rules'
Archivo: /home/*****/public_html/foro/Themes/Outline/BoardIndex.template.php (main_above sub template - eval?)
Línea: 914


..And so on. That were about 100 pages of error messages like this one day! How can I fix this? I'm using 1.1.6 These mods are installed:

1     Googlebot & Spiders Mod   2.0.3       
2.   Topic description   1.1       
3.   Country Flags   1.0.1       
4.   Advanced Recent-Posts   1.1       
5.   SMF 1.0.14 / 1.1.6 Update   1.0       
6.   Registered Links   1.0       
7.   Bookmarks   1.0.1       
8.   SMF 1.0.12 / 1.1.4 / 2.0 b1.1 Update   1.0       
9.   GoEar BBCode by Mike Menendez   0.4       
10.   Auto Email Inactive Ordinary Users   1.2       
11.   cbi, 1.0   1.0       
12.   Spiders Don't Increase Topic Views   1.1       
13.   SMF Radio   1.1       
14.   Reason For Editing Mod   1.14       
15.   Google Video BBC Tag (XHTML Compliant)   1.3       
16.   BBC-Google for SMF 1.1.2 (ver. 2.5.2)   2.5.2       
17.   YouTube BBC Tag (XHTML Compliant)   1.0       
18.   Increase/Decrease Postbox Size   1.0       
19.   SMF 1.0.11 / 1.1.3 Update   1.1       
20.   Display Age and Location next to posts   1.0       
21.   Simple ImageShack   2.0.3       
22.   SMF Shoutbox   1.20       
23.   Anonymize Links   2.1       
24.   Copy Topics   1.0       
25.   SMF Archive   1.1       
26.   Topic starter   1.3      
27.   Separe post epingle by MkC   2.0       
28.   Users Online Today Mod   1.4.0       
29.   SMF 1.0.13 / 1.1.5 / 2.0 b3.1 Update   1.0       
30.   Select All And Copy Code To Clipboard   1.2       
31.   The Rules   1.06       
32.   Member Color Link   2.0.0       
33.   Topics Filter   2.3       
34.   Enhanced Quick Reply Box 2.0.2   2.0.2       
35.   Global Announcements   1.0       
36.   Thank-O-Matic   1.1.8       
37.   Anti-Bot Registration Puzzles



thanks 

Advertisement: