vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Miscellaneous Hacks - WoW Character BBCode (https://vborg.vbsupport.ru/showthread.php?t=169389)

sweede 06-24-2008 04:40 PM

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.

Tolas 06-26-2008 02:53 PM

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 :(

sweede 06-27-2008 07:07 PM

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.

comicus 06-27-2008 07:52 PM

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.

sweede 06-27-2008 10:55 PM

Quote:

Originally Posted by comicus (Post 1560633)
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)

tuaguild 06-28-2008 09:09 PM

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

tuaguild 07-14-2008 12:52 AM

any status on the new mod i am really excited to see it

Junaper 07-23-2008 08:06 PM

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.. >.<

sweede 07-23-2008 08:18 PM

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;
        }
       
    }


Junaper 07-23-2008 08:54 PM

Quote:

Originally Posted by sweede (Post 1582535)
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


All times are GMT. The time now is 08:30 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
  • Page Generation 0.01444 seconds
  • Memory Usage 1,763KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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