Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rewrite attach_dir_desc #289

Closed
wants to merge 2 commits into from
Closed

rewrite attach_dir_desc #289

wants to merge 2 commits into from

Conversation

AngelinaBelle
Copy link
Contributor

Rewrite as per #288

I agree to the DCO 1.1 at b486a1e#DCO.txt

Rewrite as per #288
<br/> I agree to the DCO 1.1 at b486a1e#DCO.txt
@@ -385,7 +385,7 @@
$txt['attach_dir_ok'] = 'OK';
$txt['attach_dir_basedir'] = 'Base directory';

$txt['attach_dir_desc'] = 'Create new directories or change the current directory below. Directories can be renamed as long as they do not contain a sub-directory. If the new directory is to be in the created within the forum directory structure. Just the directory name can be used. To remove a directory, blank the path input field. Directories can not be deleted if they contain either files or sub-directories (shown in brackets next to the file count).';
$txt['attach_dir_desc'] = 'Create new directories or change the current directory below. <br />To create a new directory within the forum directory structure, use just the directory name. <br />To remove a directory, blank the path input field. Only empty directories can be removed. To see if a directory is empty, check for files or sub-directories in brackets next to the file count. <br /> To rename a directory, simply change its name in the input field. Only directories without sub-directories may be renamed.'Directories can be renamed as long as they do not contain a sub-directory. If the new directory is to be in the created within the forum directory structure.';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have to escape quotes with backslash :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct. I am working too fast and not testing my work, or even reading carefully.

Would it make sense for me to resubmit my pull request?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't have to resubmit just correct the mistake and push to your repo and github updates this PR for you.

Can you please also look at ManageSettings.english > $txt['enable_disregard'] there is small typo it looks I don't want to open new PR for such small change.

@ChainyEO
Copy link

ChainyEO commented Mar 4, 2013

The new version of "attach_dir_desc" also contains errors, so this needs reopening. Is anyone still watching this topic, or should I post somewhere else about it? Sorry, I've never used this system before.

@emanuele45
Copy link
Contributor

Hi Chainy!

Ah..I see you mean the last bit, right?
I think it is enough to remove it, am I correct?

@emanuele45
Copy link
Contributor

This should fix it.
Let me know if is fine and I'll merge the changes in the main repository. ;)

@ChainyEO
Copy link

ChainyEO commented Mar 4, 2013

Here are my thoughts on the above string, followed by a suggested re-wording.

Some parts of the string don't make sense to me. I set up a local installation of SMF2.1 and I took a look at the page in the administration center where this string is used (Administration Center > Attachments and Avatars > Attachment Directories). Consider the following:

"To create a new directory within the forum directory structure, use just the directory name."

  • What does that mean? I suppose it means that the new directory should be created within the existing directory called "attachments". By the way, I tried creating a new directory via the administration center of the forum, but it didn't work. I ended up going directly to the directory and manually creating a new one there.

"To see if a directory is empty, check for files or sub-directories in brackets next to the file count."

  • I can't see what this is referring to. (see the attachment below) There are no brackets anywhere. I think this sentence can simply be left out. The administration center shows this information very clearly, so people don't need any extra pointers.

"Only directories without sub-directories may be renamed. Directories can be renamed as long as they do not contain a sub-directory."

  • Two sentences, both of which say exactly the same thing.

"If the new directory is to be in the created within the forum directory structure."

  • Emanuele, you rightly deleted this sentence as it makes no sense at all!

How about the following re-wording (omitting the comments in brackets, of course):

"On this page you can create new directories for attachments, or change the directory that is currently used.

To create a new directory within the existing directory structure of the forum, just enter the new directory name in a new field. (this still doesn't make much sense!)

To remove a directory, blank out the path input field. It is only possible to remove a directory if it contains no files or subdirectories. (this is clearer than just saying 'empty').

To rename a directory, simply change its name in the input field. Only directories without sub-directories may be renamed."

Screenshot - 040313 - 17:14:54

@emanuele45
Copy link
Contributor

"To create a new directory within the forum directory structure, use just the directory name."

  • What does that mean? I suppose it means that the new directory should be created within the existing directory called "attachments". By the way, I tried creating a new directory via the administration center of the forum, but it didn't work. I ended up going directly to the directory and manually creating a new one there.

It seems the intention is that one but you are right, it doesn't create the directory (and the error message seems wrong either), but just to be sure, let's see if @Kays48 has an idea. 👼

@Kays48
Copy link
Contributor

Kays48 commented Mar 4, 2013

Sorry about the confusing wording. If you just enter a name into the field. A folder with that name should be created in the forum root. At the same level as the Attachments directory.

@emanuele45
Copy link
Contributor

Then it seems we have a bugz! :D

I don't know when it has been broken, though if I put only the name of a dir I get the message that "the directory has been created, but is not writable" but there is not directory...

@ChainyEO
Copy link

ChainyEO commented Mar 4, 2013

Yes, same problem here. No directory was actually created, despite the warning message:

Screenshot - 040313 - 23:54:19

@ChainyEO
Copy link

ChainyEO commented Mar 4, 2013

By the way, I know it's become rather fashionable these days, but is it really necessary for us to adopt the rather annoying style of speech as demonstrated by "Oops, there seems to be a problem." (!?) The same goes for the irritating title to all the pop-up help messages "A little lost? Let me explain:" A user is clearly a little lost if he/she has just clicked on a question mark icon, so the question seems rather pointless.

I suppose this is a question for another place, but I just thought I'd mention it...

@Kays48
Copy link
Contributor

Kays48 commented Mar 4, 2013

Yes, something is probably broken. I checked with my old repo and it works fine there.

Does it work properly if you enter in the full path?

@ChainyEO
Copy link

ChainyEO commented Mar 4, 2013

Yes, if you put the full path in then it works. I just created new directories in the main smf root folder, and also a new one within the 'attachments' directory. Both times entering the full path.

@emanuele45
Copy link
Contributor

Yes, the full path works fine.

I was wondering: this new directory is always created in $boarddir even if it is configured to create automatic directories inside another one?

@Kays48
Copy link
Contributor

Kays48 commented Mar 4, 2013

It is suppose to create it in $boarddir since it's a relative path. Same level as index.php

Hnm, I just did a fresh install of SMF2.1-release-2.1 and that works fine for me also. So I don't know if something is broken or if this is a matter of it not working in all server configurations.

Maybe just remove or change that line. Since if someone does just enter the directory name it's not guaranteed to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants