Previous Thread
Next Thread
Print Thread
Hop To
how to detect first page on thread mode #243893 06/13/2011 8:31 PM
Joined: Jun 2011
Posts: 2
nirwanto Offline OP
stranger
OP Offline
stranger
Joined: Jun 2011
Posts: 2
i want to add fb like button only displayed on the first page of thread

i'm using this code on showflat.tpl

{if $page==1}
fblike code here
{/if}

this code succes to get $page while we are on login mode, but if we doesn't login $page is empty

i'm still confused, cause in my localhost, $page always have any value

Re: how to detect first page on thread mode [Re: nirwanto] #243897 06/14/2011 1:02 AM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
$page isn't passed to smarty. You'd need to edit scripts/showflat.inc.php, around line 1397 of that file you'll see where the variables are passed to smarty and you'd need to add your page variable in there.

Re: how to detect first page on thread mode [Re: nirwanto] #243902 06/14/2011 5:17 AM
Joined: Jun 2011
Posts: 2
nirwanto Offline OP
stranger
OP Offline
stranger
Joined: Jun 2011
Posts: 2
ok thanks for your advice. problem solved smile


Forum Search
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Followed List v7.7.2 Question
by Ruben - 11/12/2019 12:22 PM
UBB Dev
by JAISP - 11/03/2019 11:01 AM
Exceeded Number of attachments
by rbrtgrmn - 11/02/2019 9:57 PM
Forum New User Registration
by kf6zpl - 10/25/2019 10:45 AM
Having issue with redirects to UBB classic URLs
by amciotola - 10/16/2019 12:11 AM
Who's Online Now
2 registered members (Ruben, isaac), 82 guests, and 423 spiders.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20191023)