Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config file for URL structure #59

Open
tas2580 opened this issue Sep 19, 2018 · 2 comments
Open

Config file for URL structure #59

tas2580 opened this issue Sep 19, 2018 · 2 comments

Comments

@tas2580
Copy link
Owner

tas2580 commented Sep 19, 2018

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

@Naguissa
Copy link
Contributor

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!

@ghost
Copy link

ghost commented Jul 29, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants