PDA

View Full Version : adding printable thread button in the sidebar


fxdigi-cash
02-20-2015, 04:33 AM
Hi all,

I want to remove the popup menu above the threads and planning to put them on the sidebar on the same thread page where a user can push the printable version button as it is easy to see aside.

I took this code from Showthread template and tried to set it up on the sidebar, but it doesn't pick the thread number!!

<a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}printthread.php?{vb:raw session.sessionurl}t={vb:raw threadid}&amp;pp={vb:raw perpage}&amp;page={vb:raw pagenumber}" accesskey="3" rel="nofollow">{vb:rawphrase show_printable_version}</a>

what is the right way to do that?

Thanks

kh99
02-20-2015, 10:03 AM
How are you doing that exactly? If you're using a template, you would need to register the threadid and pagenumber values to the template before rendering it (and remove the $ from vboptions the first time it appears).

fxdigi-cash
02-20-2015, 11:03 AM
How are you doing that exactly? If you're using a template, you would need to register the threadid and pagenumber values to the template before rendering it (and remove the $ from vboptions the first time it appears).

I'm not really sure how, but I know for sure it is possible to do so...

how do I register the threadid and pagenumber values? do I have to use a plugin or write a php code?
any clue on that??

by the way, the printable version button is going to be on the same page where it is used to be except that I will move it to the sidebar that appears on the same page as showthread

Thanks

kh99
02-20-2015, 11:30 AM
So when you say you're moving it to the sidebar, do you mean you're creating a forum block? Then you'd need a php type forum block that renders a template.

Well, OK, you could just code the html into your php wihout a template, and it might be a little easier to code. The convention is to use templates for html, but you don't have to follow that.

fxdigi-cash
02-20-2015, 11:38 AM
So when you say you're moving it to the sidebar, do you mean you're creating a forum block? Then you'd need a php type forum block that renders a template.

Well, OK, you could just code the html into your php wihout a template, and it might be a little easier to code. The convention is to use templates for html, but you don't have to follow that.

ok, good to know. However, I still don't know how to start this. I mean I don't know any php code that replaces the one I posted in the first post. also, I have no idea what template for html to use??

can you give some example please!

Thanks

kh99
02-20-2015, 12:15 PM
Hmm...Well, the sidebar only shows up on the forum home page, so I don't understand how it's going to let you print a thread.

fxdigi-cash
02-20-2015, 01:47 PM
Hmm...Well, the sidebar only shows up on the forum home page, so I don't understand how it's going to let you print a thread.

not really, it is a customized sidebar I made by dividing the showthread page. you can see it here:

http://www.forexmegacashback.com/showthread.php?t=29903&p=30440#post30440

I want to show the print thread on the left side where you can see the sidebar under the menu