Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved [General] Why some variables not work?
#1
Not Solved
Regards.

I am trying to include a links inĀ  a section of the post, but the variable don't work...

Example:
<a href="http://www.facebook.com/share.php?u=https://www.forodinero.us/showthread.php?tid={$tid}">Example</a>


...but the result is:

http://www.facebook.com/share.php?u=https://www.forodinero.us/showthread.php?tid=

Why this is happening?

Thanks for your information.
Reply
#2
Not Solved
<a href="http://www.facebook.com/share.php?u=https://www.forodinero.us/showthread.php?tid={$tid}">Example</a>

Hi, your link structure is incorrect,
try this instead,
 http://www.facebook.com/share.php?u={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}
Hey man, what's up?
Reply
#3
Not Solved
Thank you for your answer, but the variable {$thread['tid']} don't have any value. The link appear as:

http://www.facebook.com/share.php?u=http...ad.php?tid=

Regards.
Reply
#4
Not Solved
Are you putting that into a post or a template? Which template?

And try {$thread[tid]}
Reply
#5
Not Solved
The variables that are available depend upon the template that you are in. Which template are you trying to add this link to?
Reply
#6
Not Solved
What they said, the var works on certain templates, not inside a post

If you are putting this in a single post as a logged in user, it might work like so by just adding the thread i.d like so
http://www.facebook.com/share.php?u={$mybb->settings['bburl']}/showthread.php?tid=1
or
http://www.facebook.com/share.php?u={$mybb->settings['bburl']}/showthread.php?tid=2
or
http://www.facebook.com/share.php?u={$mybb->settings['bburl']}/showthread.php?tid=3

for example.
Hey man, what's up?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)