[SOLVED] URL Writing

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

Hi Dev,

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

https://flatboard.org/view.php/forum/2015-09-232343104e686


to
 https://flatboard.org/forum/2015-09-232343104e686 

4baea locked the discussion.

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

Also,

How I make:

 https://flatboard.org/view.php/topic/2016-02-052129434baea 


to

 https://flatboard.org/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
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.
  • 🎉  Featured as #1 product of the day on Product Hunt
  • Please like in alternativeto.net 👍🏻
  • ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
  • <TextField>, my new CMS project designed by a passionate developer, for developers!
  • I am currently busy 😫.

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
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.
  • 🎉  Featured as #1 product of the day on Product Hunt
  • Please like in alternativeto.net 👍🏻
  • ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
  • <TextField>, my new CMS project designed by a passionate developer, for developers!
  • I am currently busy 😫.

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
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.
  • 🎉  Featured as #1 product of the day on Product Hunt
  • Please like in alternativeto.net 👍🏻
  • ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
  • <TextField>, my new CMS project designed by a passionate developer, for developers!
  • I am currently busy 😫.