MyBB Community Forums

Full Version: Code on only the OP?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2011-06-04, 08:31 PM)Yaldaram Wrote: [ -> ]You mean +1 button on first post of each page, right ? If so, try this;
In postbit and postbit_classic templates, find;
{$post['message']}
and Add the following code just Before that;
<if $postcounter - 1) % $mybb->settings['postsperpage'] == "0" then>
<div style="float: right;"><g:plusone></g:plusone></div>
</if>
Parse error: syntax error, unexpected ',' in /home/gfxcafen/public_html/mcmines.com/inc/functions_post.php(635) : eval()'d code on line 44

Parse error: syntax error, unexpected ',' in /home/gfxcafen/public_html/mcmines.com/inc/functions_post.php(635) : eval()'d code on line 44

Parse error: syntax error, unexpected ',' in /home/gfxcafen/public_html/mcmines.com/inc/functions_post.php(635) : eval()'d code on line 44

Parse error: syntax error, unexpected ',' in /home/gfxcafen/public_html/mcmines.com/inc/functions_post.php(635) : eval()'d code on line 44

Parse error: syntax error, unexpected ',' in /home/gfxcafen/public_html/mcmines.com/inc/functions_post.php(635) : eval()'d code on line 44

Parse error: syntax error, unexpected ',' in /home/gfxcafen/public_html/mcmines.com/inc/functions_post.php(635) : eval()'d code on line 44

Parse error: syntax error, unexpected ',' in /home/gfxcafen/public_html/mcmines.com/inc/functions_post.php(635) : eval()'d code on line 44

Parse error: syntax error, unexpected ',' in /home/gfxcafen/public_html/mcmines.com/inc/functions_post.php(635) : eval()'d code on line 44

Parse error: syntax error, unexpected ',' in /home/gfxcafen/public_html/mcmines.com/inc/functions_post.php(635) : eval()'d code on line 44

Parse error: syntax error, unexpected ',' in /home/gfxcafen/public_html/mcmines.com/inc/functions_post.php(635) : eval()'d code on line 44


Replace above with this;
<if $postcounter - 1 % $mybb->settings['postsperpage'] == "0" then>
<div style="float: right;"><g:plusone></g:plusone></div>
</if>
(2011-06-04, 08:42 PM)Yaldaram Wrote: [ -> ]Replace above with this;
<if $postcounter - 1 % $mybb->settings['postsperpage'] == "0" then>
<div style="float: right;"><g:plusone></g:plusone></div>
</if>
Nope, doesnt work on page two.
http://mcmines.com/Thread-1-6-Simply-Sim...ack?page=2
Try using this plugin, as (I suppose) Yaldaram's code is intended to detect only the first post in the thread:
http://forums.mybbcommunity.com/thread-680.html (I use this one)
http://www.mybbextras.com/showthread.php?tid=112 (I used this one)
No, blake wants to have a +1 on every first post on every page, regardless it's in the same thread or not. I still don't get why it needs to be in the first post then though.

Try this:
<if ($postcounter - 1) % $mybb->settings['postsperpage'] == "0" then>
<div style="float: right;"><g:plusone></g:plusone></div>
</if>
It works! Big Grin thanks.
Pages: 1 2