1
Shine
New module: Auth(e) (?)
  • 2004/12/23 10:45

  • Shine

  • Just can't stay away

  • Posts: 822

  • Since: 2002/7/22


I came accross a module called Auth(e) what has to be some kind of page/phpscript wrapper.
Unfortunately the explanation is only in japanese (as is the developer) which I cannot read let alone understand.
Is there somebody who can translate it into english. I think this module could come in handy for other users.
See: http://r286.com/xoops/modules/mydownloads/viewcat.php?cid=4
The enclosed readme.txt is also in japanese......

Grtz., Shine

2
IMLost
Re: New module: Auth(e) (?)
  • 2004/12/24 0:55

  • IMLost

  • Just popping in

  • Posts: 42

  • Since: 2004/12/4


You can try to translate the readme here.

3
noisia
Re: New module: Auth
  • 2005/1/5 6:55

  • noisia

  • Not too shy to talk

  • Posts: 123

  • Since: 2004/8/24


Hi Shine,

I've come accross the auth module and have started translating the readme.txt. (see below)

Auth allows you to insert html (or php or cgi) files into the XOOPS environment, without the need to wrap them. Simply place the complete site folder into the auth watch folder and it will be wrapped.

The below text is the beginning of the translation. Sorry my Japanese is not that good, but this is what I understood so far
Quote:

XOOPS2 - Auth Module 1.13
-----------------------------------------------------
----------------------------------------- Presented by ADMIN @ ROUTE286, 2004.
* What is Auth module? -------------------------------------------------------

There are already HTML file wrapping modules for Xoops, like
TinyContent or iContent.
The problem with these modules, is that it is quite troublesome
to put the content in the XOOPS menu and additionally it requires
quite a lot of editing of the original html files.

There is most likely a need to have a XOOPS module that can easily
put html contents under separate XOOPS menus, so this is why I have
developed the "Auth module"

Additionally the Auth module will allow .php and .CGI files to be included instantly into Xoops, without the need to do any modifications. There are probably people that have some knowledge about using .php or .cgi, but would not be able to create a complete module.

All you need to do is put the .html, .php, .cgi and even image files into the designated "Auth module" folder and they will be automatically wrapped with the XOOPS header and footer and display properly in xoops.

The root folder for the files can be placed in:
XOOPS/module/auth/index.php/index.html

There are some settings in auth that allows the user to hide certain files:
( none : will allow hiding of files
Otherwise Auth will be able to display all files and sub files in the directory within xoops.

* Installation and use method ------------------------------------------------------
You can change the folder name "auth" to any folder name you like.

It is recommended that the html files are linked to each other and have links to their images with the root relative path (not folder relative path).

If you change the folder name, you will need to change the "xoops_version.php"
// ● モジュール名 (Module Name)
// メインメニューに表示される名称です。
// This is the name which is indicated in the main menu
$modversion['name'] = 'Auth モジュール';

// ● 保管先ディレクトリ (Module directory name)
// ディレクトリ auth から別の名前にした場合は変更して下さい。
// auth directory, modify if you want to change the module name:
$modversion['dirname'] = "auth";

// ● サブメニュー (Sub menu)
// サブメニューを追加したい場合は以下の記載を追加します。
// the sub menu, statement below is added.
// $modversion['sub'][1]['name'] = "メニュー名(menu name)";
// $modversion['sub'][1]['url'] = 'index.php/ファイル名(filename)';
// 言語別にメニュー名を分けたい場合は
// When you like to divide menu name classified by language
// $modversion['sub'][1]['name'] = _AT_MENU_1;
// $modversion['sub'][1]['url'] = 'index.php/ファイル名(filename)';
// とし、language/(言語)/main.php に以下を追加します。
// define ( "_AT_MENU_1" , "メニュー名");

また、config.php も設定して下さい。
Additionally you have to change the "config.php"

// ● 認証ディレクトリ(フォルダ)
// このディレクトリ下に置かれたファイルは
// XOOPS の認証を経由して参照できます。
//  ディレクトリ名のみの場合は
//  auth ディレクトリの下に置かれたディレクトリです。
//  このソースを知っている人から直接参照されるのを逃れるため、
//  必ず sample から変更して下さい。
// • Watch directory (folder)
// The files that are placed in this directory
// will be wrapped into the XOOPS environment。
//  These are all the directories placed in the auth folder。
//  It is recommended to start working with the "sample"
// folder that is already provided here。

$auth_dir = "sample";

// 直接指定も可能です。
// できれば URL で参照できない場所に置くのがベストです。
// $auth_dir = "/home/user/page";



I'll continue working on the translation and pass it to the developer.

Success ermee

4
Shine
Re: New module: Auth
  • 2005/1/5 9:32

  • Shine

  • Just can't stay away

  • Posts: 822

  • Since: 2002/7/22


@ noisa:

Thanks (according to google: あなたに感謝しなさい and within dutch: dankjewel ) for your translation efforts.
Yes see,.........I thought so this module would come in handy for xoopsusers

Grtz., Shine

5
noisia
Auth Module for wrapping HTML, PHP, CGI web site
  • 2005/1/7 2:48

  • noisia

  • Not too shy to talk

  • Posts: 123

  • Since: 2004/8/24


I have finished the translation of the Auth read me file

Auth can be downloaded from route286 website

Auth is really a very useful module to wrap existing HTML, PHP or CGI content from other web sites directly.

You can just copy the files into the designated auth folder and it will automatically be wrapped within your XOOPS environment.

You can duplicate the auth module easily, so you can have various content under various menu entries.

Below is a translation of the original readme file. My Japanese is not very good and neither is my understanding of XOOPS environment, so the text may be a bit unintelligable at times:

I will forward the translation to the author as well.

[quote]XOOPS2 - Auth Module 1.13
-----------------------------------------------------
Presented by ADMIN @ ROUTE286, 2004.

* What is Auth module?
-------------------------------------------------------

There are already HTML file wrapping modules for Xoops, like
TinyContent or iContent.
The problem with these modules, is that it is quite troublesome
to put the content in the XOOPS menu and additionally it requires
quite a lot of editing of the original html files.

There is most likely a need to have a XOOPS module that can easily
put html contents under separate XOOPS menus, so this is why I have
developed the "Auth module"

Additionally the Auth module will allow .php and .CGI files to be included instantly into Xoops, without the need to do any modifications. There are probably people that have some knowledge about using .php or .cgi, but would not be able to create a complete module.

All you need to do is put the .html, .php, .cgi and even image files into the designated "Auth module" folder and they will be automatically wrapped with the XOOPS header and footer and display properly in xoops.

The root folder for the files can be placed in:
XOOPS/module/auth/index.php/index.html

There are some settings in auth that allows the user to hide certain files:
( none : will allow hiding of files
Otherwise Auth will be able to display all files and sub files in the directory within xoops.

* Installation and use method
------------------------------------------------------
You can change the folder name "auth" to any folder name you like.

It is recommended that the html files are linked to each other and have links to their images with the root relative path (not folder relative path).

If you change the folder name, you will need to change the "xoops_version.php"


// ● モジュール名 (Module Name)
// メインメニューに表示される名称です。
// This is the name which is indicated in the main menu
$modversion['name'] = 'Auth モジュール';

// ● 保管先ディレクトリ (Module directory name)
// ディレクトリ auth から別の名前にした場合は変更して下さい。
// auth directory, modify if you want to change the module name:
$modversion['dirname'] = "auth";

// ● サブメニュー (Sub menu)
// サブメニューを追加したい場合は以下の記載を追加します。
// the sub menu, statement below is added.
// $modversion['sub'][1]['name'] = "メニュー名(menu name)";
// $modversion['sub'][1]['url'] = 'index.php/ファイル名(filename)';
// 言語別にメニュー名を分けたい場合は
// When you like to divide menu name classified by language
// $modversion['sub'][1]['name'] = _AT_MENU_1;
// $modversion['sub'][1]['url'] = 'index.php/ファイル名(filename)';
// とし、language/(言語)/main.php に以下を追加します。
// define ( "_AT_MENU_1" , "メニュー名");

また、config.php も設定して下さい。
Additionally you have to change the "config.php"

// ● 認証ディレクトリ(フォルダ)
// このディレクトリ下に置かれたファイルは
// XOOPS の認証を経由して参照できます。
//  ディレクトリ名のみの場合は
//  auth ディレクトリの下に置かれたディレクトリです。
//  このソースを知っている人から直接参照されるのを逃れるため、
//  必ず sample から変更して下さい。
// • Watch directory (folder)
// The files that are placed in this directory
// will be wrapped into the XOOPS environment.
//  These are all the directories placed in the auth folder.
//  It is recommended to start working with the "sample"
// folder that is already provided here。

$auth_dir = "sample";

// 直接指定も可能です。
// できれば URL で参照できない場所に置くのがベストです。
// It is also possible to insert a direct link.
// If possible it is best to put the URL at a place that can not be referenced (???)
// $auth_dir = "/home/user/page";


// ● 区切り(デリミタ)
// 通常はこのままで構いません。index.php/ファイル名 となります。
// Apache 1.3 以外のサーバで
// PATH_INFO の取得ができない設定にしてある場合は
// "?" に変更して下さい。index.php?ファイル名 となります。
// ● Delimiter
// Usually you do not have to change this parameter。By default it
// is: index.php/
// For users other than: Apache 1.3
// If the “PATH_INFO” can not be acquired automatically
// change it to "?", then “index.php?” will become the filename.

$auth_delimiter = "/";


// ● ページ変更の方法
// 0 = Location を用いる……通常はこのままで構いません。
// 1 = redirect_header を用いる……
// バナー広告が自動追加される環境はこちら。
// ● Method of changing pages
// 0 = Location Usually the setting can be left like this。
// 1 = redirect_header を用いる……
// Use this setting if advertising banners are automatically included in the pages。

$auth_redirect = 0;


// ● 拒否する文字列
// 以下「許可・拒否するユーザ群」の値で
// 以下に記載した文字列を入れた場合、拒否され、参照できません。
// ● Denied character strings
// List below the user groups that have or don’t have access
// The text strings listed below will be denied access and will not be shown

$auth_deny = "/deny/";


// ● ユーザの許可・拒否およびデフォルトファイル名
// "ユーザ名" => "ファイル名・URL または 拒否文字列", です。
//  ユーザ名は /guest でログインしていない状態での制御となります。
//  また、/default で記載されていないユーザの状態となります。
// ファイル名は XOOPS/modules/auth/ のみで入った際に
// 参照されるファイル名です。
// index.html 等であっても省略せずに記載して下さい。
// index.php は使用できません。index.html や default.php 等に
// 変えて下さい。
//  URL も記載できます。その URL へ飛ばす事ができます。
//  http:// https:// 等も省略せずに記載して下さい。
// 「拒否する文字列」に記載された文字列を入れると
// そのユーザは拒否となります。

// ● User Access Rights・Rejection or Default File name
// "Username" => "Filename・URL or Rejection Character String"
//  If the user is not logged in, the access is controlled by /guest
//  then the user will be handled under the /default settings
// The File name will have to start with XOOPS/modules/auth/
// index.html Do not further abbreviate
// index.php Can not be used, so please change it to either
// index.html or default.php
//  URL can also be used, so that the URL will be displayed directly
//  http:// https:// Do not further abbreviate
// The users listed in the「Rejection String」
// will not have access to the files

$auth_user = array (
"/default" => "index.html" );

//$auth_user = array (
// "user123" => "user.html",
// "user234" => "user.html",
// "userurl" => "http://url.com/user.html",
// "/guest" => "/deny/",
// "/default" => "index.html" );


// ● Content-Type に入れる MIME-TYPE
// "拡張子" => "MIME-TYPE", です。
// 記載されていない拡張子を表示する場合は追記して下さい。
// ● Content-Type or MIME-TYPE
// "Extension" => "MIME-TYPE",
// Put in any missing extensions that are not listed yet.

$auth_mimetype = array (
"ai" => "application/postscript" ,
"aif" => "audio/x-aiff" ,

:

"xyz" => "chemical/x-xyz" ,
"zip" => "application/zip" );


After uploading the new settings, you will need to reinstall the Auth module in order to update the settings.

Please see the reference below:
(When the module is installed in the “auth” Folder)

xoops/modules/auth/index.php/filename

For Example if you want to display “index.html” in the “sample” folder
the path will become:
xoops/modules/auth/index.php/index.html


The file does not necessarily have to be an html file. php will also be executed。Picture files will also be displayed.

The .php and .html will be wrapped with XOOPS header and footer.
If you do not want the XOOPS header and footer to be wrapped around a file you can change .php or .html to something else.

For Example .htm or .php4

In case special extensions do not work properly, you will need to add, update, or renew the MIME-TYPE

// ● Content-Type に入れる MIME-TYPE
// "拡張子" => "MIME-TYPE", です。
// 記載されていない拡張子を表示する場合は追記して下さい。
// ● MIME-TYPE input in the Content-Type
// "Extension" => "MIME-TYPE",
// Please add any missing extensions freely

$auth_mimetype = array (
"ai" => "application/postscript" ,
"aif" => "audio/x-aiff" ,

:

"xyz" => "chemical/x-xyz" ,
"zip" => "application/zip" );

If the main menu is clicked, it becomes as follows:

XOOPS/modules/auth/

In this case、the file will be opened that is set according to the user group access rights.

// ● ユーザの許可・拒否およびデフォルトファイル名
// "ユーザ名" => "ファイル名・URL または 拒否文字列", です。
//  ユーザ名は /guest でログインしていない状態での制御となります。
//  また、/default で記載されていないユーザの状態となります。
// ファイル名は XOOPS/modules/auth/ のみで入った際に
// 参照されるファイル名です。
// index.html 等であっても省略せずに記載して下さい。
// index.php は使用できません。index.html や default.php 等に
// 変えて下さい。
//  URL も記載できます。その URL へ飛ばす事ができます。
//  http:// https:// 等も省略せずに記載して下さい。
// 「拒否する文字列」に記載された文字列を入れると
// そのユーザは拒否となります。
// ● User Access Right・Denial or default file name
// "UserName" => "Filename・URL or Rejection String"
//  If the user is not logged in, the access is controlled by /guest
//  then the user will be handled under the /default settings
// The File name will have to start with XOOPS/modules/auth/
// index.html Do not further abbreviate
// index.php Can not be used, so please change it to either
// index.html or default.php
//  URL can also be used, so that the URL will be displayed directly
//  http:// https:// Do not further abbreviate
// The users listed in the「Rejection String」
// will not have access to the files

$auth_user = array (
"user123" => "user.html",
"user234" => "user.html",
"userurl" => "http://url.com/user.html",
"/guest" => "/deny/",
"/default" => "index.html" );

So in the above example、If the user is member of user123 or user234 then:
XOOPS/modules/auth/index.php/user.html

will be displayed.

For members of userurl, the
http://url.com/user.html

For other users:

XOOPS/modules/auth/index.php/index.html

will be displayed. Users that are not logged in will be denied access.
You can also leave out the /guest, in which case it will be handled as /default.
In any case you should list “index.html” without any ommission.

It might be that it does not work on environment other than Apache 1.3
Since the “Auth” module uses Apache specific code.

  In case of Apache 2.0.30 or higher 、the problem can be resolved
by using “AcceptPathInfo”
  For Example: In case of .htaccess you can add the below line and then it will work:

    php_flag AcceptPathInfo On

  If you have direct access to the server、you can edit the
  httpd.conf directly。

  If you do not have direct access to the server, or you are running
on an ISS Server, you can resolve the issue through delimeters:

// ● 区切り(デリミタ)
// 通常はこのままで構いません。index.php/ファイル名 となります。
// Apache 2.0 系で PATH_INFO の取得ができない設定にしてある場合は
// "?" に変更して下さい。index.php?ファイル名 となります。
// ● Delimiter
// Usually you do not have to change this parameter。
// By default it is: index.php/
// For users other than Apache 2.0
// when the “PATH_INFO” can not be acquired automatically
// change it to "?", then “index.php?” will become the filename.


$auth_delimiter = "/";

So if “?” is used, there will be a problem with the links. It is not possible to use relative links (For example <a href="Filename">), so it will have to be called via the index.php file (For example <a href="index.php?Filename"> )

It is the same problem if you create another sub folder nside the watch Folder. So in this case you can not run any php or CGI, so be careful using the above setting


・Practical Usage
---------------------------------------

All files with .html .php .cgi will automatically be wrapped into the XOOPS environment. All referenced files and image files will also be recognised without the need to change the original files.
Files with other extensions than the above will not be wrapped.

With regards to links within the HTML files, the following options are possible:


  <?= $url ?> Auth Module URL(index.php/ or index.php? )
  <?= $files ?> files Directory URL
  index.php access・deny can be controlled by user group

Image files stored in the watch directory will also be recognised, however if the image files are very big, or there are a lot of image files, the load on the processor will be increased and performance will go down, up to the point that the server can not handle it.
For this reason there is the $files directory, from which the files can be directly recognised by calling them as follows:
<?= $files ?>filename
For example if you insert the “image.gif” file into the files directory, it can be linked as follows:
<img src="<?= $files ?>image.gif">

Relative links (for example <a href="filename"> can only be linked when they are within the watch folder or direct subfolder represented with a single "/".

In case “?”, the file path will have to start with “index.php?”. Alternatively <?= $url ?> can be used to fix the path.



Within the .html .htm .php .phpN (N=3〜5) files all php code will be executed.

 Until version 1.02 require_once was used
 From version 1.03 include_once is used

It is possible to use the methods below:

  $url = Auth Module URL(index.php/ or index.php? )
  $files = files directory URL
  $paths = Auth module path(index.php/ or index.php? )
  $users = user name (/guest if the user is not logged in )

For Example by using the $users statement, the content can be made user group specific.

php code within the files can be executed by the Auth module
   * The characterset used in XOOPS has to be the same in the files
   * by putting chdir in the header 、the php path can be adjusted
    otherwise the full path can be used.
   * in case of .php, the headers of http・HTML ・Cookie have to be removed。
   * User name・URL・and mail links, Cookie will have to be adjusted to the XOOPS environment.


In case of .cgi .pl, CGI will be executed using the statement passthru.
(This is why php code will not run properly in safe mode)
It is also possible to run perl CGI scripts within the Auth Module.
It is possible to use the environment variables. Or variables from with the Auth module environment can be used.

  POST_DATA = Use POST Method
  URL_DATA = Auth Module URL(using index.php/・index.php? )
  FILES_DATA = files directory URL
  PATHS_DATA = Auth module path(using index.php/・index.php? )
  USER_DATA = Username(It will be /guest if not logged in)

From version 1.08 the variable environment can be changed through the account information.

  USER_DATA_ADMIN = The admin user name・off limit for other users
  USER_DATA_UID = UserID
  USER_DATA_UNAME = User Name(When user not logged in there will be no data)
  USER_DATA_AVATAR = User Avatar
  USER_DATA_NAME = Real Name
  USER_DATA_URL = Home page URL
  USER_DATA_MAIL = Mail Address(Depending on release setting)
  USER_DATA_EMAIL = Mail Address(Independent of release setting)
  USER_DATA_ICQ = ICQ
  USER_DATA_AIM = AIM
  USER_DATA_YIM = YIM
  USER_DATA_MSNM = MSNM
  USER_DATA_FROM = Residence Information
  USER_DATA_OCC = Occupation
  USER_DATA_INTREST = Interests

Beware of the below:
 When using・POST method, the environment variables will be released in the POST_DATA environment.
  Depending on standard input, the acquisition may not be possible
  File Upload is not supported
  Depending on the environment variables there may be a limit on the character set、so it may be that not all characters can be used.
 ・On servers running Apache, even when using “suexec”, when php is executed by the Apache module, the suexec may not work.
  Beware that the file authority will become the same as the php file.
 ・The user name will be found in the USER_DATA environment variables.
 ・When you want to run CGI in the XOOPS environment, beware of the following:
   * Ensure that the XOOPS character set is the same as the file characterset.
   * Use the chdir in the header to ensure that the CGI execute path is correct, or use relative path from the new location.
   * In case of .cgi, please remove the headers and cookies of http・HTML.
   * Remove environment variables, such as Username・URL・Mail, etc. and Cookie.
   * Ensure that you adjust the POST method environment.

When using the mod_rewrite of Apache, it is possible to use “index.php”.
For Example: In case of using .htaccess
Use the below .htaccess preparations:


 RewriteEngine on
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^(.*)$ index.php/$1 [L,QSA]

When using the “?” delimiter, you will need to change index.php/$1 to
index.php?$1 .
So the links will also become: index.php?...
then it should run accordingly.

The user access or default access to config.php can be accessed using ../ when it is placed outside the index.php root folder.

 $auth_user = array (
    "/default"    => "../index.html" );

In case of sub menu: you can take out index.php/ 。

 $modversion['sub'][1]['name'] = "Menu Name";
 $modversion['sub'][1]['url'] = 'File Name';


・Other hints
-------------------------------------
The Auth Module was presented to you by ROUTE286/XOOPS.
Information that is not given above can be found at our home page (in Japanese only ;-()。

In case of any problems please refer to:

  ROUTE286/XOOPShttp://r286.com/xoops/


・Thanks
----------------------------
I got a lot of help through the XOOPS Japan forums and hope this module will come in handy.
  http://www.xoopscube.jp/modules/newbb/viewtopic.php?topic_id=3849&forum=13

I would like to give special thanks tadashi-san ^^





・Contact・Newest information
----------------------------------------

The latest development can be found at ROUTE286/XOOPS .
There is also a response form at ROUTE286/XOOPS.
Please create links from your own home page to ROUTE286/XOOPS directly.
When using Blog, we recommend you to use track path to link directly to:
 ROUTE286/XOOPShttp://r286.com/xoops/

The site also supports direct SSI and HTML linking
 ROUTE286http://r286.com/

6
carnuke
Re: Auth Module for wrapping HTML, PHP, CGI web site
  • 2005/1/12 12:05

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


Thanks noisia for alerting me to this thread. This may certainly make the difference to many potential users coming to XOOPS or seeking another solution!

I will try the module out and see how well it performs. Is it in the modules directory yet?

I will also make an FAQ for this and point to this thread so that users can see the translations and comments thaqt have come out.

Regards, Richard

7
carnuke
Re: Auth Module for wrapping HTML, PHP, CGI web site
  • 2005/1/12 12:39

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


Sorry, I cant seem to find a download for this module on the site. I know its there, but I dont understand the language. Can you post a direct DL link??? thanks

8
Shine
Re: Auth Module for wrapping HTML, PHP, CGI web site
  • 2005/1/12 12:49

  • Shine

  • Just can't stay away

  • Posts: 822

  • Since: 2002/7/22


That shouldn't be so hard. Within my first topic I mentioned the download link. The first upper 3 files are all this module (version: 1.01).
Direct link:
http://r286.com/xoops/modules/mydownloads/singlefile.php?cid=4&lid=27

Grtz., Shine

9
carnuke
Re: Auth Module for wrapping HTML, PHP, CGI web site
  • 2005/1/12 13:04

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


Thanks shine, sorry, my silly mistake... the link was not active so I didnt see it .

10
carnuke
Re: Auth Module for wrapping HTML, PHP, CGI web site
  • 2005/1/16 12:05

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


Thanks shine and noisia for the translations and details in this thread. What I downloaded from route286 was nota a module as such. It was simply one file called auth-search-1_00b1

so, when I read your comment Quote:
All you need to do is put the .html, .php, .cgi and even image files into the designated "Auth module" folder and they will be automatically wrapped with the XOOPS header and footer and display properly in xoops.


I do not know what to do here? What module folder? Do I need to create one?

I am looking to write a very clear FAQ on this subject, because many users have asked about wrapping a whole website, or group of pages. If we can make this a well documented process, it will be valuable.

Can you help please

Thanks, Richard

Login

Who's Online

232 user(s) are online (131 user(s) are browsing Support Forums)


Members: 0


Guests: 232


more...

Donat-O-Meter

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

Latest GitHub Commits