Please add a variable $thread['url'], that give us the URL of the current thread. I asked for this, because I'm struggling to setup a Facebook Comment Box that needs the URL of the current thread (v1.6.9).
Thanks
I think he means to add that variable to be used in the showthread templates, currently it is not possible to get the thread url in that templates on a default installation.
Ah ok but I don't think we should add this because it requires many changes (in templates and in our core).
How come? Just ad a new line in the showthread.php file before the breadcrumb and update the self:
$threadurl = get_thread_link($thread['tid']);
Anyone will be able to use it in the templates if the wish to.
But what if you want to load threads somewhere else? So I don't think it should be core, if you want to have the link just add the line above where you need it
I don't think he means to save the url in the DB, just to make it accessible in the showthread templates.
(2013-02-18, 08:51 PM)Omar G. Wrote: [ -> ]I think he means to add that variable to be used in the showthread templates, currently it is not possible to get the thread url in that templates on a default installation.
Yes, That's what I mean, thanks Omar for explanation.
Why not use PHP super globals? Templates allow you to use PHP variables and $_SERVER is a variable...
$_SERVER['REQUEST_URI']
(I haven't tested it)
I'm not sure but I think the MyBB template system wont allow that variable.