The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I would like to add a new button next to the, Edit/Quote, buttons in each post.
Problem? I can't find the right place to put the code/template info. I created a new postbit template (which contains the link and image html), and then to eval it I did a Code:
if (ismoderator($thread['forumid'])){ eval("\$quoteDBlink = \"".gettemplate("postbit_addquote")."\";"); } else { $quoteDBlink = " "; } basically I only want mods of the forum or admins to be able to see the button. Thing is the button never shows up. I've tried to add that code to showthread.php in a few places to no avail thus far. Where can I add this code so that the button shows up in the right place and for the right people. TIA |
#2
|
||||
|
||||
![]()
In showthread.php find:
PHP Code:
PHP Code:
![]() Regards - miSt - miSt |
#3
|
|||
|
|||
![]()
mist, first off thanks a lot for taking the time to give me a nice reply.
thing is, here is what my showthread looks like before you posted that. PHP Code:
here is the postbit template Code:
<td align="right" nowrap><smallfont> $quoteDBlink <a href="editpost.php?s=$session[sessionhash]&action=editpost&postid=$post[postid]"><img src="https://vborg.vbsupport.ru/images/edit.gif" border="0" alt="Edit/Delete Message"></a> <a href="newreply.php?s=$session[sessionhash]&action=newreply&postid=$post[postid]"><img src="https://vborg.vbsupport.ru/images/quote.gif" border="0" alt="Reply w/Quote"></a> </smallfont></td> here is my postbit_addquote Code:
<a href="/addquote.php?&a=fa&postid=$post[postid]"><img src="{imagesfolder}/quotedb.gif" border="0" alt="Add Quote to QuotesDB"></a> |
#4
|
|||
|
|||
![]()
i even just tried this as my if statement instead and it didn't work.
PHP Code:
|
#5
|
||||
|
||||
![]()
Ok well i think i can locate the problem.
Try this code instead: PHP Code:
- miSt |
#6
|
|||
|
|||
![]()
in showthread i did a
print $quoteDBlink; and it put the button on the top of the page as expected, granted the {imagesfolder} part didnt get parsed to the correct thing yet. But I can't figure out why the variable isn't getting passed to the postbit template. |
#7
|
|||
|
|||
![]()
you're code's not going to work because the syntax doesnt look right, the quotes arn't gonna work out.
|
#8
|
|||
|
|||
![]()
the variable is getting assigned, i just dont know why its not showing up in the postbit template, 'cause I can just print it out after that if statement and it shows the correct info, but it wont show up in the template.
|
#9
|
|||
|
|||
![]()
hmm well i cant pass any variable out of that section for some reason, this is odd. man does vb's coding style tick me off sometimes.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|