[SOLVED] URL Writing

identicon
solved URL Writing
4baea Friday 5th February 2016, 21:29:43

Hi Dev,

You know how to make by removing **view.php** from url:

http://flatboard.free.fr/view.php/forum/2015-09-232343104e686


to
 http://flatboard.free.fr/forum/2015-09-232343104e686 

Administrator locked the discussion.

Replies 6
identicon
4baea  Friday 5th February 2016, 21:36:07

Also,

How I make:

 http://flatboard.free.fr/view.php/topic/2016-02-052129434baea 


to

 http://flatboard.free.fr/view.php/topic/2016-02-05


I am making this admin post only so I don't expect to post more than once a week. This shouldnt be problem

Fred_4346f29d
Fred  Friday 5th February 2016, 22:29:50

Hi, in **lib/Flatdb.lib.php**, change the date format in newEntry():

public static function newEntry()
{
return date('Y-m-d');
}

Before ask a question, read the documentation.
Please like in alternativeto.net 👍🏻
╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!

Prétendre que votre droit à une sphère privée n'est pas important parce que vous n'avez rien à cacher n'est rien d'autre que dire que la liberté d'expression n'est pas essentielle car vous n'avez rien à dire.
-- E. Snowden

identicon
07c4f  Saturday 6th February 2016, 16:25:26

  this for the time date url return right?

What about the view.php in the url.

Fred_4346f29d
Fred  Saturday 6th February 2016, 19:35:33

  It is the creation date of a discussion or reply.
This allows sorting by date as files, to have a subject or a single answer.
**view.php** is to separate the display of a discussion with his answers, view the plugin page, list the discussions of a forum.

Before ask a question, read the documentation.
Please like in alternativeto.net 👍🏻
╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!

Prétendre que votre droit à une sphère privée n'est pas important parce que vous n'avez rien à cacher n'est rien d'autre que dire que la liberté d'expression n'est pas essentielle car vous n'avez rien à dire.
-- E. Snowden

identicon
b0f60  Saturday 6th February 2016, 21:28:49

  I was looking to get the view.php page out of the url... maybe by rewriting/htaccess. You know how to do?

Fred_4346f29d
Fred  Saturday 6th February 2016, 22:40:16

  The objective is precisely Flatboard be accessible without .htaccess and therefore for any server.
We can easily add rules in a .htaccess but you also modify all links in the script, which I would not touch this time. It will give them to each update.
**.htaccess example:**

# The server must follow symbolic links :
Options +FollowSymlinks

# Enabling URL Rewrite Module :
RewriteEngine on

#--------------------------------------------------
# Rewrite Rules :
#--------------------------------------------------

# Discussion :
RewriteRule ^topic/([0-9]+)$ view.php/topic/$1/p/$2 [L]

# Forum :
RewriteRule ^forum/([0-9]+)$ view.php/forum/$1 [L]

Not tested!

Before ask a question, read the documentation.
Please like in alternativeto.net 👍🏻
╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!

Prétendre que votre droit à une sphère privée n'est pas important parce que vous n'avez rien à cacher n'est rien d'autre que dire que la liberté d'expression n'est pas essentielle car vous n'avez rien à dire.
-- E. Snowden