seourls icon indicating copy to clipboard operation
seourls copied to clipboard

Config file for URL structure

Open tas2580 opened this issue 6 years ago • 2 comments

https://www.phpbb.de/community/viewtopic.php?p=1387611#p1387611

tas2580 avatar Sep 19 '18 22:09 tas2580

I was observing this feature and I want to suggest this:

  1. Add a config option on ACP. Can be done also with mentioned config file.

  2. https://github.com/tas2580/seourls/blob/master/event/base.php#L54

Change to:

	public function generate_topic_link($forum_id, $forum_name, $topic_id, $topic_title, $start = 0, $full = false)
	{
		if ($full)
		{
			return generate_board_url() . '/' . ( $OPTION ? '' : $this->title_to_url($forum_name) . '-f' . $forum_id . '/') . $this->title_to_url($topic_title) . '-t' . $topic_id . ($start ? '-s' . $start : '') . '.html';
		}
		return $this->phpbb_root_path . ( $OPTION ? '' : $this->title_to_url($forum_name) . '-f' . $forum_id . '/') . $this->title_to_url($topic_title) . '-t' . $topic_id . ($start ? '-s' . $start : '') . '.html';
	}

And on htaccess, https://github.com/tas2580/seourls/wiki/Webserver-configuration

Add:

RewriteRule ^(.)-t([0-9])-s([0-9]).html viewtopic.php?t=$2&start=$3&%{QUERY_STRING} [L] RewriteRule ^(.)-t([0-9]*).html viewtopic.php?t=$2&%{QUERY_STRING} [L]

(I've tested a regular forum removing "f" parameter and it works without problem).

Cheers!

Naguissa avatar Sep 25 '18 11:09 Naguissa

how can i added arabic litter to link utf-8 include arabic litter by the way

leech24 avatar Jul 29 '19 05:07 leech24