|
[F] Thread mode and multipage [C-Chris]
|
|
02-22-2009, 11:01 PM
Post: #1
|
|||
|
|||
|
[F] Thread mode and multipage [C-Chris]
Example: The forum's default thread mode is the threaded mode. If you switch to the linear mode and you go to another page of the thread it's shown in the threaded mode again.
The problem is that the mode is not transfered in the multipage links. Possible fix: Open the file showthread.php and search for: PHP Code: // Which thread mode is our user using? PHP Code: $threadmode = "";PHP Code: $multipage = multipage($postcount, $perpage, $page, str_replace("{tid}", $tid, THREAD_URL_PAGED.$highlight)); PHP Code: $multipage = multipage($postcount, $perpage, $page, str_replace("{tid}", $tid, THREAD_URL_PAGED.$highlight.$threadmode)); Greets, Michael -------------
|
|||
|
02-24-2009, 02:39 PM
Post: #2
|
|||
|
|||
|
RE: Thread mode and multipage
Doesn't this add ? twice in case of both $highlight and $threadmode?
This ? or & is done in several places in MyBB already (for multipage, search highlights, etc), maybe it would be nicer to make a function for it that takes url and param(s) and uses either ? or & depending on wether there actually already is a ? in the URL part. Google SEO | Gravatar | Hooks | HTMLPurifier | Overview | Patches | PluginLibrary |
|||
|
02-24-2009, 03:00 PM
Post: #3
|
|||
|
|||
RE: Thread mode and multipage
(02-24-2009 02:39 PM)frostschutz Wrote: Doesn't this add ? twice in case of both $highlight and $threadmode?No, because it checks if $mybb->input['highlight'] is empty or not. Greets, Michael -------------
|
|||
|
02-24-2009, 03:16 PM
Post: #4
|
|||
|
|||
|
RE: Thread mode and multipage
My bad, should've scrolled to the right.
![]() inc/functions.php::fetch_page_url() actually already does something like this: PHP Code: if(strpos($url, "?") === false)It's a much smarter way to append parameters than basing the decision on a seo setting and the existance of other parameters. If something like this was moved to a separate function for joining query strings with URLs, you could get rid of the complicated seourls autodetect enabled or not, other params already present or not if, set $threadmode directly (without ? or &) and call joinquery($url, $highlight, $threadmode). I know I'm not allowed to complain because it's a third party plugin, but appending & or ? based on the MyBB seourls setting is causing me some minor headache with my Google SEO plugin, for search.php does the very same thing, it appends to get_forum/post_link(). And the result is either "site&highlight=x" or "site?post=x?highlight=x" because the assumptions it makes do not apply when my plugin is in use. With a function that appends query strings by actually checking for ? first this problem wouldn't exist... Google SEO | Gravatar | Hooks | HTMLPurifier | Overview | Patches | PluginLibrary |
|||
|
03-10-2009, 07:02 PM
Post: #5
|
|||
|
|||
|
RE: Thread mode and multipage
Proposed fix. In showthread.php find:
PHP Code: // Work out if we have terms to highlightreplace with PHP Code: // Work out if we have terms to highlight |
|||
|
03-10-2009, 10:19 PM
Post: #6
|
|||
|
|||
|
RE: Thread mode and multipage
Seems to be working great.
Greets, Michael -------------
|
|||
|
03-15-2009, 11:50 PM
Post: #7
|
|||
|
|||
|
[F] Thread mode and multipage
Thank you for your bug report.
This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated. With regards, MyBB Group |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)
Search
Member List
Calendar
Help

![[Image: donation_drive_sig.png]](http://mybboard.net/assets/images/donation_drive_sig.png)


