Previous Thread
Next Thread
Print Thread
Hop To
how to detect first page on thread mode
#243893 06/13/2011 9:31 PM
Joined: Jun 2011
Posts: 2
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
nirwanto #243897 06/14/2011 2:02 AM
Joined: Jun 2006
Posts: 9,243
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
nirwanto #243902 06/14/2011 6:17 AM
Joined: Jun 2011
Posts: 2
stranger
OP Offline
stranger
Joined: Jun 2011
Posts: 2
ok thanks for your advice. problem solved smile


Link Copied to Clipboard
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Ubb 7.7.4 Gallery problems
by jjjjj - 05/25/2020 2:35 PM
7.7.4 error after php upgrade to php 7.0
by Ruben - 05/25/2020 1:10 PM
7.7.4 move group all, fails with a error
by Ruben - 05/24/2020 3:07 PM
Grid lines in forum topics list
by Steve C - 05/23/2020 12:09 PM
Who's Online Now
1 members (Gizmo), 86 guests, and 45 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
3D Creations
3D Creations
by JAISP, December 30
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