![]() |
Building a plugin need help
I would like to build a plugin based on the following code
Code:
$json = file_get_contents("http://us.battle.net/api/wow/character/Shattered%20Hand/". $vbulletin->userinfo['username']."?fields=guild,items,professions,reputation,stats", true); doesnt matter where i add {vb:raw wowapi} |
Not knowing where you want it to appear makes it hard to help.
But the echo is what's doing it. Change the echo to a template hook where you want it to appear. ie: Code:
$template_hook['postbit_userinfo_right'] .= "<img src=\"http://us.battle.net/static-render/us/".$Thumbnail."\">"; |
How would i make this show under or above toplinks?
Thanks for your quick response --------------- Added [DATE]1346937602[/DATE] at [TIME]1346937602[/TIME] --------------- I think i figured it out i just have one problem.... Code:
$json = file_get_contents("http://us.battle.net/api/wow/character/Shattered%20Hand/". $vbulletin->userinfo['username']."?fields=guild,items,professions,reputation,stats", true); how can i tell the script to die if the link fails to load? --------------- Added [DATE]1346961011[/DATE] at [TIME]1346961011[/TIME] --------------- Okay my plugin is working awesome with your guidance justt need help with on piece of code... please :) what do i need to add to my code to not display the plugin if user is not logged in? |
Something like this would work...
PHP Code:
|
All times are GMT. The time now is 01:41 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|