[SOLVED] URL Writing
identicon
4baea
DISCUSSION OF ORIGIN

4baea Friday 5th February 2016, 21:29:43

solved URL Writing

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.
DISCUSSION OF ORIGIN
identicon
4baea

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_f8768
Fred#f8768

Administrator

Fred_f8768

See their activity.

Fred#f8768 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');
}
identicon
07c4f

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_f8768
Fred#f8768

Administrator

Fred_f8768

See their activity.

Fred#f8768 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.
identicon
b0f60

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_f8768
Fred#f8768

Administrator

Fred_f8768

See their activity.

Fred#f8768 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!
Suggested Topics View / Reply Forum
AlexanderLiebrecht started plugin Contact Form for Flatboard Forum as a Plugin 959 / 1 Feature Requests
Tasy#5e2c578c started solved Impossible to start a discussion 1.2K / 10 Bug reports
Fred#f8768 started Flatboard 1.0 RC2 1.5K / 5 Announcements
Diplo started Page Manager 1.3K / 5 General Questions
Top