vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to access $template_hook[postbit_userinfo_left] ? (https://vborg.vbsupport.ru/showthread.php?t=154399)

0ptima 08-05-2007 09:53 PM

How to access $template_hook[postbit_userinfo_left] ?
 
The $template_hook[postbit_userinfo_left] hook in the postbit_legacy seems like a good place to add some member badges, but how do you use it?

I went to "Add new plugin", and under the "Hook Location", I dont see this hook. The only postbit hooks I see are:
postbit_dispaly_start
postbit_dispaly_complete
postbit_attachement
postbit_imicons

I just upgraded from 3.6.4 -> 3.6.8

EnIgMa1234 08-05-2007 10:12 PM

You do it using plugins. Check the articles section for a tutorial on template hooks

0ptima 08-12-2007 04:44 PM

Thanks, I finally figured out how to get the template to execute. Now I having problems with the following code

PHP Code:

$template_hook[postbit_userinfo_right_after_posts] .= '
<if condition="$post['
userid']"><div>iTrader: (<b><a href="itrader.php?$session[sessionurl]u=$post[userid]">$post[itrader_total]</a></b>)</div></if> '

This gives me a parse error.

Opserty 08-12-2007 05:21 PM

Take out the apostrophes in $post['userid']

i.e. $post[userid] :p

EnIgMa1234 08-12-2007 06:19 PM

Apostrophes in plugins
None in templates ;)

Try changing
$post[itrader_total]

To

$post['itrader_total']

Opserty 08-12-2007 06:21 PM

Read his code again :p

Did you miss the syntax highlighting as well? hehe

EnIgMa1234 08-12-2007 06:23 PM

Oh yea my bad :p

0ptima 08-14-2007 12:21 AM

Still does not work.. even after I removed all the quotes...

EnIgMa1234 08-14-2007 09:03 AM

So you have
PHP Code:

$template_hook['postbit_userinfo_right_after_posts'] .= '
<if condition="$post[userid]"><div>iTrader: (<b><a href="itrader.php?$session[sessionurl]u=$post[userid]">$post[itrader_total]</a></b>)</div></if> '



0ptima 08-14-2007 11:30 PM

Quote:

Originally Posted by EnIgMa1234 (Post 1317148)
So you have
PHP Code:

$template_hook['postbit_userinfo_right_after_posts'] .= '
<if condition="$post[userid]"><div>iTrader: (<b><a href="itrader.php?$session[sessionurl]u=$post[userid]">$post[itrader_total]</a></b>)</div></if> '




That does not work either...


All times are GMT. The time now is 04:53 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.01097 seconds
  • Memory Usage 1,738KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete