The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hello,
I want, that every first post per site appears with ads (see the sceenshot). I think, that I have to edit the "postbit-" template, I am using and add the code with conditionals. But this the problem: $perpage or $page doesn't work! I tried Code:
<if condition="$postcount == ($perpage * $page +1)"> |
#2
|
||||
|
||||
![]()
have you tried
Code:
"$post[postcount] == 1" |
#3
|
|||
|
|||
![]() Quote:
You should also make sure that this is a thread-retrieved post. |
#4
|
||||
|
||||
![]() Code:
THIS_SCRIPT==showthread AND $post[postcount] == 1 |
#5
|
|||
|
|||
![]()
But what if, if the thread has got about 2 or more pages? Every first post per page should show it.
|
#6
|
|||
|
|||
![]()
O hmm then you need to edit the source code and make a custom counter
![]() |
#7
|
||||
|
||||
![]()
FIND IN showthread.php:
Code:
$post['musername'] = fetch_musername($post); $post['islastshown'] = ($post['postid'] == $lastpostid); Code:
$post['musername'] = fetch_musername($post); $post['islastshown'] = ($post['postid'] == $lastpostid); // ================================================= \\ // == [ MODIFIED - GTP BEGIN ] $post['isfirstshown'] = ($post['postid'] == $FIRSTPOSTID); // == [ 00-00-2004 - GTP END ] // ================================================= \\ FIND (at the bottom): Code:
<if condition="$show['spacer']"> </div> $spacer_close </if> <!-- / post #$post[postid] --> Code:
<if condition="$post['isfirstshown'] OR $post['islastshown']"> <table class="tborder" id="post$post[postid]" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="thead">Sponsors</td> <td class="alt1"> <if condition="$post['isfirstshown']">this is the first post of every page <else /> this is the last post of every page</if> </td> </tr> </table> </if> <if condition="$show['spacer']"> </div> $spacer_close </if> <!-- / post #$post[postid] --> |
#8
|
|||
|
|||
![]()
Just a question Princeton. Why do you use REPLACE instruction? No offence, but i always try to avoid them.
|
#9
|
||||
|
||||
![]()
I have found that most addon instructions use the following:
REPLACE, EDIT ADD BELOW, ADD ABOVE, CHANGE TO, ETC. When you use a variety of the above in your addon instructions there is an increased chance that people will encounter errors (when copy/paste). Here's your typical addon instructions: ADD BELOW ADD BELOW ADD BELOW ADD BELOW ADD ABOVE REPLACE ADD ABOVE ADD BELOW VS. REPLACE REPLACE REPLACE REPLACE REPLACE REPLACE REPLACE REPLACE Using REPLACE does the same job but it decreases errors. LOL ... it's not full-proof but it has worked for me. ![]() |
#10
|
|||
|
|||
![]() Quote:
P.S. IMO, vB.org should post some hacking standards... P.P.S. The minimod itself is good, good job princeton. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|