Jump to content


- - - - -

RESOLVED: ID of topic in topicview?


  • Please log in to reply
6 replies to this topic

#1 najaru

najaru

    Programmer

  • Modders
  • PipPipPipPipPipPip
  • 395 posts
  • Real Name:Andrea
  • IPB Version:v3.0.x
Contributor

Posted 21 September 2010 - 08:54 AM

Hi.

i have see that with this code i can share the topic in facebook, but it {$data['tid']} work only in forumview, and not in topicview.....
it's normal?

<td align="center" class="$class2">{$data['topic_icon']}<a href="http://www.facebook.com/share.php?u={$this->ipsclass->base_url}showtopic={$data['tid']}" target="_blank" ><img src="http://www.rm-online.it/download/FaceBook_32x32.png" width="16" height="16" border="0"></a></td>

Posted Image
If you need custom modification on Skin or IP.Content, PM me

Use +1Rep Posted Image Plese Posted Image


#2 Michael

Michael

    See code 431.322.12 of the Internet Privacy Act

  • Modders
  • PipPipPipPipPipPipPipPipPipPip
  • 22,042 posts
  • Location:Columbus, OH
  • Real Name:Michael McCune
  • IPB Version:v3.1.x
Contributor

Posted 21 September 2010 - 12:19 PM

$this->request['t'] will always show the ID# of the topic you are currently viewing, or it will be 0 if you're not in a topic.
Michael McCune - IPS Marketplace Moderator

My Stuff: My Forum · My Resources · My Tutorials
Contact Me: Email · Facebook · Twitter

#3 najaru

najaru

    Programmer

  • Modders
  • PipPipPipPipPipPip
  • 395 posts
  • Real Name:Andrea
  • IPB Version:v3.0.x
Contributor

Posted 21 September 2010 - 12:29 PM

i have try to put this
<a href="http://www.facebook.com/share.php?u={$this->ipsclass->base_url}showtopic={$this->request['t']}" target="_blank" ><img src="http://www.rm-online.it/download/FaceBook_32x32.png" width="16" height="16" border="0"></a>

in a Topic view - topic_page_top
but dont work :(
Posted Image
If you need custom modification on Skin or IP.Content, PM me

Use +1Rep Posted Image Plese Posted Image


#4 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 21 September 2010 - 08:33 PM

$this->request is for IP.Board 3.0. $this->ipsclass->input['t'] is what you need for 2.3 :)

#5 dkmvkl11

dkmvkl11

    Novice

  • Members
  • PipPip
  • 9 posts
  • IPB Version:v2.3.x

Posted 27 September 2010 - 05:14 PM

Have you try this:

{$this->ipsclass->base_url}showtopic={$data['TOPIC']['tid']}

I'm using this for facebook like button. And this is my code

<fb:like href="{$this->ipsclass->base_url}showtopic={$data['TOPIC']['tid']}"></fb:like>

It's work fine for me

Edited by dkmvkl11, 27 September 2010 - 05:16 PM.


#6 najaru

najaru

    Programmer

  • Modders
  • PipPipPipPipPipPip
  • 395 posts
  • Real Name:Andrea
  • IPB Version:v3.0.x
Contributor

Posted 27 September 2010 - 05:16 PM

yes sorry, work good now with Martin's solution :)
Posted Image
If you need custom modification on Skin or IP.Content, PM me

Use +1Rep Posted Image Plese Posted Image


#7 AndyF

AndyF

    Cogito ergo sum

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 8,414 posts
  • Location:Derby, UK
  • Real Name:Andy
  • IPB Version:v3.2.x
Contributor

Posted 27 September 2010 - 06:53 PM

The issue this topic was opened for has now been resolved. :)

View my tutorials

Please do NOT pm me with support related questions unless requested.
If you are in need of help or assistance, please post on the forum in the appropriate section!



A Look Back - 1.0.1 - 1.3.1 - 2.0.0 - 2.1.7 - 2.2.0 - 2.3.6




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users