xoops forums

Forum Index


Board index » All Posts (sudhaker)




sudhaker

Not too shy to talk
Posted on: 2005/4/4 15:11
sudhaker
sudhaker (Show more)
Not too shy to talk
Posts: 117
Since: 2003/2/6 2
#31

Re: Autologin Hack for 2.0.10-RC

Updated for 2.0.10.RC too. Please keep me posted with any suggestions / bugs.

Info: http://xoops.biz/x7/modules/myhacks/index.php?id=2

Download: http://xoops.biz/x7/modules/mydownloads/viewcat.php?cid=1

Cheers,


sudhaker

Not too shy to talk
Posted on: 2005/4/2 2:59
sudhaker
sudhaker (Show more)
Not too shy to talk
Posts: 117
Since: 2003/2/6 2
#32

Re: CHMOD Recommendations

Check the cPanel scripting using my zipftp


sudhaker

Not too shy to talk
Posted on: 2005/4/1 17:08
sudhaker
sudhaker (Show more)
Not too shy to talk
Posts: 117
Since: 2003/2/6 2
#33

Re: zipftp - Life saver and pretty fast too :-)

Thanks for compliments

My next plan is to make a script which can backup my XOOPS sites from a nightly running cron job. Also I should be able to recover my XOOPS site from any previously taken snap-shot.

The whole idea is to make webmaster's life easy

Cheers,


sudhaker

Not too shy to talk
Posted on: 2005/4/1 16:40
sudhaker
sudhaker (Show more)
Not too shy to talk
Posts: 117
Since: 2003/2/6 2
#34

Re: zipftp - Life saver and pretty fast too :-)

Yes, server must have cPanel. This code is using cPanel's reverse-engineered API for performing all operations. Check the file zipftp/FileManager.class.php for all available methods. I implemented all useful methods from cPanel's file manager module.

And you are very correct, running it at your end requires a php runtime (I have tested it on php5 only, my favorite is
XAMPP Lite). It usages CURL extension and calls HTTP methods on cPanel servers

My server was getting zero-byte or incomplete uploaded files. This was becoming a nightmare for me specially when using FTP over HTTPS proxy. I troubleshooted some other people's XOOPS site too and after wasting lots of time; we finally found zero-byte or incomplete uploaded files problem

So I wrote this utility and now it makes my XOOPS administration task very easy. I manage many XOOPS sites and it has become a real life-saver for me I am very excited by sharing this with XOOPS community and eagerly waiting for feedback and comments.

Cheers,


sudhaker

Not too shy to talk
Posted on: 2005/4/1 16:00
sudhaker
sudhaker (Show more)
Not too shy to talk
Posts: 117
Since: 2003/2/6 2
#35

zipftp - Life saver and pretty fast too :-)

ZipFTP - Super fast (and secure) alternative to transfer files to your cPanel hosting server. Why to use slower FTP?

I tried uploaded xoops-2.0.9.2 on my Verizon DSL (1.5M/128k) using FileZilla FTP with 2 simultaneous connections. Guess what? It took me 12 minutes. But uploading xoops-2.0.10-b2 with ZipFTP was 1:12 minute only. All 1217 uploaded to server, changed folder permissions, with just one command. I am about to finish the documentation and manual part and will be releasing final version pretty soon. In the mean-time feel free to experiemnt with it, Sending any bug-report would be real great

Current version features:

* Upload files
* Extract uploaded archive
* Make directory
* Delete file / folder tree
* Change mode file/folder
* Empty trash
* Optional transfer over SSL

Features in future version

* All required database related activities.

Sample script file.

<?php
#
# Visit http://xoops.biz/x7/modules/mytricks/ ... p;for more info.
#

#
# define credentials here
#

$host 'domain.com';
$user 'domain';
$pass 'password';

// to install in webroot i.e. $HOME/public_html
// $xdir = '';

// to install in any sub-folder
$xdir 'x2'// xoops2, x2 or x7 is my favorite 

// this archive should have mainfile.php in it top folder
//   files inside xoops-dist/html/ will go here
$xfile 'xoops2.tar.gz';

require_once(
'zipftp/FileManager.class.php');

$fm = new FileManager();
$fm->connect($host$user$pass);

#
# add your code here
#
#   following code will upload the XOOPS files in webroot/$xdir
#

echo 'Started at ' date("D M j G:i:s T Y") . "n";

// it may be dangerous to delete webroot by script, do manually if required
if($xdir != '') {
        
$fm->deleteFileFolder($xdir);
        
$fm->createFolder($xdir);
}
$fm->extractArchive($xfile$xdir);
$fm->changeMode($xdir .'/mainfile.php'0644);
$fm->changeMode($xdir .'/cache'0777);
$fm->changeMode($xdir .'/templates_c'0777);
$fm->changeMode($xdir .'/uploads'0777);
$fm->emptyTrash();

echo 
'Finished at ' date("D M j G:i:s T Y") . "n";

$fm->close();

?>


I remember someone asking for a script which can reset all file/folder permissions. Doing that should be pretty easy and handy using zipftp, Isn't it?

Updated (30 March, 2005): A basic version is added into downloads. http://xoops.biz/x7/modules/mydownloads/viewcat.php?cid=2

Cheers,


sudhaker

Not too shy to talk
Posted on: 2005/4/1 15:57
sudhaker
sudhaker (Show more)
Not too shy to talk
Posts: 117
Since: 2003/2/6 2
#36

Re:Some pointers on how to build a theme

http://www.puntoflotante.com/ is not a XOOPS site like my http://zipftp.com


sudhaker

Not too shy to talk
Posted on: 2005/4/1 15:23
sudhaker
sudhaker (Show more)
Not too shy to talk
Posts: 117
Since: 2003/2/6 2
#37

Re: Autologin Hack for 2.0.10-beta3

You are good to go

The only needed form field is following:

<input type="checkbox" name="rememberme" value="On" class ="formButton" /> <{$block.lang_rememberme}><br /><{* autologin hack SRAJ *}>


And all this hack will care is getting rememberme=On when login form is submitted. Form's look and feel is only limited to your imaginations

Cheers,


sudhaker

Not too shy to talk
Posted on: 2005/4/1 7:22
sudhaker
sudhaker (Show more)
Not too shy to talk
Posts: 117
Since: 2003/2/6 2
#38

Re: Autologin Hack for 2.0.10-beta3

Updated for beta3 too.

Cheers,


sudhaker

Not too shy to talk
Posted on: 2005/3/28 21:08
sudhaker
sudhaker (Show more)
Not too shy to talk
Posts: 117
Since: 2003/2/6 2
#39

Autologin Hack for 2.0.10-beta2

Orig Ref: http://xoops.biz/x7/modules/myhacks/index.php?id=2

---

Hack: Remember Me + Login using Email + Register with Real Name (for xoops-2.0.9.2 & xoops-2.0.10.b2)

Hi Xoopsers,

This is my first XOOPS hack released to public. This hack is highly influenced by GIJOE auto-login hack. This does exactly same thing but my approach is little refined (I think so, feel free to disagree).


Features:

1. Similar to gMail's "don't ask for my password for 2 weeks", your members will get an option for activating "auto-login". This which will keep them logged on a browser for next one week even after the browser was closed. If member browses the site within a week, the duration will get extended (tell me if it is good or bad)?

2. Members get option of using any of loginid or email to login.

3. New members will be asked for 'Real Name' at the time of registration. I found many people too lazy to update their profile, so now their profile will have their name for sure. Also an invalid or garbage name strongly indicates the ill-intention of newly registered user, who can be banned immediately to prevent any possible misuse. Why core team has this great feature commented


Followings are major difference from GIJOE hack:

1. In place of making a localized code change, I also changed "kernel/member.php" and added two new methods loginUserAuto (auto-login someone using saved cookies) and loginUserEmail (login someone using email as username).

2. I am using value stored in actkey column for auto-login feature. I too am totally against of storing the MD5 of real password in user cookies (like the author of original auto-login and several other people). So here is perhaps the safer work-around. MD5 of actkey is sent to user's browser as cookies and the same is matched for auto-login. I found this column useless after user activation - so why don't we use it. With recent patch - actkey is getting new random value every time user changes the password - so saved cookies will become invalid. SAFER NOW

Minor differences:

1. I had to change "kernel/user.php" also as it was not persisting actkey column for any existing user. This column useless after user activation

2. _MB_SYSTEM_REMEMBERME is not used. Rather global variable _REMEMBERME is used to render 'system_userform.html' and 'system_block_login.html' both. It is not duplicated and more consistent like other constants _USERNAME and _PASSWORD.

3. Using cookie name 'autologin_key' in place of 'autologin_pass'

4. Using xoops's standard function checkEmail() to test if email was passed as userId.

Looking forward to get feedback from people

------------------------------------------------------

Q. How to install hack?

A. You should know what you are doing.

Get files from http://xoops.biz/x7/modules/mydownloads/

* This patch is tested to work on version 2.0.9.x only and just overwrite original files with the supplied ones. (For older versions, search for the word "SRAJ" in hacked files and merge the changes manually).

Updated: There is a patch available for 2.0.10.b2. Please report me any bug or problems. This will help me releasing well tested code for 2.0.10

* After overwriting files, don't forget to update system module.

Check GIJOE documentation for more options.

Done, Enjoy...

Cheers,
Sudhaker


sudhaker

Not too shy to talk
Posted on: 2005/3/19 8:23
sudhaker
sudhaker (Show more)
Not too shy to talk
Posts: 117
Since: 2003/2/6 2
#40

Re: My Admin password doesnt work!

I assume u have phpmyadmin access, so execute this command

update xoops_users set pass '5ebe2294ecd0e0f08eab7690d2a6ee69' where uid 1


If it goes fine, your password is "secret" (without quotes), login and change to your favorite one. Do required change if your prefix is not 'xoops'



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