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: Hidden Articles & Pages  (Read 7744 times)

Datu Puti

  • Newbie
  • *
  • Karma: 0
  • Posts: 43
Hidden Articles & Pages
« on: November 28, 2006, 01:17:52 PM »

Hi guys,

I want to make articles or pages that are hidden that cannot be accessed unless you make a link pointing to them.. I tried to unpublish a center article but when i link to it using the SEF URL it just says "No Content Yet" but the articles does exist. Would be nice to do the same thing with pages.. but everytime u add a page it shows up in the menu links.. is there a way around this?

regards from the beautiful 7000 islands of the Philippines
Logged
Regards from the beautiful 7000 Islands of the Philippines! Mabuhay!

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
Hidden Articles & Pages
« Reply #1 on: November 28, 2006, 02:29:42 PM »

It could be done with some sort of article prefix attached. Here's some examples of what I have in mind:
- normal article SEF link: http:/domain/your-article/
- "hidden" article: http:/domain/hidden-your-article/

And all you need to do next is to restrict all articles with the prefix of your choice (hidden- or something else) from appearing in the functions center(), archive(), search() and sitemap(). This could be done via sql or php...

Another approach involves somewhat intensive database manipulation: adding another "hidden" field into the table "articles" with a complete new set of sql routines...

And finally, if you want to provide web pages for eyes only, I suggest using login/password type of access because previous examples won't be hidden from spiders, unless you restrict them further with .htaccess, noindex, nofollow meta tags... and other similar features.
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

Sasha

  • Hero Member
  • *****
  • Karma: 28
  • Posts: 938
    • cssanarchy.com
Hidden Articles & Pages
« Reply #2 on: November 28, 2006, 03:16:59 PM »

i think mika is the best php programmer  we have on this forum  :)
Logged
Every morning, I get up and look through the 'Forbes' list of the richest people in America. If I'm not there, I go to work. | If you love your job, you haven't worked a day in your life. snews with ♥

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
Hidden Articles & Pages
« Reply #3 on: November 28, 2006, 03:36:00 PM »

don't make me blush, mate ;)

*...I think that silent majority hides the best, it usually does...*
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

Datu Puti

  • Newbie
  • *
  • Karma: 0
  • Posts: 43
Hidden Articles & Pages
« Reply #4 on: November 28, 2006, 09:56:34 PM »

Might this be added as a feature to sNews in the future? or is it to much to ask. This would be a great feature! ha ha but thats just my 2 pesos.. :D
Logged
Regards from the beautiful 7000 Islands of the Philippines! Mabuhay!

tobto

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 71
    • seo service
Hidden Articles & Pages
« Reply #5 on: December 08, 2006, 06:38:05 PM »

I like to call hidden article (not published), say, unpublishedarticle into category1, but nothing happen. Could someone, please, show me how to call unpublished article:  http://www.domen.com/category1/unpublishedarticle ?

 :(
Logged

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
Hidden Articles & Pages
« Reply #6 on: December 08, 2006, 07:34:05 PM »

This feature hasn't been built yet, tobto ;)
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

tobto

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 71
    • seo service
Hidden Articles & Pages
« Reply #7 on: December 08, 2006, 07:41:49 PM »

eagerly wait  :o
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Hidden Articles & Pages
« Reply #8 on: December 10, 2006, 11:17:07 AM »

I did a mod for an early release of 1.5
http://www.solucija.com/forum/viewtopic.php?pid=13981#p13981

This enabled the deliberate hiding of articles/pages from the site.

I am yet to look at it again for the stable release...
Logged
Of all the things I have lost, it is my mind that I miss the most.

tyee

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 56
Hidden Articles & Pages
« Reply #9 on: February 11, 2007, 02:04:22 AM »

Quote from: Mika
And finally, if you want to provide web pages for eyes only, I suggest using login/password type of access because previous examples won't be hidden from spiders, unless you restrict them further with .htaccess, noindex, nofollow meta tags... and other similar features.
Can this be done Mika? How to protect a certain page when it is in a database or can htaccess do it, (ie. it doesn't know that the page is not on the server?)

tyee
Logged

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
Hidden Articles & Pages
« Reply #10 on: February 11, 2007, 05:41:34 PM »

You'll need some sort of restricted access feature (or, if you're good in PHP, a multiuser mod ;)). Other solutions provided here will reveal your contents to the spiders the moment you publish a direct link.
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

tyee

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 56
Hidden Articles & Pages
« Reply #11 on: February 11, 2007, 10:02:16 PM »

Mika
  I was searching the web all yesterday for a solution to a secure area and finally found something on the textpattern forums. I switched to sNews after trying textpattern.

This seems to work for textpattern users, I tried it for sNews and it always sends me to index.php and not the page I clicked on in the sNews menu. Can you take a look and see if the ReWriteRule needs to be modified for sNews.

Method
   If you want to password protect a section, for example "blog" section, actually create a folder with the section name on the server, like "www.mysite.com/blog".

Place your .htaccess file in that folder. It should contain this --->


RewriteEngine On
RewriteRule ^(.*) /absolute/path/to/index.php


AuthType Basic
AuthUserFile /path/on/server/to/.htpasswd
AuthName “Only for registered users”
require valid-user

Now when you click on the "blog" section menu item, you will get a password window, which you fill in, then if the password is correct you will be taken to the "blog" section.

There you go. Works on textpattern. Since textpattern and sNews are both MySQL database driven I thought it should work on sNews too! What do you think?

Here's the link for the discussion with the guy who posted it. We've been having a discussion today about it.

http://forum.textpattern.com/viewtopic.php?pid=140129#p140129

tyee
Logged