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.

Pages: [1] 2 3 ... 10
 1 
 on: January 27, 2018, 10:39:40 pm 
Started by matthiasrawles - Last post by Luka
You're missing a language file, or the language configuration is not right.

 2 
 on: January 18, 2018, 08:56:38 pm 
Started by matthiasrawles - Last post by mruqer

Hello to everyone, I am refreshing the topic.
After installation, the login page looks bad - there are no window descriptions, the forms look bad.
http://witektuleja.website.pl/login/ (test / test)
Can someone help?
Thanks in advance
Regards

 3 
 on: December 05, 2017, 05:24:43 pm 
Started by mehmetsarr - Last post by mehmetsarr
Hi, I want to make a slider. I have a responsive html theme with a slider, how do I make it into a module.

 4 
 on: March 17, 2013, 10:49:38 am 
Started by nukpana - Last post by sibas
Hello!!
I try to use this mod with [ADDON] showArticles
http://snewscms.com/forum/index.php/topic,10371.msg68728.html

how to change this to make it work?
Code: [Select]
file_include(str_replace('[break]', '',str_replace('&', '&', $text)), $shorten);

 5 
 on: March 16, 2013, 12:10:18 pm 
Started by sibas - Last post by sibas
Well I found this link where explains exactly what I have to do,
http://wiki.apache.org/httpd/RewritePathInfo
read the Moving path information to a query string
the simplest possible rule is
RewriteRule ^/files/([^/]*) /dl.php?f=$1 [PT]
but no luck, link http ://127.0.0.1/snews17/files/Newsletter1.pdf leads to 404
does not execute the script
any idea?

 6 
 on: March 16, 2013, 11:13:55 am 
Started by sibas - Last post by sibas
unfortunately for some files must count the downloads, thats why I have to use the dl.php
now, when it comes to allow users download from some script you need some security,
making a simple rewriting hides the script name from some scriptkids and looks a better link.

 7 
 on: March 15, 2013, 08:10:06 pm 
Started by sibas - Last post by Keyrocks
I can't understand why you'd want to get into having to write a rule to conver a link to a static PDF file.
All you need to do is upload the file to your host server's domain root (or a folder in it) and make the link to it.
It's also important to make sure the file-name has no spaces between words in it. I've experienced a lot of problems with clients uploading files with improper file-name structure and not being able to link to or - even - find them because the server sees them as being corrupt files.

If you have a file named file1.pdf and you upload it to your domain root, the link to it would be:
http://domainname.com/file1.pdf
If you uploaded it to a folder in your domain root called pdf, the link to it would be:
http://domainname.com/pdf/file1.pdf

It can't get any simpler than that.  8)

 8 
 on: March 15, 2013, 03:43:31 pm 
Started by sibas - Last post by sibas
Hi Fred you are right is not possible the above not only for the reason you say..

what I was try to do is to change the link
<a href="http:// 127.0.0.1/snews17/dl.php?f=file1.pdf>file1.pdf</a>
in to
<a href="http:// 127.0.0.1/snews17/files/file1.pdf>file1.pdf</a>

my mistake

But if I have this link
<a href="http:// 127.0.0.1/snews17/files/file1.pdf>file1.pdf</a>

and make rewriterule to catch the word "files" and return dl.php?f=
I think maybe is going to work..

 9 
 on: March 15, 2013, 03:37:08 pm 
Started by sibas - Last post by Fred K
I may be completely wrong but

a) I don't think returning "dl.php?f=" from some function will make a difference, and
b) The link is (I think) treated by sNews the same as any other link, so
RewriteRule ^files/([^/]+).pdf dl.php?f=$1 [NC]
won't work - i.e is (probably) cancelled by the
RewriteRule ^(.*)$ index.php?category=$1 [L] line.

How to solve it? Woush, I have no idea. Sorry.

 10 
 on: March 15, 2013, 11:22:27 am 
Started by sibas - Last post by sibas
Hmm I lost you here!!

I follow this rewrite rule
RewriteRule ^files/([^/]+).pdf dl.php?f=$1 [NC]

where I take it from
http://corz.org/serv/tricks/htaccess2.php#section-short_URLs
the above is wrong url
http://corz.org/serv/tricks/htaccess2.php#section-not_so_simple

Nothing so far and I am not sure if is possible to make this rewrite
the link is manual generated i.e.

Quote
foreach($files_array as $key=>$val){
echo '<li><a href="dl.php?f='.urlencode($val).'">'.$val.'

perhaps to make it work is to return the dl.php?f= from some function?


Pages: [1] 2 3 ... 10