FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » World of Warcraft - ItemStats  () 1 Vote
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
icon5.gif  World of Warcraft - ItemStats [message #30724] Fri, 10 March 2006 17:10 Go to next message
Exelthor is currently offline  Exelthor   Norway
Messages: 1
Registered: March 2006
Karma: 0
Junior Member
Hi!

Recently installed FUD, and want to include ItemStats. Any idea how to do this, or if it is a "patch" somewhere?
I would like to keep using FUD, and not reinstall another forum like phpBB.. Crying or Very Sad

PLS PLS help! Very Happy

-Ex


Come again?!?
Re: World of Warcraft - ItemStats [message #30809 is a reply to message #30724] Wed, 15 March 2006 02:30 Go to previous messageGo to next message
melink is currently offline  melink   Germany
Messages: 6
Registered: January 2006
Karma: 0
Junior Member
I also looked this feature last night (server down :[), I have tried "Replacement & Censorship System" and find it is not possible, since the replacement is done before FUDcode replacement, Javacript is not allowed in FUDcode post and I believe using PHP also not possible. Therefore it is not possible to obtain the item stat from server or client side.

The only possible way, as far as I can see, is to make a customed FUDcode but I can't find any fancy interface to do this. I may do a hack on this later, but don't expect fast, feel free to discuss with me.

[Updated on: Wed, 15 March 2006 02:31]

Report message to a moderator

Re: World of Warcraft - ItemStats [message #31065 is a reply to message #30724] Thu, 30 March 2006 06:19 Go to previous messageGo to next message
stoph is currently offline  stoph   Germany
Messages: 7
Registered: February 2006
Karma: 0
Junior Member
I'd be also interested in this feature.
I looked into a wordpress plugin wp_itemstats.
Did someone already look into the fud-source
what has to be changed there?
Re: World of Warcraft - ItemStats [message #31226 is a reply to message #31065] Mon, 10 April 2006 16:21 Go to previous messageGo to next message
puCK2001 is currently offline  puCK2001   Italy
Messages: 3
Registered: April 2006
Karma: 0
Junior Member
Me too.
It could be really a good hack, really useful and popular.

Don't think I'm able to manage that, but i'll be really happy if a coder do.

BTW many thanks you all Smile
puCK
Re: World of Warcraft - ItemStats [message #31488 is a reply to message #30724] Sat, 29 April 2006 17:44 Go to previous messageGo to next message
stoph is currently offline  stoph   Germany
Messages: 7
Registered: February 2006
Karma: 0
Junior Member
I already looked into the code.

Can anyone give me a hit, where i find the code
which does the output für a single message?
Re: World of Warcraft - ItemStats [message #31504 is a reply to message #31488] Tue, 02 May 2006 00:12 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The template is called drawmsg.tmpl and the code is inside drawmsg.inc.t file.

FUDforum Core Developer
Re: World of Warcraft - ItemStats [message #36727 is a reply to message #31504] Mon, 02 April 2007 22:13 Go to previous messageGo to next message
angryowl   United States
Messages: 7
Registered: October 2006
Karma: 0
Junior Member
Ok, so I just recently worked out an ItemStats hack for FUDForum after pining for one for years.

It does require modifying some source files in your FUDforum/src/... directory, so if you want to do this, make sure you back everything up first.

First:

Install the itemstats directory at the root of your forums directory (the one inside your www root, not the FUDforum directory located elsewhere.)

Then, make some modifications to the FUDforum source code, and to a few of its templates:

Here's the modification list:

/fudforum/src:

+++ root_index.php.t

Include the generic_itemstats.php header so it's available when the page is generated.

/*{POST_HTML_PHP}*/

>>>     include_once('./itemstats/generic_itemstats.php');

        fud_use('err.inc');

+++ post_proc.inc.t

Catch the [item] and [itemico] tags and allow them to pass-through unchanged.

    switch ($tag) {
                        case 'quote title':
                                $tag = 'quote';
                                break;
                        case 'list type':
                                $tag = 'list';
                                break;
                        case 'hr':
                                $str{$pos} = '<';
                                $str{$pos+1} = 'h';
                                $str{$pos+2} = 'r';
                                $str{$epos} = '>';
                                continue 2;
>>>                     case 'item':
>>>                     case 'itemico':
>>>                        $pos = strpos($str, "]", $epos+1) + 1;
>>>                        $epos = $pos;
>>>                        continue;


+++ fileio.inc.t

Add a new function that allows itemstats to parse the message body before returning it to the draw code.

>>> function itemstats_read_msg_body($off, $len, $id)
>>> {
>>>         $msg = read_msg_body($off, $len, $id);
>>> 
>>>         $msg = itemstats_parse($msg);
>>> 
>>>         return $msg;
>>> }


Now, using the Admin Control Panel, go to the Template Management section and enter the Template editor.

First, edit:

'header.tmpl' choose the "header" message from the list.

Insert the following into the header.tmpl template at the bottom of the <head> section (right before the </head>:

<link rel="stylesheet" href="itemstats/templates/itemstats.css" type="text/css"\>
<script type="text/javascript" src="itemstats/overlib/overlib.js"><!-- overLIB (c) Erik Bosrup --></script>


This will make sure that itemstats has access to its css info and javascript functions.

Now edit:

'drawmsg.tmpl' choose the dmsg_normal_msg_body message from the list (towards the bottom)

Where it says:

{FUNC: read_msg_body($obj->foff, $obj->length, $obj->file_id)}


Change it to call the new itemstats-enabled version:

{FUNC: itemstats_read_msg_body($obj->foff, $obj->length, $obj->file_id)}


And you're done. Make sure to rebuild your theme using the Theme
Manager first.


Re: World of Warcraft - ItemStats [message #36728 is a reply to message #31504] Mon, 02 April 2007 23:42 Go to previous message
angryowl   United States
Messages: 7
Registered: October 2006
Karma: 0
Junior Member
I posted a hack that lets you use itemstats with fudforum, but it got removed. Why?

Update: Weird, it didn't show up for me until I posted THIS message. Bizarre.

[Updated on: Mon, 02 April 2007 23:42]

Report message to a moderator

  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Edit time limit affects "edit" permission [ oops nevermind ]
Next Topic: EXIF from Fileattachements
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 14:53:15 GMT 2024

Total time taken to generate the page: 0.02707 seconds