forums.eqdkp.com: Itemstats + Dragonfly CMS - forums.eqdkp.com

Jump to content

  • (2 Pages) +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Itemstats + Dragonfly CMS Rate Topic: -----

#1 Guest_Athan_*

  • Group: Guests

Posted 24 February 2006 - 04:51 AM

This is for Dragonfly CMS 9.0.3.0 specifically (a much hacked around local version).

The tricky bit is that Dragonfly's implementation of phpBB has a very different directory structure to normal. The bits you need to change are in includes/nbbcode.php, yet most of it lives in modules/Forums, and it doesn't use the normal templates (i.e. ignore the subSilver directory), it uses the Dragonfly themes instead.

I'll give all paths relative to the Dragonfly root directory.

First thing, unpack ItemStats inside {dragonfly_root}/modules/Forums

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

------------------
FIND
------------------
global $smilies_path, $bbbttns_path, $BASEHREF, $CPG_SESS, $bb_codes, $smilies_close;

------------------
ADD-AFTER
------------------
require('/FULL/PATH/TO/DRAGONFLY/modules/Forums/itemstats/phpbb_itemstats.php');

------------------
FIND
------------------
$replacements[] = '<div style="text-align:\\1">\\2</div>';[/code]

------------------
ADD-AFTER
------------------
// ItemStats
// Parse text for ItemStats mod
$text = itemstats_parse($text);[/code]
------------------
SAVE AND CLOSE
------------------
{dragonfly_root}/includes/nbbcode.php

That will make it parse the
[item]...[/item]
links. Note you need the FULL path in that require(), I couldn't find a clean way to do a relative path due to this being in {dragonfly_root}/includes/ instead of {dragonfly_root}/modules/Forums/, although my site has very restrictive openbase_dir settings.

Now, for each theme that you support on your site you need to make a symlink (a copy would do, but that's more to keep up to date, so use a symlink):

{dragonfly_root}/themes/{theme_name}/itemstats -> ../../modules/Forums/itemstats

i.e.
cd ~/www/dragonfly/themes/redblack
ln -s ../../modules/Forums/itemstats


Then for each of those theme directories:

------------------
------------------
OPEN
------------------
------------------
{dragonfly_root}/themes/{theme_name}/template/header.html

------------------
FIND
------------------
<link rel="stylesheet" type="text/css" href="{THEME_PATH}/style/{CSS_FILE}.css" />

------------------
ADD-AFTER
------------------
<link rel="stylesheet" href="{THEME_PATH}/itemstats/templates/itemstats.css" type="text/css"><script type="text/javascript" src="{THEME_PATH}/itemstats/overlib/overlib.js"><!-- overLIB © Erik Bosrup --></script>

------------------
SAVE AND CLOSE
------------------
{dragonfly_root}/themes/{theme_name}/template/header.html

#2 Guest_InterSlayer_*

  • Group: Guests

Posted 01 March 2006 - 03:05 AM

Hey =) Thanks so much for figuring out how to add this to dragonfly. I made the changes and it looks pretty hot! I also went and added it to the bbcode button options.

In /dragonfly/includes/nbbcode.php:

Look for:
<img alt="underline" title="[u]underline[/u]" class="bbcbutton" onmouseover="helpline(\''.$form.'\',\''.$field.'\',\'u\')" onclick="BBCcode(\''.$form.'\',\''.$field.'\',this)" name="u" src="'.$bbbttns_path.'u.gif" border="0" />



Paste this in under it:

<img alt="Item Stats" title="[item]Item Name[/item]" class="bbcbutton" onmouseover="helpline(\''.$form.'\',\''.$field.'\',\'itemstats\')" onclick="BBCcode(\''.$form.'\',\''.$field.'\',this)" name="item" src="'.$bbbttns_path.'sword.gif" border="0" />


*You might want to add some spacing between the buttons using nbsp.


In /dragonfly/includes/javascript/bbcode.js

Look for:
flash_help="Insert flash file: [flash width=# height=#]flash URL[/flash]";


Paste this under it:
itemstats_help="Link an Item: [item]Item Name[/item]";


You'll also have to find some kind of an icon 20x20 in size, and name it sword.gif, then put it in /dragonfly/images/bbcode

#3 Guest_robojerk_*

  • Group: Guests

Posted 01 March 2006 - 11:11 AM

Can you guys provide a link to your sites? I want to see if it works on the news page and othe modules.

#4 Guest_InterSlayer_*

  • Group: Guests

Posted 01 March 2006 - 01:24 PM

View Postrobojerk, on Mar 1 2006, 02:11 PM, said:

Can you guys provide a link to your sites? I want to see if it works on the news page and othe modules.


http://www.sock-puppets.com

#5 Guest_robojerk_*

  • Group: Guests

Posted 02 March 2006 - 02:05 PM

Not working for me..

http://test.blacktem...s.org/index.php is blank
http://test.blacktem...php?name=Forums loads a page but the topics wont load.

********************************************
  Copyright © 2004 - 2005 by CPG-Nuke Dev Team
  http://www.dragonflycms.com

  Dragonfly is released under the terms and conditions
  of the GNU GPL version 2 or any later version

  $Source: /cvs/html/includes/nbbcode.php,v $
  $Revision: 9.18 $
  $Author: djmaze $
  $Date: 2005/06/22 01:34:13 $
**********************************************/
if (!defined('CPG_NUKE')) { exit; }

global $smilies_path, $bbbttns_path, $BASEHREF, $CPG_SESS, $bb_codes, $smilies_close;
require('modules/Forums/itemstats/phpbb_itemstats.php');

$smilies_path = file_exists("themes/$CPG_SESS[theme]/images/smiles/icon_smile.gif") ? "themes/$CPG_SESS[theme]/images/smiles/" : 'images/smiles/';
$bbbttns_path = file_exists("themes/$CPG_SESS[theme]/images/bbcode/b.gif") ? "themes/$CPG_SESS[theme]/images/bbcode/" : 'images/bbcode/';


#6 Guest_InterSlayer_*

  • Group: Guests

Posted 02 March 2006 - 09:05 PM

Looks fine to me =p

#7 Guest_robojerk_*

  • Group: Guests

Posted 03 March 2006 - 08:56 AM

I commented the line out, was adding a few more things ot the site, I wont touch it today..

Issue is with this line..
replacements[] = '<div style="text-align:\\1">\\2</div>';
		// ItemStats
		// Parse text for ItemStats mod
		 $text = itemstats_parse($text);

		// [url]xxxx://www.cpgnuke.com[/url]


#8 Guest_InterSlayer_*

  • Group: Guests

Posted 03 March 2006 - 09:53 AM

Just covering all the bases here, and not implying anything or otherwise, but make sure in the PHP code the "[/code]" isn't included, that was suppose to be part of the forum post, not the actual php code.

Also for the:
require('/FULL/PATH/TO/DRAGONFLY/modules/Forums/itemstats/phpbb_itemstats.php');

line, make sure you do have the full path, sometimes thats a bit tricky to find. Usually if you get a PHP error (not sure why your blank front page doesn't have one), it'll spit out the full path for you and you can go from there.

If all else fails its a bit macabre, but you could just stick the contents of /itemstats/ into the /includes/ folder, and just put:
require('phpbb_itemstats.php');

I originally did that, then found the fullpath afterwards and fixed it.

Good luck!

#9 Guest_robojerk_*

  • Group: Guests

Posted 03 March 2006 - 11:23 AM

View PostInterSlayer, on Mar 3 2006, 09:53 AM, said:

If all else fails its a bit macabre, but you could just stick the contents of /itemstats/ into the /includes/ folder, and just put:
require('phpbb_itemstats.php');



Tried that... No success =(

#10 Guest_Ronster_*

  • Group: Guests

Posted 19 March 2006 - 04:17 PM

Okay I´m quite new to this can someone please explain how you make a symlink??

#11 Guest_Magistus_*

  • Group: Guests

Posted 22 May 2006 - 12:54 PM

Alright, installed but have a small problem.

The item links on my site are just that, item links. For whatever reason there is no mouse-over text and the item link isnt colored properly. Any help would be much appreciated!!

Example:

http://finalunion.co...pic&p=2579#2579

#12 Guest_Amorek_*

  • Group: Guests

Posted 02 July 2006 - 02:13 PM

im also trying to use item stats on a draongfly cpg cms forum but when i tried i got a black page... anyone out there able to help me out or does anyone have the modded files to be used?

#13 Guest_wakaru_*

  • Group: Guests

Posted 02 July 2006 - 07:33 PM

in my NBBCODE.PHP file i cannot find
$replacements[] = '<div style="text-align:\\1">\\2</div>';


closest thing i found was

//		$replacements[] = '<ol type="\\1">\\2</ol>';


i'm using Version 9.0.6.1 of dragonfly

#14 Guest_Amorek_*

  • Group: Guests

Posted 03 July 2006 - 01:11 PM

i installed everything followed all instructions but now im just getting links

for example when i do a

[item]item name[/item]

i get

[Item Name]

just a link to the actual item on allakhazam.

any ideas?

imguesing the problem may be in here:

<link rel="stylesheet" href="{THEME_PATH}/itemstats/templates/itemstats.css"

type="text/css"><script type="text/javascript" src="{THEME_PATH}/itemstats/overlib/overlib.js"><!-- overLIB © Erik Bosrup --></script>

i copudlntfigure out the correct paht to the theme which would be:

forums/themes/Azul-Carbon

but that did not work

so im stuck ..any input would be greatly appriciated

#15 Guest_wakaru_*

  • Group: Guests

Posted 05 July 2006 - 12:28 PM

hmm here's the error i get when i try to view any post now.


"Fatal error: Call to undefined function: itemstats_parse() in /html/includes/nbbcode.php on line 443"
this line is
$text = itemstats_parse($text);


i added the nessesary stuff so i'm not sure what's up now.
here's my code in the nbbcode.php

global $smilies_path, $bbbttns_path, $BASEHREF, $CPG_SESS, $bb_codes, $smilies_close;
require('http://www.avente.org/modules/Forums/itemstats/phpbb_itemstats.php');

and
// align
		$patterns[] = '#\[align=(left|right|center|justify)\](.*?)\[/align\]#si';
		$replacements[] = '<div style="text-align:\\1">\\2</div>';
		// ItemStats
		// Parse text for ItemStats mod
		$text = itemstats_parse($text);




also. what is this symlink thing. seems like no one is getting any support in here for questions. Or they are getting support and not reporting the solution

  • (2 Pages) +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users