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
Thanks
1.8 $thread['url']
|
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
2013-02-18, 02:46 PM
There is a function for this to create the URL: get_thread_link($tid, $page=0, $action='')
Support PMs will be ignored!
2013-02-18, 08:51 PM
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.
2013-02-18, 09:21 PM
Ah ok but I don't think we should add this because it requires many changes (in templates and in our core).
Support PMs will be ignored!
2013-02-18, 09:41 PM
How come? Just ad a new line in the showthread.php file before the breadcrumb and update the self:
Anyone will be able to use it in the templates if the wish to.
2013-02-18, 10:49 PM
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
Support PMs will be ignored!
2013-02-19, 04:35 AM
I don't think he means to save the url in the DB, just to make it accessible in the showthread templates.
Why not use PHP super globals? Templates allow you to use PHP variables and $_SERVER is a variable...
(I haven't tested it)
2013-04-29, 06:42 PM
I'm not sure but I think the MyBB template system wont allow that variable.
|
« Next Oldest | Next Newest »
|