vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Add extra info under postbit (https://vborg.vbsupport.ru/showthread.php?t=205688)

wAnBoA 02-17-2009 03:46 PM

Add extra info under postbit
 
Hey guys,
I know that if you want to add extra info under the postbit all you need to do is to edit the postbit_legacy template.
etc
Code:

<if condition="$post[field3]"><b>Interests:</b> $post[field3]</if>
Code:

$post[crowns]$post[champtext]
But there are quite afew info i would like to add etc Profile pic, no. of thread made, last online, view user's thread, album link . . .

How do i actually find these code or whatever you called?
Can someone teach me how to obtain such code?
Thanks in advance!

bananalive 02-17-2009 04:17 PM

Create plugin hook showthread_postbit_create called test
PHP Code:

print_r($post);
exit; 

Then view thread. It will output all the $post array like this:
(but bigger)
Code:

Array ( [postid] => 186 [threadid] => 127 [parentid] => 0 [username] => BananaLive [userid] => 1
$post[postid] = 186
$post[threadid] = 127
$post[parentid] = 0
$post[username] = BananaLive
$post[userid] = 1

wAnBoA 02-17-2009 05:13 PM

Very awesome! Thanks alot bananalive~~
But i can't get the value like the Profile pic as it's not shown on the thread.

Lynne 02-18-2009 12:40 AM

Quote:

Originally Posted by wAnBoA (Post 1747102)
Very awesome! Thanks alot bananalive~~
But i can't get the value like the Profile pic as it's not shown on the thread.

That's because the profile pic isn't available. The code posted shows the post variables that are already available. You will have to create a plugin, or find a mod, to be able to use the profile pic in the postbit template.

wAnBoA 02-18-2009 02:08 AM

Quote:

Originally Posted by Lynne (Post 1747433)
That's because the profile pic isn't available. The code posted shows the post variables that are already available. You will have to create a plugin, or find a mod, to be able to use the profile pic in the postbit template.

Oh i see. Now i totally got it. Thanks Lynne.
By the way, is it difficult to create a plugin to show profile pic in the postbit template?

Lynne 02-18-2009 03:00 AM

I don't know as I've never tried to do it. I think there is a mod for using profile pictures in place of avatars in the postbits, so I'm guessing they wrote a plugin to get that info and you can grab it from that mod.


All times are GMT. The time now is 09:02 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.01091 seconds
  • Memory Usage 1,725KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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