vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Miscellaneous Hacks - "Find latest started threads" in postbit_legacy (https://vborg.vbsupport.ru/showthread.php?t=309430)

JGreig 03-10-2014 11:00 PM

"Find latest started threads" in postbit_legacy
 
1 Attachment(s)
Why use add-ons when you can do this with a simple bit of code added to your postbit_legacy template?

Admin CP > Styles & Templates > YOUR STYLE > Edit Templates > Postbit Templates > postbit_legacy

Find
Code:

<dt>{vb:rawphrase posts}</dt> <dd>{vb:raw post.posts}</dd>
Add below
Code:

<dt>{vb:phrase threads}:</dt> <dd><a href="search.php?{vb:raw session.sessionurl}do=finduser&amp;userid={vb:raw post.userid}&amp;contenttype=vBForum_Post&amp;starteronly=1" rel='nofollow'>{vb:rawphrase find_all_started_threads}</a></dd>
You can do the same for the postbit template.

====================================

If you would rather show the thread count in the postbit_legacy/postbit, use the following code:

Code:

<dt>{vb:phrase threads}:</dt> <dd>{vb:raw post.threads}</dd>

stevieb 07-22-2014 06:48 AM

How do you get the numbers to replace the words, ie the number of threads like the number of posts?

JGreig 08-21-2014 06:37 PM

Quote:

Originally Posted by stevieb (Post 2507748)
How do you get the numbers to replace the words, ie the number of threads like the number of posts?

Instead of adding this code:

Code:

<dt>{vb:phrase threads}:</dt> <dd><a href="search.php?{vb:raw session.sessionurl}do=finduser&amp;userid={vb:raw post.userid}&amp;contenttype=vBForum_Post&amp;starteronly=1" rel='nofollow'>{vb:rawphrase find_all_started_threads}</a></dd>
Add this instead:

Code:

<dt>{vb:phrase threads}:</dt> <dd>{vb:raw post.threads}</dd>

stevieb 10-07-2014 04:53 PM

Quote:

Originally Posted by JGreig (Post 2512260)
Add this instead:

Code:

<dt>{vb:phrase threads}:</dt> <dd>{vb:raw post.threads}</dd>

Nope doesn't work... it's showing a blank box by the
Code:

{vb:raw post.threads}
which should display the number of threads....

Black Snow 10-08-2014 07:24 AM

I think it should be:
Code:

<dt>{vb:rawphrase threads}:</dt> <dd><a href="search.php?{vb:raw session.sessionurl}do=finduser&amp;userid={vb:raw post.userid}&amp;contenttype=vBForum_Post&amp;starteronly=1" rel='nofollow'>{vb:rawphrase find_all_started_threads}</a></dd>

stevieb 10-08-2014 04:53 PM

Quote:

Originally Posted by Black Snow (Post 2518105)
I think it should be:
Code:

<dt>{vb:rawphrase threads}:</dt> <dd><a href="search.php?{vb:raw session.sessionurl}do=finduser&amp;userid={vb:raw post.userid}&amp;contenttype=vBForum_Post&amp;starteronly=1" rel='nofollow'>{vb:rawphrase find_all_started_threads}</a></dd>

And that'll show the number of threads? I only want the number (of threads) and not the phrase (find all started threads).....

Thank you.

Black Snow 10-09-2014 07:09 AM

Quote:

Originally Posted by stevieb (Post 2518172)
And that'll show the number of threads? I only want the number (of threads) and not the phrase (find all started threads).....

Thank you.

Sorry, I thought you wanted something else. Please follow this: https://vborg.vbsupport.ru/showthread.php?t=267584


All times are GMT. The time now is 10:05 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.01127 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete