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

Reply
 
Thread Tools
WoW Character BBCode Details »»
WoW Character BBCode
Version: 0.4.9b, by sweede sweede is offline
Developer Last Online: Jun 2014 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.7.x Rating:
Released: 02-01-2008 Last Update: 11-24-2008 Installs: 94
DB Changes Uses Plugins Template Edits
Re-useable Code Additional Files Translations Is in Beta Stage  
No support by the author.

This is a continuation of the project, https://vborg.vbsupport.ru/showthread.php?t=160418 . I have made several modifications to the original authors code and several have asked for my modifications.

Because of this and the original authors lack of updating the original modification, I have decided to upload this package for all to use.

All credit goes to the original author(s) of the utility as i have only cleaned up the code and packaged it for easy usage.

WARNING!
This is very beta at this time. I have added the product now to force myself to update and maintain the plugin and to share it with the rest of my fellow World of Warcraft webmasters

Installation
  1. Uninstall your existing WoW Char Code installation. I have changed the product ID itself and it may not update everything correctly.
  2. Remove the clientscript/ajax_tooltip and clientscript/phparmory folders if they exist
  3. Upload the contents of the "Upload" Folder to the ROOT directory of your forums (for example, if you have your forums installed in /home/mydir/public_html/forums , you would unzip into that folder.)
  4. Import the product/product-WoWCharBBCode-?.??.xml file

Changelog
  • 0.4.9b
    • Added basic Death Knight support
    • Fixed problem with characters with no professions (common with Death Knights)
  • 0.4.9a
    • Fixed a minor issue with realms in spaces in the name
  • 0.4.9
    • Added wysiwyg support
  • 0.4.8a
    • Fixed a php parse error in functions_wowcharcode.php. you do not need to download the entire zip file, just replace your existing functions_wowcharcode.php file with the attached .php file
  • 0.4.8
  • 0.4.7a
    • Removed some left over debugging statements and info in the product and php file.
  • 0.4.7
    • Changed the backend armory code.
    • Updated caching to not cache Armory results that end up as errors
    • Added character class, race and professions as vbphrases.
    • Added KR and TW Armory locales. (, etc)
    • Some minor fixes.
  • 0.4.4
    • Added Icon caching to help with slow armory. Images are cached by default in the armory folder. chmod this folder to 777 and icons will be automaticly cached to this folder.
    • You can now use the variable $wowchar_code in the postbit (or postbit_legacy) to display the character tooltip in a post.
  • 0.4.3 Fixed issue with rebuilding post cache.
  • 0.4.2 Added option to show/hide realm if a default realm is set.
  • 0.4.1 Fixed an issue if the character doesnt have armory data, Only change is in functions_wowcharcode.php file.
  • 0.4
    • All Character stat text are now phrases. you will find a new Phrase Type in the Phrase Manager ( WoW BBCode Phrases )
    • Added default realm option so one does not need to use the [char=server] option when specifying characters on own realm.
    • Customized the stat display per class and on some specs (such as feral v.s. resto druids). see an example at http://www.dramaloot.com/forums/showthread.php?p=19271
  • 0.3
    • Armory Caching works for both US and EU armorys.
    • Removed un-used files.
    • Put the majority of the codes HTML creation as templates and use vbulletins ajax.php and hooks.
    • Added options for default locale (armory) to use (currently EU and US armories).
    • Added option to disable caching of the Armory (i use it to test armory retrieval)
    • Added ability to specify what armory the character / realm you would like, see usage notes below.
  • 0.2
    • Armory Caching never actually worked properly, this should now be fixed.
    • Remove the includes/functions_wow3bbcode.php file. This has been replaced by a plugin.
    • Remove the clientscript/phparmory/config.php file. This isnt needed.
    • Major updates to phparmory.php
    • Minor Plugin changes + code cleanup.
ToDo
  • New tooltip javascript
  • New character sheet.
  • Create easy to modify interface for character stats to be displayed in tooltip.


Usage
Using the character code is easy enough,
[char]CHARACTER[/char] if default realm option is set and character links is on same realm.
For characters not on the same realm as the default,
[char=SERVER]CHARACTER[/char]
For example,
[char=Vek'nilash]Azaril[/char]
Or, if you want to link a character profile from another locale (i.e. EU realms) , you simply add EU- before the server name.
[char=EU-Vek'nilash]Azaril[/char]

The same thing applies to linking US realm characters from a EU default forum.

See a working example at http://www.dramaloot.com/index.php?id=officer_cl (This is a vbadvanced custom page using the BBCode page type).

Added German translation for what i currently have localized. Provided by jluerken http://www.wow-relaxed.de

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #172  
Old 06-24-2008, 04:40 PM
sweede's Avatar
sweede sweede is offline
 
Join Date: Jan 2007
Posts: 391
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You would be correct.

Much of it was hard coded and copy-pasted from the original hack.

I have been slowly re-writing the entire thing though, it's just taking longer than i have anticipated. Much of it is due to handling the amount of information (over 130 individual stat items) returned from the wowarmory.com's character XML file and finding an easily customizable way to display that information on a per class, or even talent spec, basis.

For what you want to do though (Multiple servers + characters per postbit) , I won't include features like that because it would be impossible to write code to support the many ways you would be able to get that information to the hook.

I would instead have methods/functions available (such as GetCharacterURL($server,$char,$locale) that you would call in your own hook with your own processing of the custom profile field.

so for example, you would have a profile field that people would enter character/realm info like
US|Vek'nilash|Azaril
US|Vek'nilash|Offended
US|Uldaman|Azaril

and your code in the postbit_start hook would look like
PHP Code:
// process profile field.
$postbit_array split("\n"$post[field6] );
foreach(
$postbit_array as $line)
{
 
$line_array split("|",$line);
 list(
$locale$realm$char) = $line_array;
 
$URL .= GetCharacterURL($char,$realm,$locale) . "\n";
}

// replace hook in postbit cache
$find '$postbit_left';
$replace $URL;
$template $template_cache['postbit'];

$template str_replace($find$replace$template); 
Of course that's all pseudo code and you'll have to write it accordingly, but that's the general idea of what would need to be done.
Reply With Quote
  #173  
Old 06-26-2008, 02:53 PM
Tolas Tolas is offline
 
Join Date: Apr 2006
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I keep getting the "something Else is wrong" error now.

I have double checked the settings.
un-installed and re-installed, and corrected settings again.
cleared the cache

I have also tried:

[char=US-Argent Dawn]Tolas[/char]
[char=US-Argent+Dawn]Tolas[/char]
[char=Argent Dawn]Tolas[/char]
[char=Argent+Dawn]Tolas[/char]
[char]Tolas[/char] (tried both ways of setting default server in options, also tried leaving it blank)

I am stumped
Reply With Quote
  #174  
Old 06-27-2008, 07:07 PM
sweede's Avatar
sweede sweede is offline
 
Join Date: Jan 2007
Posts: 391
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found an entirely new, better, faster way to do the tooltips. Along with that, it should also help clear up some of the issues that people may have been having.

I'll also have a FAR cleaner code coming out, but the cache is that i'm going to scale back on its features / output a LOT so that I can extend it naturaly instead of having to add hack after hack to the code.

I also will be providing built in support for the character info provided from most Gryphon's mods and once again revamped error logging

I'll try to make something available for Sunday.
Reply With Quote
  #175  
Old 06-27-2008, 07:52 PM
comicus comicus is offline
 
Join Date: Jul 2006
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

dang you sweede! that's such a tease lol. looking forward to seeing what you've come up with.

if you come up with an easy way for us to specifiy which stats show up, i'd love you forever lol.
Reply With Quote
  #176  
Old 06-27-2008, 10:55 PM
sweede's Avatar
sweede sweede is offline
 
Join Date: Jan 2007
Posts: 391
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by comicus View Post
dang you sweede! that's such a tease lol. looking forward to seeing what you've come up with.

if you come up with an easy way for us to specifiy which stats show up, i'd love you forever lol.

Thats been the problem for a long time.

See attachment (armorylite.com is so awesome)
Reply With Quote
  #177  
Old 06-28-2008, 09:09 PM
tuaguild's Avatar
tuaguild tuaguild is offline
 
Join Date: Dec 2007
Location: Memphis TN
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LMAO DUDE YOU USED MY TOON TO TEST THATS FREAKIN SWEET LOL. I personally cannot wait for this mod to be compleated because i may include it in The PB-WoW Skin if you would allow that
Reply With Quote
  #178  
Old 07-14-2008, 12:52 AM
tuaguild's Avatar
tuaguild tuaguild is offline
 
Join Date: Dec 2007
Location: Memphis TN
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any status on the new mod i am really excited to see it
Reply With Quote
  #179  
Old 07-23-2008, 08:06 PM
Junaper's Avatar
Junaper Junaper is offline
 
Join Date: Oct 2006
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

almost all name works on our guild site ecpt server:Alleria Name:Onux for that one i get

Fatal Error: Cannot use string offset as a array
functions_wowcharcode.php on line 429

btw: i LOVE this addon!! <3

http://sojaded.org/wbb/showthread.php?t=870 is the link to the url that has the broken name.. but we require people to log on to see the forums.. >.<
Reply With Quote
  #180  
Old 07-23-2008, 08:18 PM
sweede's Avatar
sweede sweede is offline
 
Join Date: Jan 2007
Posts: 391
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm.. your character listed there has no professions..

give the guy 50c and tell him to pick up enchanting or something...

anyways.. a proper fix would be to change the GetProfession function at line 418 to
Code:
    function GetProfession()
    {
        if (isset($this->profession) )
        { 
            if ( !is_array($this->profession[0]) )
            {
                $tmpArr[] = $this->profession;
                $this->profession = $tmpArr;
            }
    
        	foreach($this->profession as $profs)
        	{
                $profs['value'] = $profs['value'][0];
        		$prof_url = $this->get_image_location($this->icons_url . "professions/" . $profs['key'] . "-sm.gif");
                 $profs['name'] = $this->wowchar_phrase($profs['name'], "prof");
        		eval('$out .= "' . fetch_template('WoWChar_profession_data') . '";');
        	}
    
            return $out;
        } else {
            return false;
        }
        
    }
Reply With Quote
  #181  
Old 07-23-2008, 08:54 PM
Junaper's Avatar
Junaper Junaper is offline
 
Join Date: Oct 2006
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sweede View Post
hmm.. your character listed there has no professions..

give the guy 50c and tell him to pick up enchanting or something...

anyways.. a proper fix would be to change the GetProfession function at line 418 to
Code:
    function GetProfession()
    {
        if (isset($this->profession) )
        { 
            if ( !is_array($this->profession[0]) )
            {
                $tmpArr[] = $this->profession;
                $this->profession = $tmpArr;
            }
    
        	foreach($this->profession as $profs)
        	{
                $profs['value'] = $profs['value'][0];
        		$prof_url = $this->get_image_location($this->icons_url . "professions/" . $profs['key'] . "-sm.gif");
                 $profs['name'] = $this->wowchar_phrase($profs['name'], "prof");
        		eval('$out .= "' . fetch_template('WoWChar_profession_data') . '";');
        	}
    
            return $out;
        } else {
            return false;
        }
        
    }
well, i dont get the error on 429 anymore.. but i get one on 431.. but im a noob at code so maybe i did it wrong.. maybe i should wait for the upgrade.. hehe

on a side note.. i dont know if this can be done.. but can the pop up be "smart" so that if the link is at the bottom of the page that it can pop up instead of down were you cant see it? thought i would throw it out there for a update sometime..

thanks for such a quick reply! again <3 your mods
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 06:20 PM.


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.06664 seconds
  • Memory Usage 2,339KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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_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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete