miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Master Class miniBB Support Forums / Master Class /  
 

Template tag for link to current page?

 
Author Vishal
Partaker
#1 | Posted: 18 Nov 2011 08:34 
Is there a template tag that I can use in say main_header.html to get the link to the current page? I'm using keyword rich URL addon. I just want to use that for <link rel="canonical"... tag.

Author Paul
Lead Developer 
#2 | Posted: 18 Nov 2011 11:10 
You may try to use something like this in bb_plugins.php:

$currentUrl=$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
then paste {$currentUrl} in the place you want.

There might be some variations with the $_SERVER variables, you may check in PHP manual for more - may be another combination would work for you.

Author Vishal
Partaker
#3 | Posted: 18 Nov 2011 12:35 
Thanks Paul! Is there no direct (or combination) tag for keyword rich urls? Previously we could get URLs using: https://www.minibb.com/forums/5_{$topic}_1.html

Author Paul
Lead Developer 
#4 | Posted: 18 Nov 2011 13:11 
In the latest miniBB series, mod_rewrite functions are separated to be standalone (and possibly modified).

Pay attention at bb_functions.php -> addForumURLPage, addTopicURLPage functions etc.

Using these functions and knowing some certain params, it's possible to build the original forum/topic URL.

Master Class miniBB Support Forums / Master Class /
 Template tag for link to current page?
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑