Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Email to Friend, Print Version, Subscribe Thread in Postbit/Postbit Legacy Details »»
Email to Friend, Print Version, Subscribe Thread in Postbit/Postbit Legacy
Version: 1.00, by Neutral Singh Neutral Singh is offline
Developer Last Online: Feb 2016 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.8.x Rating:
Released: 01-25-2009 Last Update: Never Installs: 40
Template Edits
Re-useable Code Translations  
No support by the author.

Another simple yet useful template modification for the benefit of forum members. This shows Email to Friend, Print Version, Subscribe Thread in Postbit/Postbit Legacy:

Benefits:
1. More visibility to 'Email a Friend' alongside each about the topic... means more invitations, New Registrations!
2. Easy access to See Print version of the topic... more printouts more free publicity!
3. Easy access to Subscribe/unsubscribe option... members feel obliged!

Step 1. Edit Template: Postbit or Postbit_legacy

Code:
Find:
Quote:
<if condition="$post['title']"><strong>$post[title]</strong></if>
Add Below:
Quote:
>>&nbsp;&nbsp; <img class="inlineimg" src="$stylevar[imgdir_button]/printer.gif" alt="$vbphrase[show_printable_version]" />&nbsp;&nbsp;<a href="printthread.php?$session[sessionurl]t=$post[threadid]" accesskey="3" rel="nofollow">$vbphrase[show_printable_version]</a>&nbsp;&nbsp; <img class="inlineimg" src="$stylevar[imgdir_button]/sendtofriend.gif" alt="$vbphrase[email_this_page]" />&nbsp;&nbsp;<u><a href="sendmessage.php?$session[sessionurl]do=sendtofriend&amp;t=$post[threadid]" rel="nofollow">$vbphrase[email_this_page]</a></u>&nbsp;&nbsp; <if condition="$show['member']"> <img class="inlineimg" src="$stylevar[imgdir_button]/subscribe.gif" alt="$vbphrase[subscription]" />&nbsp;&nbsp; <if condition="$show['subscribed']"> <a href="subscription.php?$session[sessionurl]do=removesubscription&amp;t=$post[threadid]" rel="nofollow">$vbphrase[unsubscribe_from_this_thread]</a> <else /> <a href="subscription.php?$session[sessionurl]do=addsubscription&amp;t=$post[threadid]" rel="nofollow">$vbphrase[subscribe_to_this_thread]</a> </if> </if>



And for those who want this to show for only first post
:

Code:
Warp the above code with the following conditional:

<if condition="$post[postcount] % $vboptions[maxposts] == 1">
put the above code here!
</if>
That's it!!

nJoy!!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 03-12-2009, 02:44 PM
nascartr nascartr is offline
 
Join Date: Jun 2008
Posts: 317
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very useful! Thanks!
Reply With Quote
  #23  
Old 03-12-2009, 02:57 PM
nascartr nascartr is offline
 
Join Date: Jun 2008
Posts: 317
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The Subscribe to thread works on my site but once subscribed it doesn't allow you to unsubscribe nor does it give the option.

http://diecastcrazy.com/community/forums.php
Reply With Quote
  #24  
Old 03-12-2009, 03:24 PM
nascartr nascartr is offline
 
Join Date: Jun 2008
Posts: 317
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This also shows up in PM's without the text, only the images and no link either. Kinda out of place.
Reply With Quote
  #25  
Old 03-12-2009, 03:40 PM
nascartr nascartr is offline
 
Join Date: Jun 2008
Posts: 317
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Solved the PM problem by using the "if" condiitonal in the instructions post, just wish it would show for all posts without showing the images in PM's. Still can't figure out the Subscribe/Unsubscribe problem.
Reply With Quote
  #26  
Old 04-17-2009, 03:45 PM
coskun6048 coskun6048 is offline
 
Join Date: Mar 2009
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you --teşekk?r ederim ben yaptım ama bu biraz daha fazla
Reply With Quote
  #27  
Old 06-18-2009, 08:24 PM
vbob vbob is offline
 
Join Date: Jan 2008
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very useful mod.
Thank you. :-)
Installed...!!!
I modified a little the code to fit my needs. I changed it just to fit well in my forum (I removed the text next to the icons). ;-)


Here is the modified Code:


Code:
<div align=right>
<if condition="$post[postcount] % $vboptions[maxposts] == 1">

&nbsp;
&nbsp;
&nbsp;
&nbsp;

<a href="printthread.php?$session[sessionurl]t=$post[threadid]" accesskey="3" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/printer.gif" alt=" Show Printable Version]" border="0"/></a>

&nbsp;
&nbsp;
&nbsp;

<a href="sendmessage.php?$session[sessionurl]do=sendtofriend&amp;t=$post[threadid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/sendtofriend.gif" alt="Email this Page to a Friend" border="0"/></a>

&nbsp;
&nbsp;
&nbsp; 
	<if condition="$show['member']"> 
	<if condition="$show['subscribed']"> 

	<a href="subscription.php?$session[sessionurl]do=removesubscription&amp;t=$post[threadid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/subscribe.gif" alt="Un-Subscribe from this Thread" border="0"/></a> 

	<else /> 

	<a href="subscription.php?$session[sessionurl]do=addsubscription&amp;t=$post[threadid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/subscribe.gif" alt="Subscribe to this Thread" border="0"/></a> 

	</if> 
	</if>
</if>
</div>
Here is the Result in my forum:

Attachment 100753

I posted it in case someone is interested in removing the text next to the pictures too and use less space in his/her theme. :-)

What is strange to me is the fact that the "unsubscribe" code, seems that it is not working (at least in my forums). Either with the original code neither with the code I used (see above).
Also I would like to know where exactly is the correct spot in the template code to put the mod, so the 3 icon links can appear below the "Quote", "Multi Quote", "Reply" without a problem (at the bottom of the post).

Thanks a priori for your reply. :-)


EDIT: I Found the right spot inside the template I think...;-)

in "postbit_legacy" Search for:


Code:
<td colspan="2" class="postbit_bottom_right"><div style="background:url($stylevar[imgdir_misc]/post-br-r.gif);float:right;height:47px;width:10px;"></div>
After that put the mod code. :-)

Here are the results in my site:

Attachment 100754
Reply With Quote
  #28  
Old 07-23-2009, 06:31 PM
ludachris ludachris is offline
 
Join Date: Feb 2002
Posts: 287
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any way of modifying this so that each post will have an "email to friend" link, yet, forcing the link that shows up in the message of the email pointing to the post within the thread, instead of to the thread? This way, people could email specific posts to friends in very long threads. In a thread that is 20 pages long, I want people to be able to point to a specific post when they email to a friend.
Reply With Quote
  #29  
Old 08-09-2009, 01:39 PM
Fergal C Fergal C is offline
 
Join Date: Dec 2004
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, great feature. I used vbob's version.
Reply With Quote
  #30  
Old 09-03-2009, 02:19 AM
bmckinley's Avatar
bmckinley bmckinley is offline
 
Join Date: Jun 2009
Location: Texas
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the Mod. Installed.

I did move it around a little by moving the code and changed the spacing a bit:

Here's what I got:



In the postbit or postbit_legacy template, find the following:

Code:
<td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-$stylevar[left]: 0px" align="$stylevar[right]">
   &nbsp;
and insert this code below: (it's the same as the original, just added a couple of spaces)

Code:
 
&nbsp;&nbsp;
<img class="inlineimg" src="$stylevar[imgdir_button]/printer.gif" alt="$vbphrase[show_printable_version]" />&nbsp;<a href="printthread.php?$session[sessionurl]t=$post[threadid]" accesskey="3" rel="nofollow">$vbphrase[show_printable_version]</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img class="inlineimg" src="$stylevar[imgdir_button]/sendtofriend.gif" alt="$vbphrase[email_this_page]" />&nbsp;<u><a href="sendmessage.php?$session[sessionurl]do=sendtofriend&amp;t=$post[threadid]" rel="nofollow">$vbphrase[email_this_page]</a></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <if condition="$show['member']">
        <img class="inlineimg" src="$stylevar[imgdir_button]/subscribe.gif" alt="$vbphrase[subscription]" />&nbsp;
        <if condition="$show['subscribed']">
            <a href="subscription.php?$session[sessionurl]do=removesubscription&amp;t=$post[threadid]" rel="nofollow">$vbphrase[unsubscribe_from_this_thread]</a>
        <else />
            <a href="subscription.php?$session[sessionurl]do=addsubscription&amp;t=$post[threadid]" rel="nofollow">$vbphrase[subscribe_to_this_thread]</a>
        </if>
    </if>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Reply With Quote
  #31  
Old 09-03-2009, 07:53 AM
Log on Log on is offline
 
Join Date: Aug 2009
Location: KSA
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great,,,
thank u
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 01:45 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05530 seconds
  • Memory Usage 2,332KB
  • Queries Executed 26 (?)
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
  • (6)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete