Getting WF-Links worked on Xoops Cube Legacy
TRANG CHỦ | TIN TỨC | DIỄN ĐÀN | BÀI VIẾT | DOWNLOADS | HỎI ĐÁP | TRỢ GIÚP flagflag
Tra từ điển
Menu chính
Tư liệu - Tiện ích
Đăng nhập
Bí danh:

Mật khẩu:



Lost Password?

Register now!
Thanks to
TOP  >  Xoops  >  Getting WF-Links worked on Xoops Cube Legacy
The most sophisticated links module for xoops wflinks, has been released thanks to John N / McDonald. The latest stable version is 1.05 on 20 May 2008. This module is developed for ImpressCMS and Xoops, it does not work on Xoops Cube Legacy (XCL) without modifying some lines of code.

In this tutorial I will show you how to get wflinks 1.05 final worked on Xoops Cube Legacy 2.1.x.

1. First download wflinks 1.05 final from the author's website

2. Unzip the package to get a the following directories:
wflinks_105final
|-- modules
|   `-- wflinks
`-- uploads
    `-- images

We are going to modify wflinks_105final/modules/wflinks, let's it wflinks for short.

3. Delete unwanted files

wflinks implements GIJOE's myblocksadmin to deal with its blocks and permissions instead of using xoops core functions. With XCL especially GIJOE's Altsys installed we don't need the blockadmin functions anymore. Delete the following 5 files:

- wflinks/admin/admin.php
- wflinks/admin/myblocksadmin.php
- wflinks/admin/myblockform.php
- wflinks/include/blocksadmin.inc.php
- wflinks/include/updateblock.inc.php

4. Modify some files

4.1 Change lines 25, 26 in file wflinks/admin/menu.php

Before:
$adminmenu[8]['title'] = _MI_WFL_BLOCKADMIN;
$adminmenu[8]['link']="admin/myblocksadmin.php";

After:
//$adminmenu[8]['title'] = _MI_WFL_BLOCKADMIN;
//$adminmenu[8]['link']="admin/myblocksadmin.php";

4.2 Modify the wflTextSanitizer() function in wflinks/class/myts_extended.php. This is the most important point.

Before:
    function wflTextSanitizer() {
    }

After:
    function wflTextSanitizer() {
        parent::MyTextSanitizer();
    }

4.3 Modify the wflinks/include/functions.php

Change lines 502, 503
Before:
<a href='../../system/admin.php?fct=modulesadmin&op=update&module=" . $xoopsModule -> getVar( 'dirname' ) . "'>" . _AM_WFL_BUPDATE . "</a> | \n
<a href='../../system/admin.php?fct=preferences&op=showmod&mod=" . $xoopsModule -> getVar( 'mid' ) . "'>" . _AM_WFL_PREFS . "</a> | \n

After:
<a href='../../legacy/admin/index.php?action=ModuleUpdate&dirname=" . $xoopsModule -> getVar( 'dirname' ) . "'>" . _AM_WFL_BUPDATE . "</a> | \n
<a href='../../legacy/admin/index.php?action=PreferenceEdit&confmod_id=" . $xoopsModule -> getVar('mid') . "'>" . _AM_WFL_PREFS . "</a> | \n

Delete line 506 to hide the link to the myblocksadmin.php that has just been deleted.

Change line 522

Before:
_AM_WFL_MCOMMENTS => "../../system/admin.php?module=" . $xoopsModule -> getVar( 'mid' ) . "&status=0&limit=100&fct=comments&selsubmit=Go",

After:
_AM_WFL_MCOMMENTS => "../../legacy/admin/index.php?action=CommentList&com_modid=" . $xoopsModule -> getVar('mid') . "&com_status=0",

4.4 Change line 7 in wflinks/include/onupdate.inc.php

Before:
if( $ref == '' || strpos( $ref , XOOPS_URL.'/modules/system/admin.php' ) === 0 ) {

After:
if( $ref == '' || strpos( $ref , XOOPS_MODULE_URL . '/legacy/admin/index.php' ) === 0 ) {

4.5 Change line 48 in wflinks/templates/wflinks_index.html

Before:
<{include file="db:system_notification_select.html"}>

After:
<{include file="db:legacy_notification_select.html"}>

4.6 Change wflinks/templates/wflinks_singlelink.html

Line 131, 133, 135, 139

Before:
<!-- start comments loop -->
<{if $comment_mode == "flat"}> 
	<{include file="db:system_comments_flat.html"}> 
<{elseif $comment_mode == "thread"}> 
	<{include file="db:system_comments_thread.html"}> 
<{elseif $comment_mode == "nest"}> 
	<{include file="db:system_comments_nest.html"}> 
<{/if}> 
<!-- end comments loop --> 

<{include file="db:system_notification_select.html"}>

After:
<!-- start comments loop -->
<{if $comment_mode == "flat"}> 
	<{include file="db:legacy_comments_flat.html"}> 
<{elseif $comment_mode == "thread"}> 
	<{include file="db:legacy_comments_thread.html"}> 
<{elseif $comment_mode == "nest"}> 
	<{include file="db:legacy_comments_nest.html"}> 
<{/if}> 
<!-- end comments loop --> 

<{include file="db:legacy_notification_select.html"}>

4.7 Change line 92 in wflinks/templates/wflinks_viewcat.html

Before:
<{include file="db:system_notification_select.html"}>

After:
<{include file="db:legacy_notification_select.html"}>

5. Install

Upload the folder 'wflinks' to the folder 'modules' on your server.
Upload the folder 'images' to the folder 'uploads' on your server and check that the folder including sub-folders are CHMOD 777.

Go to the admin panel, choose Legacy System --> Module Installation and install WF-Links as any other Xoops module.

6. Import from mylinks/weblinks

Open XOOPS_URL/modules/wflinks/update.php and follow the instructions to import data from mylinks or weblinks modules. Please be careful because mylinks/weblinks will not work nor being uninstallable after the importation.

7. Final
- Delete modules/wflinks/update directory and modules/wflinks/update.php file from your server

- If you don't have time doing all of the above changes yourself, you can use mine from the XOOPS section of nhatban.net

- Comments/Suggestions are welcomed.
Tell a friend
Votes:3 Average:10.00
Prev
How to use Videobox in Xoops Cube Legacy
top of the category
Xoops
Next
Hướng dẫn chuyển từ Xoops/ImpressCMS sang XCL

Danh sách lời bình

Thảo luận mới
Giải trí - Cười
Copyright © 2005-2008 Nhatban.net. All Rights Reserved.