Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Similar Threads After The First Post [Plugin] - VB4 - By AioNets.com Details »»
Similar Threads After The First Post [Plugin] - VB4 - By AioNets.com
Version: 1.00, by A.Chakery A.Chakery is offline
Developer Last Online: May 2017 Show Printable Version Email this Page

Category: Add-On Releases - Version: 4.x.x Rating:
Released: 11-26-2014 Last Update: Never Installs: 15
Uses Plugins Template Edits Auto-Templates
 
No support by the author.

Similar Threads After The First Post , Brought You By : AioNets.com


Description :

This is the plugin and simple version of my previous product (HERE) which automatically moves the similar threads under the first post of every topic.

The differences between this plugin and the previous product Are :
- In the plugin version you will not be able to turn similar threads off for forums of your choice.
- The plugin version is much more optimized especially for large boards since it does not add additional queries to the database and it simply moves the similar threads under the first post.
- The installation of the plugin version is a little challenging than the product one.

Personally I would choose the plugin version over product one because of its performance.

Features :
- Automatically moves similar threads to the bottom of the first post.
- Ability to disable it globally
- Ability to customize it using CSS
- Works great with vBSEO and DB-SEO


Ease of Installation : Normal


Installation :

First ensure that the your vBulletin Similar Threads option is enabled.


1- Goto : AdminCP > Plugins and Products > Add New Plugin

2- Then set the options as below :

Product: vBulletin
Hook Location: showthread_complete
Title : AioNets Similar Threads
Execution Order : 5
Plugin PHP Code :
PHP Code:
if (isset($similarthreads))
{
    
$postbits str_replace('<!-- AioNetsSimilarThreads -->'$similarthreads$postbits);
    unset(
$similarthreads);

Plugin is Active : YES

Then Click On the Save Button.

3- Now you should edit the related templates to similar threads :
Goto : AdminCP > Styles & Templates > Style Manager

Then click on the "? ?" button located at the right side of your active Style.
-or-
Click on the Drop down menu and select " Edit Templates " option.

Then search for "Show Thread Templates" and Double Click on it.

Then under Show Thread Templates you will see two templates related to Similar threads which we need to work on :

First one is -> "showthread_similarthreadbit" ... Please Double click on it and replace all of its content with :
PHP Code:
<ul><li>$simthread[prefix_rich] <a href="showthread.php?$session[sessionurl]t=$simthread[threadid]title="$simthread[preview]">$simthread[title]</a></li></ul
The second template is : "showthread_similarthreads" ... Double click on it and replace all of its content with :
PHP Code:
<vb:if condition="in_array($post[postcount], array(1))">
<
br /><br /><div class="aionets_similar_threads"
<
strong>$vbphrase[similar_threads] </strong><br /> 
$similarthreadbits 
</div>  
</
vb:if> 
4- Now Search For "Postbit Templates" and Double Click on it :

NOTE : If you are using the Postbit Style (which can be set in vBulletin Options > Style & Language Settings )

You should Double click on "postbit" template BUT if you are using the Legacy style you should double click on "postbit_legacy" ...

When you double clicked on your postbit template search for " {vb:raw post.message} " and AFTER that insert below code :
PHP Code:
<!-- AioNetsSimilarThreads --> 
And then save this template.

5- Styling :
- First Please Go to "AdminCP > Style Manager" ,
- Open your style templates,
- Then Add below CSS code to "postbit.css" template
PHP Code:
.aionets_similar_threads{color:#465584;float:right;background-color:#FFF;border-left:4px solid #19364D;border-right:1px dotted #19364D;border-top:1px dotted #19364D;border-bottom:1px dotted #19364D;padding:7px;margin:0 auto 8px} 
And It's Done !


IMPORTANT NOTES
1- Always take backup of any template which you are working on
2- Please USE editor apps like Text Wrangler in Mac or NotePad++ in Windows to edit templates and never edit any code directly. Personally I am using Espresso on my Mac and I am really satisfied.

Screenshots

File Type: png Similar Threads By AioNets.com.png (121.5 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
Muhammad Rahman

Comments
  #12  
Old 02-22-2015, 10:23 AM
Marcin1 Marcin1 is offline
 
Join Date: Sep 2012
Location: Poland
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not showing with a new PHP code. I replaced to old one

<br /><br /><div class="aionets_similar_threads">
<strong>$vbphrase[similar_threads] </strong><br />
$similarthreadbits
</div>

And of course is visible in every post.

/edit

Thank you A.Chakery for help by a private message!
Reply With Quote
  #13  
Old 02-23-2015, 02:05 AM
A.Chakery's Avatar
A.Chakery A.Chakery is offline
 
Join Date: Jul 2007
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by M.C. View Post
Thanks it works but... it's show on EVERY post, not only first one....

I like your style for first post insertion but want to leave bottom block original.
I think is better to create separate new template for first post but what need to be changed in plugin then?

Thanks
Please use this code in STEP 3 editing the showthread_similarthreads template

PHP Code:
<vb:if condition="in_array($post[postcount], array(1))">
<
br /><br /><div class="aionets_similar_threads"
<
strong>$vbphrase[similar_threads] </strong><br /> 
$similarthreadbits 
</div>  
</
vb:if> 
Reply With Quote
  #14  
Old 02-24-2015, 07:01 PM
M.C. M.C. is offline
 
Join Date: Jan 2002
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no, it doesn't show at all with any of your codes above either with my version:

PHP Code:
<vb:if condition="$post['isfirstshown']">something</vb:if> 
so I still ask you to create separate template for first post and leave "showthread_similarthreads" untouched
Reply With Quote
  #15  
Old 02-25-2015, 05:10 AM
A.Chakery's Avatar
A.Chakery A.Chakery is offline
 
Join Date: Jul 2007
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for your suggestion ... Well it depends on how you want the similar threads to be shown.

I will mention your idea in my second post ...

Good luck.
Reply With Quote
  #16  
Old 03-24-2015, 04:37 PM
stained stained is offline
 
Join Date: Jun 2009
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

What would I need to do to hide the similar threads from guests?
Reply With Quote
  #17  
Old 03-24-2015, 07:01 PM
A.Chakery's Avatar
A.Chakery A.Chakery is offline
 
Join Date: Jul 2007
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually Showing the similar threads to Search engine BOTs which view your website as guests has a positive impact on SEO but if you still need to hide similar threads for a specific reason please replace "showthread_similarthreads" content with below code :

PHP Code:
<vb:if condition="in_array($post[postcount], array(1)) AND $show['member']"
<
br /><br /><div class="aionets_similar_threads">  
<
strong>$vbphrase[similar_threads] </strong><br />  
$similarthreadbits  
</div>   
</
vb:if> 
I hope it helps.
Reply With Quote
Благодарность от:
stained
  #18  
Old 03-25-2015, 01:35 PM
stained stained is offline
 
Join Date: Jun 2009
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks very much :up:
Reply With Quote
  #19  
Old 03-25-2015, 07:08 PM
A.Chakery's Avatar
A.Chakery A.Chakery is offline
 
Join Date: Jul 2007
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are welcome.

I am glad that it helped.

Good luck.
Reply With Quote
  #20  
Old 07-19-2015, 08:34 PM
Bozza Bozza is offline
 
Join Date: Jul 2003
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm a bit confused...

1. I can't find $post[message] in my postbit_legacy.

2. Even if I could, isn't the requested code (<!-- AioNetsSimilarThreads --> ) just a comment?
Reply With Quote
  #21  
Old 07-19-2015, 09:02 PM
A.Chakery's Avatar
A.Chakery A.Chakery is offline
 
Join Date: Jul 2007
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello Bozza,

1. This would not be possible. Would you please send me your post_legacy content using a Private message so I can take a look at it ?

2. No, as you can see in second step we set a replacement value for this comment so this code will actually be replaced with what we have set in the plugin.
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 10:23 AM.


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.04706 seconds
  • Memory Usage 2,368KB
  • Queries Executed 28 (?)
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
  • (8)bbcode_php
  • (1)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
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete