Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-20-2015, 04:33 AM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default adding printable thread button in the sidebar

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!!

HTML Code:
<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
Reply With Quote
  #2  
Old 02-20-2015, 10:03 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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).
Reply With Quote
  #3  
Old 02-20-2015, 11:03 AM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
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
Reply With Quote
  #4  
Old 02-20-2015, 11:30 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 02-20-2015, 11:38 AM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
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
Reply With Quote
  #6  
Old 02-20-2015, 12:15 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 02-20-2015, 01:47 PM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
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/sho...0440#post30440

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:17 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06781 seconds
  • Memory Usage 2,219KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete