41
wanikoo
Re: All xoops headline mods DO NOT WORK with PHP5
  • 2005/3/16 14:25

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Umm...
I succeed^^;;
If you want to use xoopsheadline on PHP5,
you have to fix some bug and change some code^^;;

(1)First, this change is necessary!!
---target file: /xoopsheadline/class/headline.php---
From:
get_class($headline) != 'xoopsheadlineheadline'
To:
strtolower(get_class($headline)) != 'xoopsheadlineheadline'

because In PHP5, get_class($headline) returns XoopsheadlineHeadline !

And
---target files: /xoopsheadline/admin/index.php , /xoopsheadline/index.php---
Change like this^^;;

$HTTP_GET_VARS to $_GET
$HTTP_POST_VARS to $_POST

(2)Some bug fixes needed^^;;
---------------------
/xoopsheadline/admin/index.php
From:
$hlman =& xoops_getmodulehandler('headline');;
To: ( I mean not ;; just ; )
$hlman =& xoops_getmodulehandler('headline');
--------------------
And
/xoopsheadline/class/headlinerenderer.php

From:(Yeah^^This bug is one of real culprits !!!!!!!)
class XoopsHeadlineRenderer
{
// holds reference to xoopsheadline class object
var $_hl;

var $_tpl;

// XoopTemplate object
var $_tpl;

To:
class XoopsHeadlineRenderer
{
// holds reference to xoopsheadline class object
var $_hl;

var $_tpl;

// XoopTemplate object
//var $_tpl;
I mean not two $_tpl just one $_tpl !!!!!!!!!!!!!!

Umm...
I confirmed it works well on PHP5 after this change.
(3) this change is also necessary!!
/html/class/xml/saxparser.php
From:
function free()
{
xml_parser_free($this->parser);

unset($this);
$this = null;
}
To:
function free()
{
xml_parser_free($this->parser);

unset($this);
//$this = null;
}
I mean //$this = null;

And
this is optional....
but...I recommend that you use snoopy instead of fopen^^;;



42
wanikoo
Re: XOOPS PM(Private Message)-Hack
  • 2005/3/15 17:51

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Upgraded to Ver4.6!!

Umm...
another upgrade --;;--;;(sorry!--;;)

Basically, this upgrade(4.5->4.6) is for PHP5 compatibility.
so....no new function added!! Just..some functions refined and replaced!!

(If you don't use PHP5 and have already customized Ver4.5 for your system and even are tired of too many upgrades,
you don't have to do this upgrade(4.5->4.6)...Just use Ver4.5...It's OK!!)

<Change>
------Ver4.6-------(2005/3/16)
Basically, this upgrade(4.5->4.6) is for PHP5 compatibility.
>>Some codes rewritten for PHP5 compatibility!!
Yeah^^
Now...It works well on PHP5 !!!
>>Code Refinement!
Deprecated functions replaced with recommended functions!!
(ex: all makeTxxxxxx(), oopsxxxxxx() replaced with recommended functions!)
And some other codes refined and retuned!!
>>Tiny bugs fixed!!(viewpmsg.php, backuppmsg.php, usersearch.php)
(Just tiny bugs^^;; )
>>etc
French language file added!!(thanks,Hisoka!)
----------------------------

How to upgrade 4.5->4.6

1, No change on PM DB^^No touch^^
2, No change on language file(pmsg.txt) and no new file added!!
3, Overwrite All files into proper directories!!
[Exception] pmhackconfig.php
- If you customized this file for your system, you must not overwrite pmhackconfig.php[/html/pmhackconfig.php and /html/cache/pmhackconfig.php])
4, That'a all! Enjoy this new PM system4.6!!
PS:
Basically, this upgrade(4.5->4.6) is for PHP5 compatibility.
so....no new function added!! Just..some functions refined!!

-----------------------------
How to install[new install]

1, Open this file(/html/wanipmhack.sql) and execute the sql query on the file^^
( Use phpmyadmin...if you are DB-novice!!Please, watch out table prefix[xoops_])
2, Copy/Overwrite All files into proper directories!!
(You must back-up original files...before this hack!!!!)
[Notice]
- We need /html/modules/newbb/fpdf/ for PM PDF function.(using fpdf of newbb2.0)
but you don't have to install newbb2.0...because it needs just "~/fpdf" ...not all newbb system.
So...
(1)If you have already installed newbb2.0, you don't have to copy it(/html/modules/newbb/fpdf/).
(2)If you're using newbb1.0, Just add ~/fpdf to newbb1.0..(I mean,just copy it)
(3)If you don't have/use newbb, Just make the directory,"/html/modules/newbb/". and Copy it!!
3, Open this file(/html/language/{yourlanguage}/pmsg.txt[and pmsg_upgrade3x-46.txt if it exists])
Add the contents of pmsg.txt to pmsg.php.
4, Open this file(/html/footer.txt)
Add the wanipmhack section(I mean ////////////////WANIPMHACK3.0) of footer.txt to footer.php.
5, That's all!! Enjoy this new PM system!!
PS:
#Download WYSIWYG editors here(Project: WYSIWYG editors for XOOPS)
http://dev.xoops.org/modules/xfmod/project/showfiles.php?group_id=1155
--------------------------------
How to uninstall

1, Replace all changed files with your original files.
(html/viewpmsg.php,readpmsg.php,pmlite.php,footer.php)
(html/kernel/privmessage.php)
(html/language/{yourlanguage}/pmsg.php)
2, Delete all new files.
(html/ configpmsg.php, printpmsg.php, backuppmsg.php, pmgrouplite.php, usersearch.php, userkeysearch.php, pmhackconfig.php, overlib_mini.js, pdfpmsg.php, read2pmsg.php)
(html/cache/ pmhackconfig.php)
(html/include/ pm_functions.php)
(html/kernel/ privmessageconfig.php, pmuserkey.php)
(html/images/ inbox.gif, readbox.gif, rsavebox.gif, rtrashbox.gif, outbox.gif, sentbox.gif, psavebox.gif, ptrashbox.gif, pmhelp.png, xoopspm_slogo.png)
(html/images/icons/ backuppm.gif, forwardpm.gif, gforwardpm.gif, printpm.gif, pmuserkey.gif, pmcheck.gif, pdfpm.gif, pmadvanceview.gif)
(html/images/pmsubject/icon1.gif, pm_normal_u.gif, pm_normal.gif, pm_normal_e.gif, pm_re_u.gif, pm_re.gif, pm_re_e.gif, pm_fw_u.gif, pm_fw.gif, pm_fw_e.gif, pm_gpm_u.gif, pm_gpm.gif, pm_gfw_u.gif, pm_gfw.gif)
3, Open this file(/html/wanipmhack_uninstall.sql) and execute the sql query on the file^^
( Use phpmyadmin...if you are DB-novice!!Please, watch out table prefix[xoops_])
4, That's all!! Very simple^^;;

Demo:

http://kjw0815.codns.com/wanisys/japanese/xoops/html/modules/news/

Downloads: (All PHP4/PHP5 Compatible and OK!!!!)
------------------------------------------------
-Stable Version => Ver2.85(default)
http://www.wanisys.net/data/wanipmhack.zip
-DB-toolkit for DB-novice(only for Ver2.85!!New install/uninstall)
http://www.wanisys.net/data/wanipmhack_dbtoolkit285.zip
----------------------------------------------------
-Test Version => Ver4.6(+pmconfig+GroupPM+etc)
http://www.wanisys.net/data/wanipmhack46.zip
-DB-toolkit for DB-novice(only for New install/uninstall)
http://www.wanisys.net/data/wanipmhack_dbtoolkit46.zip
---------------------------------------------------

2005/3/16

From wani[wani@wanisys.net]

the most educational site, wanisys.net [http://www.wanisys.net ]



43
wanikoo
Re: XOOPS PM(Private Message)-Hack
  • 2005/3/12 13:37

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Umm...
Until now,
I've never tested this PM-Hack on PHP5 environment!
but....
I guess this PM-Hack may not work properly on PHP5
because we need to change some codes for PHP5.

this modification below is necessary for PHP5
------------------------------
/html/kernel/pmuserkey.php
From:
get_class($pmuserkey) != 'xoopspmuserkey'
To:
strtolower(get_class($pmuserkey)) != 'xoopspmuserkey'
---------------------------
/html/kernel/privmessage.php
From:
get_class($pm) != 'xoopsprivmessage'
To:
strtolower(get_class($pm)) != 'xoopsprivmessage'
---------------------------
/html/kernel/privmessageconfig.php
From:
get_class($pmconfig) != 'xoopsprivmessageconfig'
To:
strtolower(get_class($pmconfig)) != 'xoopsprivmessageconfig'

Umm..
In PHP5, get_class($pm) returns XoopsPrivmessage not xoopsprivmessage !!...
so we need to use strtolower function.

Read this page!
http://kr2.php.net/manual/en/migration5.incompatible.php

Umm.....
I think this change above may make this PM-hack work properly on PHP5...
but...
still I am not sure and wonder if it works well on PHP5.
(To my regret....I've never installed PHP5. )

Anyway...
I will make this PM-hack work well on PHP5... in the next version!!



44
wanikoo
Re: All xoops headline mods DO NOT WORK with PHP5
  • 2005/3/11 18:22

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


How about this change^^;;

I've never installed PHP5...but..I think this change is necessary!!

(target file: /xoopsheadline/class/headline.php)
From:
get_class($headline) != 'xoopsheadlineheadline'
To:
strtolower(get_class($headline)) != 'xoopsheadlineheadline'

because In PHP5, get_class($headline) returns XoopsheadlineHeadline !

Read this page!
http://kr2.php.net/manual/en/migration5.incompatible.php



45
wanikoo
Re: PHP5 vs xhld, xmline, headlines
  • 2005/3/11 18:10

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


How about this change^^;;

I've never installed PHP5...but..I think this change is necessary!!

(target file: /xoopsheadline/class/headline.php)
From:
get_class($headline) != 'xoopsheadlineheadline'
To:
strtolower(get_class($headline)) != 'xoopsheadlineheadline'

because In PHP5, get_class($headline) returns XoopsheadlineHeadline !

Read this page!
http://kr2.php.net/manual/en/migration5.incompatible.php



46
wanikoo
Re: XOOPS PM(Private Message)-Hack
  • 2005/3/11 13:32

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Quote:

irmtfan wrote:
hi agian wanikoo to you and your pm hack system :)

Hi, irmtfan! Welcome again!!
Quote:

i have some problems in help function:
- help function icon (pmhelp.png) doesnt show in FireFox
- help function font is very bad for us how can i change it(is there a style for that?)

Q:- help function icon (pmhelp.png) doesnt show in FireFox
Umm... I've checked and confirmed it shows properly.
??????
-----------
Q:- help function font is very bad for us how can i change it(is there a style for that?)

Umm..
So difficult--;;
lots of themes....and lots of browsers!!
Anyway..
Generally,
you can customize the width of Help-Popup by changing some code like this!!
From:
echo "<DIV id='overDiv' style='Z-INDEX: 10000; VISIBILITY: hidden; POSITION: absolute'></DIV>\n";
To:
echo "<DIV id='overDiv' style='Z-INDEX: 10000; VISIBILITY: hidden; POSITION: absolute; width: 250px;'></DIV>\n";
##Target files including that code!!##
----------------------------
Ver4.1,Ver4.2, Ver4.5
/html/configpmsg.php
/html/include/pm_functions.php
--------------------------
Ver4.0
/html/configpmsg.php
/html/readpmsg.php
/html/viewpmsg.php

And also can customize other attributes of Help-Popup such as font, color etc by editing overlib_mini.js.
please visit the author's site below and read the manual of this script.
(You can get also the latest version of this script here.
Just download and rename it^^[ overlibmws.js => overlib_mini.js ] )
------------
overlibmws DHTML Popup Library
http://www.macridesweb.com/oltest/
(maintained by Foteos Macrides at Macrides Web Services)

And
For Firefox...........
Umm...
Please refer to francis's post!
and..this pages!!
http://smarty.php.net/manual/en/language.function.popup.init.php
http://smarty.php.net/manual/en/language.function.popup.php

Quote:

francis wrote:
No need for such apologies! How could you know if everything is fine on your test environment?
Enough of this. Now for something completely different!

I forgot to say this to you.
"Very thanks for you help!!!!!"
Quote:

The smarty-plugin function.popup_init.php needs to be changed. As it is now in Firefox the popup has a width nearly as wide as the screen-width which does not look so nice.

Also thanks for your helpful advice!!



47
wanikoo
Re: XOOPS PM(Private Message)-Hack
  • 2005/3/10 15:58

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


I fixed my big mistake!!!!!!
(You can now download Ver4.5!!)
Very sorry for my stupid mistake!!
Anyway...
If you use the old versions(Ver4.0, 4.1,4.2) of this PM-Hack,
You must fix my stupid mistake like this!!
--------------------------
From:
XOOPS_ROOT_PATH."/overlib_mini.js
To:
XOOPS_URL."/overlib_mini.js
----------------------------

##Target files including that code!!##
----------------------------
Ver4.1,Ver4.2, Ver4.5(now fixed)
/html/configpmsg.php
/html/include/pm_functions.php
--------------------------
Ver4.0
/html/configpmsg.php
/html/readpmsg.php
/html/viewpmsg.php

Very sorry for my mistake again!!
--;;



48
wanikoo
Re: XOOPS PM(Private Message)-Hack
  • 2005/3/10 15:15

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Quote:

francis wrote:
Just one quick reply. In a few files you are embedding overlib_mini.js. The path to that file should not be XOOPS_ROOT_PATH, but XOOPS_URL. Otherwise it may happen, that overlib_mini.js is not included correctly.

Oh!!!!My god!!!!!!!!!!!!!!!!!!!!
I couldn't notice that!!!!!
(it works on my test server. so~~~~~~~)
Very sorry!!!!!!!!!!!!!!!!!!!!!!!!!!!
Don't download it yet!!!!
I will fix it now!!!!!!!!!!!!



49
wanikoo
Re: XOOPS PM(Private Message)-Hack
  • 2005/3/10 14:34

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Quite a long time....No upgrade^^;;
(As I mentioned before, I had been a little busy in my new project.)

Anyway...
Now~~~
Upgraded to Ver4.5 !!!

<Change>
------Ver4.5-------(2005/3/10)
>>Preview Mode added(pmlite.php,pmgrouplite.php)
Now,you can preview your PM before sending it!
You will have PREVIEW button in case of writing your PM with TextareaForm not with WysiwygForm because WysiwygForm has its own preview mode.
>>Function of setting time-interval against consecutive-send.(pmlite.php, configpmsg.php)
Admin can set time-interval against consecutive-send
#How To Set#
Access the menu,"Set PM System Policy(Admin Only)" [configpmsg.php?op=editpmsystempolicy]
and set the option, "Set time-interval of consecutive-send"
(ex: 0 means no limit, 10 mean 10 seconds , And Admin is exceptional!)
>>Function of selecting form types allowed to PM-users.
Yeah...Wysiwyg Form^^.. I borrowed some codes of newbb2.0.x.
In this stage, you can use Spaw Editor,HTMLArea,Koivi Editor(not confirmed but..also FCK Editor,TinyMCE Editor)
( (if you've not installed them yet)First of all, you have to download and install them. but Don't worry! Very simple!! Just download them and copy them under /html/class.
#Download here(Project: WYSIWYG editors for XOOPS)
http://dev.xoops.org/modules/xfmod/project/showfiles.php?group_id=1155
#How To set form types allowed to PM-users#
Access the menu,"Set PM System Policy(Admin Only)" [configpmsg.php?op=editpmsystempolicy]
and set the option, "Select form types allowed to PM-users"
(Yeah...multi-select!! Default:Compact and DHTML)
>>Advanced Viewmode(HTML View etc) (for PMs written with Wysiwyg Form) added ( read2pmsg.php)
Basically this PM-system continue to disable HTML in viewing PMs.
but... instead..it now provides Advance View button(VIEW+) which leads user to a popup window for advanced view.
Now these View Modes available!!
define("_PM_VIEWMODE1","Wysiwyg View Mode(HTML+Smiley+Xcode)");
define("_PM_VIEWMODE2","Show View Mode1(NO HTML+Smiley+Xcode+Image+br)");
define("_PM_VIEWMODE3","Show View Mode2(HTML+Smiley+Xcode+Image+br)");
define("_PM_VIEWMODE4","Edit View Mode");
define("_PM_VIEWMODE5","Preview View Mode1(NO HTML+Smiley+Xcode+Image+br)");
define("_PM_VIEWMODE6","Preview View Mode2(HTML+Smiley+Xcode+Image+br)");
define("_PM_VIEWMODE7","FormPreview View Mode");
>>Some improvement in Design..etc.
All popup widows resized!!
If signature of PM is empty, "download to check" button for signature will not appear any more.
----------------------------------

How to upgrade 4.2->4.5
1, No change on PM DB^^No touch^^
2, Open this file(/html/language/{yourlanguage}/pmsg.txt[or pmsg_upgrade3x-45.txt])
Add the upgraded contents( under//WANISYS.NET PM HACK4.5) of pmsg.txt to pmsg.php.
3, Overwrite All files into proper directories!!
[Exception] pmhackconfig.php
- If you customized this file for your system, you must not overwrite pmhackconfig.php[/html/pmhackconfig.php and /html/cache/pmhackconfig.php])
Instead,
Access the menu,"Set PM System Policy(Admin Only)" [configpmsg.php?op=editpmsystempolicy]
And set the options, "Set time-interval of consecutive-send" and "Select form types allowed to PM-users" for your system.(!/html/cache/pmhackconfig.php must be writable!!)
And copy modified /html/cache/pmhackconfig.php to the directory[/html] like this [/html/pmhackconfig.php]
4, That'a all! Enjoy this new PM system4.5!!
PS:
#Download WYSIWYG editors here(Project: WYSIWYG editors for XOOPS)
http://dev.xoops.org/modules/xfmod/project/showfiles.php?group_id=1155

----------------------------
How to install[new install]

1, Open this file(/html/wanipmhack.sql) and execute the sql query on the file^^
( Use phpmyadmin...if you are DB-novice!!Please, watch out table prefix[xoops_])
2, Copy/Overwrite All files into proper directories!!
(You must back-up original files...before this hack!!!!)
[Notice]
- We need /html/modules/newbb/fpdf/ for PM PDF function.(using fpdf of newbb2.0)
but you don't have to install newbb2.0...because it needs just "~/fpdf" ...not all newbb system.
So...
(1)If you have already installed newbb2.0, you don't have to copy it(/html/modules/newbb/fpdf/).
(2)If you're using newbb1.0, Just add ~/fpdf to newbb1.0..(I mean,just copy it)
(3)If you don't have/use newbb, Just make the directory,"/html/modules/newbb/". and Copy it!!
3, Open this file(/html/language/{yourlanguage}/pmsg.txt[and pmsg_upgrade3x-45.txt if it exists])
Add the contents of pmsg.txt to pmsg.php.
4, Open this file(/html/footer.txt)
Add the wanipmhack section(I mean ////////////////WANIPMHACK3.0) of footer.txt to footer.php.
5, That's all!! Enjoy this new PM system!!
PS:
#Download WYSIWYG editors here(Project: WYSIWYG editors for XOOPS)
http://dev.xoops.org/modules/xfmod/project/showfiles.php?group_id=1155
----------------------------
How to uninstall

1, Replace all changed files with your original files.
(html/viewpmsg.php,readpmsg.php,pmlite.php,footer.php)
(html/kernel/privmessage.php)
(html/language/{yourlanguage}/pmsg.php)
2, Delete all new files.
(html/ configpmsg.php, printpmsg.php, backuppmsg.php, pmgrouplite.php, usersearch.php, userkeysearch.php, pmhackconfig.php, overlib_mini.js, pdfpmsg.php, read2pmsg.php)
(html/cache/ pmhackconfig.php)
(html/include/ pm_functions.php)
(html/kernel/ privmessageconfig.php, pmuserkey.php)
(html/images/ inbox.gif, readbox.gif, rsavebox.gif, rtrashbox.gif, outbox.gif, sentbox.gif, psavebox.gif, ptrashbox.gif, pmhelp.png, xoopspm_slogo.png)
(html/images/icons/ backuppm.gif, forwardpm.gif, gforwardpm.gif, printpm.gif, pmuserkey.gif, pmcheck.gif, pdfpm.gif, pmadvanceview.gif)
(html/images/pmsubject/icon1.gif, pm_normal_u.gif, pm_normal.gif, pm_normal_e.gif, pm_re_u.gif, pm_re.gif, pm_re_e.gif, pm_fw_u.gif, pm_fw.gif, pm_fw_e.gif, pm_gpm_u.gif, pm_gpm.gif, pm_gfw_u.gif, pm_gfw.gif)
3, Open this file(/html/wanipmhack_uninstall.sql) and execute the sql query on the file^^
( Use phpmyadmin...if you are DB-novice!!Please, watch out table prefix[xoops_])
4, That's all!! Very simple^^;;

---------------------------
Demo:

http://kjw0815.codns.com/wanisys/japanese/xoops/html/modules/news/

Downloads:
-Stable Version => Ver2.85(default)
http://www.wanisys.net/data/wanipmhack.zip
-Test Version => Ver4.5(+pmconfig+GroupPM+etc)
http://www.wanisys.net/data/wanipmhack45.zip
-DB-toolkit for DB-novice(only for New install/uninstall)
http://www.wanisys.net/data/wanipmhack_dbtoolkit45.zip

2005/3/10

From wani[wani@wanisys.net]

the most educational site, wanisys.net [http://www.wanisys.net ]



50
wanikoo
Re: some weird code in newbb/post.php
  • 2005/3/9 14:50

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Quote:

Mithrandir wrote:
// prevent hacking of nohtml value
if (!empty($HTTP_POST_VARS['nohtml']) && $forumdata['allow_html']) {
    
$forumpost->setNohtml(0);
} else {
    
$forumpost->setNohtml(1);
}

setNohtml(0) = HTML allowed
netNohtml(1) = HTML blocked

To put the process in grammar:
"If the POST var is checked and HTML is allowed in the forum, the module shall not block HTML"

Umm...
I'v searched this patch..and found this page!
https://sourceforge.jp/projects/exmodules/document/Extra_xoops2.0.9-newbb-patch-1.00_-_Notes/
minahito who had submitted this patch corrected it like this!

// patching
if (empty($HTTP_POST_VARS['nohtml']) && $forumdata['allow_html']) {
$forumpost->setNohtml(0);
} else {
$forumpost->setNohtml(1);
}

I mean not !empty but just empty !!




TopTop
« 1 2 3 4 (5) 6 7 8 ... 12 »



Login

Who's Online

233 user(s) are online (160 user(s) are browsing Support Forums)


Members: 0


Guests: 233


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits