Visual Warning

Started by permutations, July 19, 2005, 06:29:51 PM

Previous topic - Next topic

xenovanis

Are the permissions correct for both file and languagedirectory?
"Insanity: doing the same thing over and over again and expecting different results."

permutations

#21
Quote from: Padfoot on July 21, 2005, 06:24:50 AM
QuoteExecute Modification ./Themes/default/languages/Modifications.english.php Test failed
Getting this error when trying to install the new mod.

Running 1.1 beta 3 with Bar of experience mod, and Member Specific permissions mod.

When i try and unistall bar of experience mod i get the same error, although member specific seems to uninstall without any issues..

If you look inside this file, you'll see it's a simple list of text strings inside PHP tags. It's really hard to screw this up. The basic format of the file is this:

<?php
// Version: 1.1 Beta 3 Public; Modifications

$txt['string_1']='This is string 1.';
$txt['string_2']='This is string 2.';

?>


With no mods installed, it contains only the comment line at the top and the opening and closing php tags:

<?php
// Version: 1.1 Beta 3 Public; Modifications

?>


All a mod has to do is say "Add these strings above the '?>' tag (new lines are added to the bottom of the file). In a MOD file, it will look like this:

<edit file>
$languagedir/Modifications.english.php
</edit file>

<search for>
?>
</search for>

<add before>
$txt['string_3']='This is string 3.';
$txt['string_4']='This is string 4.';
</add before>


In an XML file, it will look like this:

        <file name="$languagedir/Modifications.english.php">
          <operation>
             <search position="after"><![CDATA[?>
]]></search>
             <add><![CDATA[$txt['string_3']='This is string 3.';
$txt['string_4']='This is string 4.';
]]></add>


You can look inside your Modifications.english.php file and see if the format looks right, and look inside the MOD or XML file for your other mods to see if they are modifying this file correctly.

Other possibilities are that you're using a non-English version of SMF, you're using something other than the default theme (Visual Warning only works with the default theme - for other themes, you have to make the changes manually), or (as xenovanis just suggested), your permissions for the SMF files and directories may be incorrect (see the install notes for information).

anunlike

Yes, I had other mods installed before installing this latest version (VisualWarning_v1[1][1].24.tar.gz). But, I had the exact same mods installed before installing the last version of this mod (VisualWarning_v1[1][1].22.tar.gz) and I didn't get this problem then. I guess it's a one time thing (?).

Thanks.

Padfoot

#23
had the previous version of Visual Warning working fine on 1.0.5

Not using a non-english version...have uninstalled the other mods from 1.1 beta, and even uploaded a new clean version of the modifications.english.php file and the tried to install 1.24 with exactly the same results.

If i go ahead and install anyway, ignoring the error, i get a blank space in the Admin menu on the left hand side of CP and when i try to issue a warning to a member, the warning screen appears blank apart from the text boxes...although if i enter the warning level in the top text box and click on the tiny bit of button that also appears, the warning does issue correctly.

Quote<?php
// Version: 1.1 Beta 3 Public; Modifications

?>

That is all that is present in my Modifications.english.php file before installation of 1.24
And its exactly the same after installation if i ignore the warning and install anyway....
However, an new file has appeared Modifications.english.php~ and it contains exactly the same as above....


permutations

Quote from: padfootNot using a non-english version...have uninstalled the other mods from 1.1 beta, and even uploaded a new clean version of the modifications.english.php file and the tried to install 1.24 with exactly the same results.

I'd like to see your Modifications.english.php file. If you have a server where you can upload it, please put it somewhere and post a link. Otherwise, please cut and paste the contents to a message. Open the file in a text editor (e.g. Wordpad if you're on Windows), Ctrl+A to highlight the whole file, Ctrl+C to copy, then Ctrl+V to paste.

permutations

Quote from: Padfoot
<?php
// Version: 1.1 Beta 3 Public; Modifications

?>

That is the entire contents of the Modifications.english.php file, as i already posted in the thread.

The file with ~ is merely a backup....i had the "Create Backup versions of replaced files with a tilda (~) on the end of their names." box checked in the setting tab of Package Manager...


Is this the content of Modifications.english.php or Modifications.english.php~? These are two different files. What is in the .php version?

Padfoot

They are both identical.

The ~ file is a backup created by Package Manager.


permutations

There are some problems with v1.1 of the Package Manager, and I think these may be the cause of the install problems people are seeing. There's a thread about some of the issues here:

http://www.simplemachines.org/community/index.php?topic=40867.0

I'm experiencing the permission problems being described. I think there are other problems as well.

Padfoot

Never had any problems with the package manager.

Downloaded and install 3 other mods all without problem.


permutations

I'm looking... I still don't get any install errors, but I did find a typo. I want to check the other files as well before I upload a fix.

permutations

I just uploaded v1.25. It fixes a couple of typos that certainly would have caused problems. It also switches from the XML version of the modification spec to the MOD version. Although both produce identically modified files (I did file compares on all 14 files), I get an error with the XML version when I click on a profile, but no error with the MOD version. The error is reported in a file that is identical either way (?). There may be an issue with the package manager. In any case, I think that this version should solve the problems people have been seeing.

Padfoot

Great stuff!!

Appears to be working perfectly now.

Thanks for your efforts...

:D

permutations


anunlike

Could you explain what the differences are between VisualWarning_v1[1][1].24.tar.gz and VisualWarning_v1[1][1].25.tar.gz? What changes were made? If there are just a few minor changes, could you list those?

Should I upgrade mine, if my VisualWarning_v1[1][1].24.tar.gz is working fine?

Thanks again.

permutations

Yes, you should upgrade from 1.24 to 1.25. Two typos in the modication file caused syntax errors in two of the source files. You may not be seeing a problem at the moment, but you are likely to eventually.

The typos came from the fact that "after" and "before" have opposite meanings in MOD files versus XML files. I created the XML file from the MOD file, and in two places I'd forgotten to change "after" to "before" or vice versa, so the code was placed in the wrong location in the file.

It takes less than a minute to uninstall, delete the package, reupload, and reinstall.

anunlike

Ok. Thanks.

Well, I don't use the 'SMF Default Theme' as my default theme. I install the package and have it install into the 'SMF Default Theme' automatically. But, as I use another theme, I have to manually go in and edit each of the files that aren't a part of that theme.

Since I did this same thing the past couple of nights as well, I was basically wondering what files I'd need to manually change, just so I don't have to redo everything, if I can get away with doing that.

permutations

Oh, sorry. I think this one is it. So far everyone has said it works fine.

anunlike

Oh, I think you misunderstood. I meant that the past couple of nights, I'd been going through each upgrade you've been putting out.

I'm just wondering what I need to change manually when going from 1.24 to 1.25? Especially for anyone who needs to manually change things.

permutations

The two files that had errors in them were Load.php and Profile.template.php. I can't remember the precise lines that were in the wrong location (placed "before" rather than "after" or vice versa).

gizmo28

Seems I found a minor bug or oversight, which might explain why some people cant find the permissions when they go the permissions panel, the permissions show up but there's no heading over them which makes it easy to miss. the way I fixed it was by replacing this line in Modifications.english.php

$txt['permissionname_visual_warn']='Give warnings and perform post moderation';

with

$txt['permissiongroup_visual_warn']=$txt['visual_warning_mod'];

The only thing you see are the permissions themselves otherwise without a heading, this just puts the heading over them to make them easy to find.

Advertisement: