Administrator > Site > System Information > Directory Permissions

17 views
Skip to first unread message

deQer

unread,
Nov 24, 2009, 1:44:13 AM11/24/09
to Joomla! CMS Development
CMS: Joomla 1.6 Alpha 2
---

Is this area in need of an update?

Administrator > Site > System Information > Directory Permissions

Perhaps it has been updated already. If so, is there a way for me to
find out for next time?




This is my first post. Let me know if I'm doing it right, or wrong.

Thanks,
Message has been deleted
Message has been deleted

Omar Ramos

unread,
Nov 24, 2009, 2:09:36 PM11/24/09
to joomla-...@googlegroups.com
Something I would like to mention is perhaps to add some additional logic that changes this page depending on whether or not the FTP Layer is being used.

When I would look at this page after a fresh install and I would see all of the unwritable folders, even though I was using the FTP Layer it made me feel like I needed to make those folders writable as well. For the most part, when the FTP Layer is being used all of the folder settings on that page can be ignored, except for the cache folders (as far as I know) since the File caching class uses PHP's file functions directly, and perhaps the images/stories folder (since for example WysiwygPro also uses PHP's file functions directly). Occasionally one would probably also need to make certain folders writable due to some weirdly written extensions that don't use the JFile/JFolder classes.



On Tue, Nov 24, 2009 at 9:27 AM, Louis Landry <louis....@joomla.org> wrote:
Hi deQer,

I'm sure that page needs a good once over to determine which paths need to be checked.  Is that something you are interested in exploring?

- Louis


On Tue, Nov 24, 2009 at 10:36 AM, deQer <ryanbr...@gmail.com> wrote:

It was mentioned that I should be a little more specific on this.  :)



What I'm referring to is the path /images/stories/ is flagged as red,
because it does not exist anymore for a 1.6 installation.  I figured
that this page was perhaps overlooked entirely, so there might be
other paths that are new in 1.6 that need to be added to this page
perhaps which is why I wasn't so specific in my initial post (above).
But, I'm not sure.

Thanks,





--
Development Coordinator
Joomla! ... because open source matters.
http://www.joomla.org



Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Ryan Briscall

unread,
Nov 24, 2009, 10:42:22 PM11/24/09
to Joomla! CMS Development
In addition, we could add structure for an "exists" column to this page.  I've done some testing, and I was able to add this column within several steps of modifications to some of the files of com_admin, language com_admin, and the bluestork template.

End Result: (see attached screenshot)

---

Changes:

File: /administrator/components/com_admin/models/sysinfo.php
Regex Find:
array\('writable' => is_writable([^\n]+), 'message'

Regex Replace:
array('exists' => is_dir$1, 'writable' => is_writable$1, 'message'



File: /administrator/components/com_admin/views/sysinfo/tmpl/default_directory.php
Find:
                    <th>
                        <?php echo JText::_('Admin_Status'); ?>
                    </th>

Insert:
                    <th>
                        <?php echo JText::_('Admin_Exists'); ?>
                    </th>

Find:
                        <td>
                            <?php echo JHtml::_('directory.writable',$info['writable']);?>
                        </td>

Insert:
                        <td>
                            <?php echo JHtml::_('directory.exists',$info['exists']);?>
                        </td>



File: /administrator/components/com_admin/helpers/html/directory.php
Find:
    /**
     * Method to generate a (un)writable message for directory
     *
     * @param    boolean    $writable is the directory writable?
     *
     * @return    string    html code
     */
    public static function writable($writable)
    {
        if ($writable) {
            return '<span class="writable">'. JText::_('Admin_Writable') .'</span>';
        }
        else {
            return '<span class="unwritable">'. JText::_('Admin_Unwritable') .'</span>';
        }
    }

Insert:
    /**
     * Method to generate an exists message for directory
     *
     * @param    boolean    $exists does the directory exist?
     *
     * @return    string    html code
     */
    public static function exists($exists)
    {
        if ($exists) {
            return '<span class="exists">'. JText::_('Admin_Exists') .'</span>';
        }
        else {
            return '<span class="nonexistent">'. JText::_('Admin_Nonexistent') .'</span>';
        }
    }



File: /administrator/language/en-GB/en-GB.com_admin.ini
Add:
ADMIN_EXISTS=Exists
ADMIN_NONEXISTENT=Nonexistent



File: /administrator/templates/bluestork/css/template.css
Find:
span.writable { color:green; }
span.unwritable { color:red; }

Add:
span.exists { color:green; }
span.nonexistent { color:red; }

---

Here is what the result would look like:
http://www.bport.ca/temp/Joomla-1.6-Custom-com_admin-Directory-Permissions.png

Joomla-1.6-Custom-com_admin-Directory-Permissions.png
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Ian MacLennan

unread,
Dec 2, 2009, 11:11:28 AM12/2/09
to joomla-...@googlegroups.com
yeah...  Turned out that I was talking to him on IRC as deQer, and you'll see that part way through this discussion he changed from deQer to Ryan Briscall, and I missed that transition.  Not seeing any further posts by deQer, I assumed he hadn't posted.

Ian

On Wed, Dec 2, 2009 at 11:09 AM, Omar Ramos <orw...@gmail.com> wrote:
Ryan,

Both of your screenshots do appear for me in two separate postings of yours (they also appear in the Google Group page as well).

Posting from Gmail should be a little easier I think (since it does allow you to attach files and whatnot, which is what I'm assuming you did before).

I'm not sure why Ian wouldn't be seeing them, but they are definitely there.

-Omar


On Wed, Dec 2, 2009 at 7:16 AM, Ryan Briscall <ryanbr...@gmail.com> wrote:

After some discussion with Ian, I've become aware that my post did not
show up in here.  My screenshot did not show up either.  I'm going to
assume that's why I haven't heard back from anyone yet on the topic of
"images/stories/"

I'm posting the same thing again now, instead of posting from my gmail
I will try posting from google groups now:

---

Hi Louis,

Thank you for your response.

I've taken a look into the idea of changing images/stories to images,
and
here are my notes:

File: \installation\sql\mysql\joomla.sql
Find:
image_path=images/stories
Replace:
image_path=images

However, when I grepped the site for: "
images(('|")(\.|,)DS(\.|,)('|")|/|\\)stories", I found several
results.
I've attached a screenshot (http://www.bport.ca/temp/Joomla-1.6-Custom-
images-stories-default-path.png
)
of the changes I would like to submit in a patch.

---

Regarding the "Panic Path", I agree.  I will look further into it.

---

Regarding the "DS" topic.  I believe I will revisit this topic later.
In my
browsing, I noticed many areas where we are hardcoding the forward
slash
into the paths of many scripts of the Joomla package.  I predict that
it
would be a lot of work to patch these up, because most of these are
xml
files.

Unless of course these paths are processed with that JPath::clean()
function
(as you mentioned) after grabbing the path from the xml file.  Or at
the
least perhaps do a preg find/replace of find: (/|\\) replace with: DS

Etc.

Either way, I believe there are a lot of areas that need to be checked
to
see if DS is being used.  It's a big task that I will probably leave
alone
for now.

Thanks,





Ryan Briscall

unread,
Dec 7, 2009, 4:07:11 PM12/7/09
to Joomla! CMS Development
Okay, I've created a patch. I read about submitting it to the 1.6 bug
tracker, so I've done that now.

URL: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=18958

Is that correct?

Louis Landry

unread,
Dec 11, 2009, 8:14:20 PM12/11/09
to joomla-...@googlegroups.com
Awesome!

Thanks Ryan.

Committed to trunk as of revision: 13702.

- Louis


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
 To post to this group, send email to joomla-...@googlegroups.com
 To unsubscribe from this group, send email to joomla-dev-cm...@googlegroups.com
 For more options, visit this group at http://groups.google.com/group/joomla-dev-cms?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply all
Reply to author
Forward
0 new messages