Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: image_folder  (Read 8491 times)

mosh

  • Hero Member
  • *****
  • Karma: 77
  • Posts: 510
  • Awesome day :)
    • cms-zen
image_folder
« on: October 21, 2006, 03:52:01 PM »

hey :)
i am doing translation to hebrew for the latest version 1527 rc2.

there is a line missing:
Quote
$l['image_folder'] = 'img';
should it be added or just leave it out ?

thanks 4 all the great work you do :)

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
image_folder
« Reply #1 on: October 21, 2006, 04:02:07 PM »

I'm not exactly sure of why, but you do not need that one... ;) So leave it out.
Logged
"It's only dead fish that goes with the flow... "
Updated

mosh

  • Hero Member
  • *****
  • Karma: 77
  • Posts: 510
  • Awesome day :)
    • cms-zen
image_folder
« Reply #2 on: October 21, 2006, 05:07:07 PM »

cool ty :)

edsil

  • Jr. Member
  • **
  • Karma: 5
  • Posts: 97
image_folder
« Reply #3 on: October 29, 2006, 01:08:32 AM »

Hi out there!!!
euh, I dont know if this question goes here, but I see tha MO was asking about the missing
$l['image_folder'] = 'img';

So I have a problem about it: when I go to the files settings and want to see the files, I have all kind of files and not just the "img" folder... I mean I have access to all kind of files...
How to arrange this and just to get acces to the "img" folder? :/

Thanks for help!!

PS: I'm using the 1.5 RC2 version :D
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
image_folder
« Reply #4 on: October 29, 2006, 03:33:38 PM »

When I downloaded and un-zipped my sNews 1.5.27 RC2 package, I found there were no folders in it for any files, not even an img folder. I assume yours was the same. So you need to create the folders you want in your root directory... the folder in which you installed your package's files. So... it is a matter of creating a folder structure that suits your needs. In my case, I started with:
- images folder - for images only used in the template itself,
- img folder - for images used in articles,
- includes folder - for files that are inserted into an article with the include function button,
- css - for css stylesheets used in addition to the default style.css file
... and so on. All folders in the root directory will be visible to you.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

edsil

  • Jr. Member
  • **
  • Karma: 5
  • Posts: 97
image_folder
« Reply #5 on: October 30, 2006, 05:36:05 AM »

:/ huummm... ok I see... personally I prefer to get access  just to the img folder, cause for now like it is, all images and files are visible, you can click on the css style sheet for exemple... and you can erase it!!! (that could be a terrific accident!!!)
well it is just my opinion, but I think this setting just must show the image folder and/or documents folders (or like you want to call it if you have PDF files and images, etc), because it is a little confuse (and could be dangerous) when you see all this kind of documents... ;)
There is a way to show just ONE and specific folder ???

thanks for your help keyrocks  :)
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
image_folder
« Reply #6 on: October 30, 2006, 03:13:28 PM »

Yes, I agree... there is the risk that a person not knowing what is going on there might accidentally mess up or delete an important file. It is not a problem for developers, but this "view all" capacity would be quite confusing to non-savvy clients. We'll need Mika or Luka to tell us how we might go about restricting what gets viewed in this panel.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
image_folder
« Reply #7 on: October 30, 2006, 05:02:02 PM »

This has to be done manually because every hosting company has their own set of default files and folders essential for proper website functioning.

Find function filelist() inside snews.php file, and make changes according to your presonal preferences. Blue text is just an example found on my server
Quote
// FILELIST FUNCTION
function filelist($mode, $path, $depth = 0) {
# by default, ignored enities are cgi-bin, .htaccess, Thumbs.db
/*
add/remove all the folders and/ or files you DON'T want in your file listing (exclusion by name)

note: do not remove those single and double dots at the end of the line
*/

   $ignore = array('cgi-bin', '.htaccess', 'perl', 'ftp', 'awstats', '.', '..', 'Thumbs.db');
# by default, ignored file types are php and html
/*
add/remove all file extensions you DON'T want in your file listing  (exclusion by file type)
*/

   $extension = array('php', 'htm', 'xml', 'xsl', 'css', 'pl', 'html');
...
after you've done editing, file list will hide all the files and folders previously defined
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
image_folder
« Reply #8 on: October 30, 2006, 05:15:53 PM »

Thanks Mika. @Edsil - give this a try and see if it works... and let us know how you make out. :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

edsil

  • Jr. Member
  • **
  • Karma: 5
  • Posts: 97
image_folder
« Reply #9 on: October 31, 2006, 07:46:34 AM »

:D
"I think I'm dumb... or maybe just happy..." (like Kurt Cobain said in one of his songs)
Yeap, after, some kind of 30 minutes I found "the thing" and... IT WORKS!!!!  :D  I'm really happy
It was on the:
$ignore = array('cgi-bin', '.htaccess', 'perl', 'ftp', 'awstats', '.', '..', 'Thumbs.db');

after the 'Thumbs.db' I added other folder names and it works perfect

YOU ROCK MIKA!!!!  ;)

Thanks a lot
Logged

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
image_folder
« Reply #10 on: October 31, 2006, 08:03:09 AM »

:)
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

edsil

  • Jr. Member
  • **
  • Karma: 5
  • Posts: 97
image_folder
« Reply #11 on: October 31, 2006, 10:08:13 AM »

HI again  :)
just to say, that now is more easy to get acces to two different folders, for exemple.
One with just images and other one with just documents (kind of PDF files or others).
I really like it  ;)
Logged

mininovax

  • Newbie
  • *
  • Karma: 1
  • Posts: 44
    • http://www.ondapc.net
image_folder
« Reply #12 on: November 28, 2006, 03:58:41 PM »

The only problem that I have with the file upload feature is that it is not secure.

I have an image upload function that only allows five different image types. Even renaming it, you cannot change the extension. This is pretty secure for me.

However, with this file upload feature, someone could upload a "NASTY" php code that could potentially wipe out all of your files on your server.

You can upload any type of file with SNEWS, so be warned that you might want to find a way to disable this if your system has more than an administrator running it...
Logged