ItemStatsDF [v2.0beta]

This mod will allow any part of DragonFly that uses bbcode to be able to use ItemStats
No longer maintained

ItemStatsDF [v2.0beta]

Postby zanix » Sun Nov 05, 2006 2:05 pm

Itemstats Module for DragonFly CMS
Version 2.0beta (ItemStats Core v1.5.5)


Forum Post on eqDKP -> http://forums.eqdkp.com/index.php?showtopic=7808

Table of Contents
  1. Introduction
  2. Change Log
  3. FAQ
  4. Known Bugs
  5. Installation
    • All Packs File Edits
    • Module-Only Additional Instructions
    • Module-Only Additional Instructions for ForumsPro 2.0.1.0
  6. Activation[/list:o]

    1) Introduction
    First of all, credits to this post > Itemstats + Dragonfly CMS
    Which inspired me to write this guide

    And of course, props to the makers of ItemStats

      DragonFly versions covered in this guide:
    • 9.1.2.1
    • Compatible with 9.1.1.0, but DO NOT use the pre-edited header.html files

    This mod will allow any part of DragonFly that uses bbcode to be able to use ItemStats

    Item:
    Item Icon: [itemico]Head of Onyxia[/itemico]

    This package is installed like a module in DragonFly, so all the ItemStats bbcode can be deactivated when the ItemStats module is deactivated

    You can also go to index.php?name=item_stats (item_stats.html for LEO) and view the item cache and clean it as well
    (You can set this module as "Administrators Only" access, the item links will still work if you do so)
    You can view the item_stats module pages here on WoWRoster.net - [url=item_stats.html]http://www.wowroster.net/item_stats.html[/url]

    ForumsPro, starting with version 2.0.1.0, has starting using their own bbcode file includes/fpbbcode.php.
    There are additional files and instructions for this version when it is released.


    PLEASE!!!!!!!!!!PLEASE!!!!!!!!!!PLEASE!!!!!!!!!!PLEASE
    BACK UP YOUR DATABASE AND ALL OF YOUR FILES.
    I AM NOT RESPONSIBLE FOR ANY LOSS OF DATA OR ANY DAMAGED FILES.


    2) Change Log
    ~ Fixed
    + Added
    ! Changed

    June 06, 2007 - v2.0beta
    ~ Updated the itemstats core to latest release 1.5.5.1000
    ~ Socket images fix -> http://forums.eqdkp.com/index.php?showtopic=8754
    ~ When 'integration_mode' is set to "script" mode, itemstats does not honor the setting of 'automatic_search'
    ~ Custom cache now works correctly
    + Admin control for most of the itemstats options
    + Support for DF 9.1.2.1
    + Support for ForumsPro 2.0.1.0
    ! Removed support for DF 9.0.6.1
    It might still work, but instructions will not be given

    Nov 13, 2006 - v1.2
    ~ This time, I'm sure the path to updateitem now points to the right location
    I didn't add the module name to the getlink() function

    Nov 12, 2006 - v1.1
    ~ config.php include error with DragonFly v9.0.6.1
    ~ Path to updateitem now points to the right location

    Nov 05, 2006 - v1
    Initial Release



    3) FAQ
    None at this time


    4) Known Bugs
    Languages other than English are problematic, I cannot trace down what cases other languages to fail


    5) Installation
    >[url=Downloads/details/id=72.html]Download files[/url]<
    (For the pre-edited packs, you will still need to edit header.html for themes other than cpgnuke/default and dragonfly)
    itemstatsDF_20b_full.zip - Pre-edited Pack for DragonFly v9.1.2.1
    itemstatsDF_20b_module_only.zip - Pre-edited Pack for DragonFly v9.1.2.1 and ForumsPro v2.0.1.0
    itemstatsDF_20b_module_only.zip - Module-Only Pack (Do your own edits)

    itemstats_bbcode.zip - bbCode images and psd (Adobe Photoshop)

    Warning and notice: If you use any mod that edits the bbcode in DragonFly, you MUST use the module only pack and make the file edit manually!

    Download and extract the contents of the html folder from the zip package to to the DragonFly root directory
    Make sure you overwrite files when you upload to your web server
    The following files will be overwritten

    Files in Pre-edited Pack wrote:(For themes other than default and dragonfly, you still need to edit additional files)
    • includes/nbbcode.php
    • language/english/bbcode.php
    • language/english/admin/item_stats.php
    • modules/item_stats/*.*
    • themes/default/templates/header.html
    • themes/default/images/{bbcode_images}
    • themes/dragonfly/templates/header.html
    • themes/dragonfly/images/{bbcode_images}


    Files in Pre-Edited + ForumsPro 2.0.1.0 Pack wrote:(For themes other than default and dragonfly, you still need to edit additional files)
    • includes/nbbcode.php
    • includes/fpbbcode.php
    • language/english/bbcode.php
    • language/english/fpbbcode.php
    • language/english/admin/item_stats.php
    • modules/item_stats/*.*
    • themes/default/templates/header.html
    • themes/default/images/{bbcode_images}
    • themes/dragonfly/templates/header.html
    • themes/dragonfly/images/{bbcode_images}


    Files in Module-Only Pack wrote:
    • language/english/admin/item_stats.php
    • modules/item_stats/*.*


    The Module-Only pack requires edits to the following files:
    • includes/nbbcode.php
    • language/{YOUR_LANG}/bbcode.php (optional bbcode buttons)
    • Note: To get the bbcode button images for the Module-Only pack, download the 'itemstats_bbcode.zip' file
      • Place these images in every theme's image directory

    The Module-Only pack also needs the following edits if you have ForumsPro 2.0.1.0:
    • includes/fpbbcode.php
    • language/{YOUR_LANG}/fpbbcode.php (optional bbcode buttons)


    All packs require you to edit every theme's header.html file for every theme you will be using.


    5a) All Packs File Edits
    Requires edits to 1 file
    • {df_root}/themes/{THEME_NAME}/templates/header.html
    • Note: You MUST edit every theme's header.html file that you want to use

    ------------------
    OPEN
    For every theme you want ItemStatsDF to work with
    ------------------
    {df_root}/themes/{THEME_NAME}/templates/header.html


    ------------------
    FIND
    Note: This is not exact for every theme, but it's similar
    ------------------
    Code: Select all
    <link rel="stylesheet" type="text/css" href="{THEME_PATH}/style/style.css" />



    ------------------
    ADD-AFTER
    ------------------
    Code: Select all
    <link rel="stylesheet" href="modules/item_stats/templates/itemstats.css" type="text/css" />
    <script type="text/javascript" src="modules/item_stats/overlib/overlib.js"><!-- overLIB © Erik Bosrup --></script>



    ------------------
    SAVE AND CLOSE
    ------------------
    {df_root}/themes/{THEME_NAME}/templates/header.html


    ------------------
    COPY
    For themes other than default and dragonfly

    Note: To get the bbcode button images for the Module-Only pack, download the 'itemstats_bbcode.zip' file
    * Place these images in every theme's image/ directory

    ------------------
    {df_root}/themes/default/images/item.gif
    {df_root}/themes/default/images/item1.gif
    {df_root}/themes/default/images/itemico.gif
    {df_root}/themes/default/images/itemico1.gif


    ------------------
    PASTE
    ------------------
    {df_root}/themes/{THEME_NAME}/images/item.gif
    {df_root}/themes/{THEME_NAME}/images/item1.gif
    {df_root}/themes/{THEME_NAME}/images/itemico.gif
    {df_root}/themes/{THEME_NAME}/images/itemico1.gif



    If you are doing the Module-Only installation, continue below


    5b) Module-Only Additional Instructions
    Requires edits to 1 file (2 if adding the optional bbcode buttons)
    • {df_root}/includes/nbbcode.php
    • {df_root}/language/{YOURLANG}/bbcode.php

    ------------------
    OPEN
    ------------------
    {df_root}/includes/nbbcode.php


    ------------------
    FIND
    ------------------
    Code: Select all
            $text preg_replace($patterns$replacements$text); 



    ------------------
    ADD-BEFORE
    ------------------
    Code: Select all
            # [item] and [itemico] - Parse text for ItemStats mod
            
    if( is_active('item_stats') )
            {
                require_once(
    BASEDIR 'modules/item_stats/df_itemstats.php');
                
    $text itemstats_parse($text);
            }
     



    ------------------
    ! OPTIONAL BBCODE BUTTONS
    ------------------
    The following is to place additional bbcode buttons for ItemStats

    ------------------
    FIND
    ------------------
    Code: Select all
        flash_help="'. $bbcode_common['flash'][0].' '.$bbcode_common['flash'][1].'";</script>



    ------------------
    REPLACE
    ------------------
    Code: Select all
        flash_help="'. $bbcode_common['flash'][0].' '.$bbcode_common['flash'][1].'";
        
    item_help "'. $bbcode_common['item'][0].' '.$bbcode_common['item'][1].'";
        
    itemico_help "'. $bbcode_common['itemico'][0].' '.$bbcode_common['itemico'][1].'";</script>



    ------------------
    FIND
    ------------------
    Code: Select all
            <img alt="'.$bbcode_common['mail'][0].'" class="bbcbutton" onmouseover="helpline(\''.$form.'\',\''.$field.'\',\'mail\')" onclick="BBCwmi(\''.$form.'\',\''.$field.'\',\'email\')" name="email" src="'.$bbbttns_path.'email.gif" border="0" />; 



    ------------------
    ADD-AFTER
    ------------------
    Code: Select all
       if( is_active('item_stats') )
       {
          $content .= '
          <img alt="'.$bbcode_common['item'][0].'" class="bbcbutton" onmouseover="helpline(\''.$form.'\',\''.$field.'\',\'item\')" onclick="BBCcode(\''.$form.'\',\''.$field.'\',this)" name="item" src="'.$bbbttns_path.'item.gif" border="0" />
          <img alt="'.$bbcode_common['itemico'][0].'" class="bbcbutton" style="border:0;" onmouseover="helpline(\''.$form.'\',\''.$field.'\',\'itemico\')" onclick="BBCcode(\''.$form.'\',\''.$field.'\',this)" name="itemico" src="'.$bbbttns_path.'itemico.gif" border="0" />';
       }



    ------------------
    SAVE AND CLOSE
    ------------------
    {df_root}/includes/nbbcode.php


    ------------------
    OPEN
    ------------------
    {df_root}/language/{YOURLANG}/bbcode.php


    ------------------
    FIND
    ------------------
    Code: Select all
        'marqr'     => array('Marque text to right:','[marq=right]text[/marq]'), 



    ------------------
    ADD-AFTER
    ------------------
    Code: Select all
        'item'      => array('Item:','[item]item[/item]'),
        
    'itemico'   => array('Item Icon:','[itemico]item[/itemico]'), 



    ------------------
    SAVE AND CLOSE
    ------------------
    {df_root}/language/{YOURLANG}/bbcode.php


    5c) Module-Only Additional Instructions for ForumsPro 2.0.1.0
    Requires edits to 1 file (2 if adding the optional bbcode buttons)
    • {df_root}/includes/fpbbcode.php
    • {df_root}/language/{YOURLANG}/fpbbcode.php

------------------
OPEN
------------------
{df_root}/includes/fpbbcode.php


------------------
FIND
------------------
Code: Select all
        $text preg_replace($patterns$replacements$text); 



------------------
ADD-BEFORE
------------------
Code: Select all
        # [item] and [itemico] - Parse text for ItemStats mod
        
if( is_active('item_stats') )
        {
            require_once(
BASEDIR 'modules/item_stats/df_itemstats.php');
            
$text itemstats_parse($text);
        }
 



------------------
! OPTIONAL BBCODE BUTTONS
------------------
The following is to place additional bbcode buttons for ItemStats

------------------
FIND
------------------
Code: Select all
    flash_help="'. $bbcode_common['flash'][0].' '.$bbcode_common['flash'][1].'";</script>';



------------------
REPLACE
------------------
Code: Select all
    flash_help="'. $bbcode_common['flash'][0].' '.$bbcode_common['flash'][1].'";
    
item_help "'. $bbcode_common['item'][0].' '.$bbcode_common['item'][1].'";
    
itemico_help "'. $bbcode_common['itemico'][0].' '.$bbcode_common['itemico'][1].'";</script>';



------------------
FIND
------------------
Code: Select all
        <img alt="'.$bbcode_common['mail'][0].'" class="bbcbutton" onmouseover="forumsprohelpline(\''.$form.'\',\''.$field.'\',\'mail\')" onclick="forumsproBBCwmi(\''.$form.'\',\''.$field.'\',\'email\')" name="email" src="'.$bbbttns_path.'email.gif" border="0" />; 



------------------
ADD-AFTER
------------------
Code: Select all
   // [item] and [itemico] - Icons for ItemStats mod
   if( is_active('item_stats') )
   { $content .= '
      <img alt="Item:" class="bbcbutton" onmouseover="forumsprohelpline(\''.$form.'\',\''.$field.'\',\'item\')" onclick="forumsproBBCode(\''.$form.'\',\''.$field.'\',this)" name="item" src="'.$bbbttns_path.'item.gif" border="0" />
      <img alt="'.$bbcode_common['itemico'][0].'" class="bbcbutton" style="border:0;" onmouseover="forumsprohelpline(\''.$form.'\',\''.$field.'\',\'itemico\')" onclick="forumsproBBCode(\''.$form.'\',\''.$field.'\',this)" name="itemico" src="'.$bbbttns_path.'itemico.gif" border="0" />';
   }



------------------
SAVE AND CLOSE
------------------
{df_root}/includes/fpbbcode.php


------------------
OPEN
------------------
{df_root}/language/{YOURLANG}/fpbbcode.php


------------------
FIND
------------------
Code: Select all
    'strike'    => array('Strike:','[strike]text[/strike]'), 



------------------
ADD-AFTER
------------------
Code: Select all
    'item'      => array('Item:','[item]item[/item]'),
    
'itemico'   => array('Item Icon:','[itemico]item[/itemico]'), 



------------------
SAVE AND CLOSE
------------------
{df_root}/language/{YOURLANG}/fpbbcode.php


6) Activation
[list=1][*]Log-into an admin account with access to the modules area
[*]Go to the modules administration area (admin.php?op=modules)
[*]Install the "item_stats" module
[*]Activate the "item_stats" module
[*]Optional -> Set access to the module as "Administrators Only" if you don't want people to view or clean your item cache[/list:o]




And now you are done

I hope this guide was easy to follow
Last edited by zanix on Tue Aug 07, 2007 8:43 am, edited 15 times in total.
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5541
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

ItemStats 1.5 + DragonFly CMS

Postby mashed » Sun Nov 05, 2006 5:12 pm

Hey zanix,

O pleased some one decided to do this after reading the complete hack over at the eqdkp forums. Thought you might want to know im runninf df 9.0.6.1 with forumspro (1.0.0.3)and it worked perfect apart from the path to the config.php... its looking for the config in the includes folder so you may want to edit that ;) i cheated and copied the config to the includes folder.

Thanks for taking the time to do this and post.

mashed
mashed
WR.net Apprentice
WR.net Apprentice
 
Posts: 24
Joined: Wed Jul 05, 2006 11:02 pm

ItemStats 1.5 + DragonFly CMS

Postby zanix » Sun Nov 05, 2006 5:56 pm

On DF 9.0.6.1, is the config.php file in the root folder?
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5541
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

ItemStats 1.5 + DragonFly CMS

Postby mashed » Sun Nov 05, 2006 6:01 pm

yea
mashed
WR.net Apprentice
WR.net Apprentice
 
Posts: 24
Joined: Wed Jul 05, 2006 11:02 pm

ItemStats 1.5 + DragonFly CMS

Postby zanix » Sun Nov 05, 2006 6:04 pm

Ok, I know I can help this

Open modules/item_stats/df_itemstats.php
Find
Code: Select all
    include(CORE_PATH.'config.php'); 

Replace with
Code: Select all
    if( file_exists(CORE_PATH.'config.php') )
        include(
CORE_PATH.'config.php');
    elseif( 
file_exists(BASEDIR.'config.php') )
        include(
BASEDIR.'config.php'); 
Last edited by zanix on Mon Nov 13, 2006 7:35 am, edited 3 times in total.
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5541
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

ItemStats 1.5 + DragonFly CMS

Postby mashed » Sun Nov 05, 2006 10:36 pm

with that edit it still seems to be looking in the wrong place for the config, the error message is

modules/item_stats/itemstats.php

* Warning line 16: main(/home/abbs2002/public_html/modules/item_stats/config.php) [function.main]: failed to open stream: No such file or directory
* Warning line 16: main() [function.include]: Failed opening '/home/abbs2002/public_html/modules/item_stats/config.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php')

modules/item_stats/includes/itemcache.php

* Warning line 3: main(/home/abbs2002/public_html/modules/item_stats/includes/../config.php) [function.main]: failed to open stream: No such file or directory
* Warning line 3: main() [function.include]: Failed opening '/home/abbs2002/public_html/modules/item_stats/includes/../config.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php')

modules/News/index.php

* Warning line 145: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'dbhost' (1)

but like i say as a temp quick fix i have just copied the config to the item_stats folder
Last edited by mashed on Sun Nov 05, 2006 10:38 pm, edited 2 times in total.
mashed
WR.net Apprentice
WR.net Apprentice
 
Posts: 24
Joined: Wed Jul 05, 2006 11:02 pm

ItemStats 1.5 + DragonFly CMS

Postby zanix » Mon Nov 06, 2006 4:05 am

Hmmm, I guess I need to look at this closer
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5541
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

ItemStats 1.5 + DragonFly CMS

Postby robojerk » Tue Nov 07, 2006 3:29 am

I'd rather use a different DB than the one my DF installation is on.
Image
For the Horde!
Image
User avatar
robojerk
WR.net Master
WR.net Master
 
Posts: 484
Joined: Wed Jul 05, 2006 12:17 am
Location: -The OmniMatrix- Web 3.0

Re: ItemStats 1.5 + DragonFly CMS

Postby Anaxent » Tue Nov 07, 2006 4:40 am

robojerk wrote:I'd rather use a different DB than the one my DF installation is on.


the fact that this is a DF module it will only work with the DF database. Zanix has put this module together to keep us from needing to create symlinks to all your themes folders. So with all that in mind you can still install itemstats for Df but would not be able to use this module, but here is a link to the how to

Non Module Itemstats Install
User avatar
Anaxent
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 642
Joined: Tue Jul 04, 2006 6:27 am
Location: Phoenix, Az

ItemStats 1.5 + DragonFly CMS

Postby Sharkims » Tue Nov 07, 2006 6:24 am

Alright, I think I have a fairly simple and straight forward question.
I would like the icon to be about 15x15, and to default show to the left of the text when using... item. Just like it does in eqdkp.
Possible?
Last edited by Sharkims on Tue Nov 07, 2006 6:51 am, edited 1 time in total.
Image
Image
User avatar
Sharkims
WR.net Apprentice
WR.net Apprentice
 
Posts: 8
Joined: Tue Jul 04, 2006 1:37 pm
Location: Ner'zhul-US

ItemStats 1.5 + DragonFly CMS

Postby zanix » Tue Nov 07, 2006 8:30 am

Sharkims wrote:Alright, I think I have a fairly simple and straight forward question.
I would like the icon to be about 15x15, and to default show to the left of the text when using... item. Just like it does in eqdkp.
Possible?

I don't know, I just made this into a DF module.
You would have to ask the folks who make itemstats

And as for using a different database, you can
This modules doesn't use DF's db layer because I can't quite seems to figure out itemstats' db layer

Just edit modules/item_stats/config.php with any new db variables
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5541
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

ItemStats 1.5 + DragonFly CMS

Postby zanix » Thu Nov 09, 2006 12:59 pm

Hey mashed, is there any way I can get ftp and admin access to your DragonFly installation so I can troubleshoot?
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5541
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

ItemStats 1.5 + DragonFly CMS

Postby Deeo » Fri Nov 10, 2006 12:10 am

Hi Zanix,

im using dragonfly 9.0.6.1 and i downloaded the correct version, then i installed it as admin and activated it. but theres nothing to see, in my threads theres noch BBCode using and i see this sql-errors at the top of the content:


Code: Select all
string(31) "Unable to connect to SQL host: " string(31) "Unable to connect to SQL host: " string(31) "Unable to connect to SQL host: " string(31) "Unable to connect to SQL host: " string(31) "Unable to connect to SQL host: " string(31) "Unable to connect to SQL host: "


any ideas?
Deeo
WR.net Journeyman
WR.net Journeyman
 
Posts: 80
Joined: Mon Jul 10, 2006 2:02 pm

ItemStats 1.5 + DragonFly CMS

Postby mashed » Fri Nov 10, 2006 12:32 am

Sent you a pm zanix, any probs let me know
mashed
WR.net Apprentice
WR.net Apprentice
 
Posts: 24
Joined: Wed Jul 05, 2006 11:02 pm

Re: ItemStats 1.5 + DragonFly CMS

Postby robojerk » Fri Nov 10, 2006 6:03 am

Deeo wrote:Hi Zanix,

im using dragonfly 9.0.6.1 and i downloaded the correct version, then i installed it as admin and activated it. but theres nothing to see, in my threads theres noch BBCode using and i see this sql-errors at the top of the content:


Code: Select all
string(31) "Unable to connect to SQL host: " string(31) "Unable to connect to SQL host: " string(31) "Unable to connect to SQL host: " string(31) "Unable to connect to SQL host: " string(31) "Unable to connect to SQL host: " string(31) "Unable to connect to SQL host: "


any ideas?


I was getting that same error then I modified my itemstats/config.php file to point directly to my database....
Last edited by robojerk on Fri Nov 10, 2006 6:05 am, edited 1 time in total.
Image
For the Horde!
Image
User avatar
robojerk
WR.net Master
WR.net Master
 
Posts: 484
Joined: Wed Jul 05, 2006 12:17 am
Location: -The OmniMatrix- Web 3.0

Next

Return to ItemStatsDF

Who is online

Users browsing this forum: No registered users and 0 guests

cron