111
DonXoop
Re: Xoops On Crack?

^^^^^^ this works great. Should put this in the FAQ or somewhere easily found. I ran this on a host that had used Fantastico to install xoops. Worked without a problem. But this isn't for the nervous.....

good tip.

112
m0nty
Re: Xoops On Crack?
  • 2005/1/6 16:42

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


after reading this thread, which well to be honest is the most informative discussion i've read on XOOPS in a long while.. i was playing about with the installer..

i edited install/class/settingmanager.php as below

function getPrefix() {
   
$str"";
   
$salt "0123456789abchefghijklmnopqrstuvwxyz";
   
srand((double)microtime()*1000000);
   for (
$i=0$i<=6$i++)
       
$str.= substr($saltrand() % strlen($str), 1);
   return 
$str;
}
    
    function 
setting_manager($post=false){

        
$this->sanitizer =& TextSanitizer::getInstance();
        if(
$post){
            
$this->readPost();
        }else{

            
$this->database 'mysql';
            
$this->dbhost 'localhost';
            
$this->prefix $this->getPrefix();


the actual random sequence does function and works, but for some reason it only randomises the numeric part of the string.. if i change the letters to infront of the numbers it then randomizes letters.. i can't seem to get it to randomize the whole string :S

any tips?

113
Mithrandir
Re: Xoops On Crack?

I don't know a better method for the randomizer - except perhaps make to randoms, one for numbers and one for letters and then join them together...

One could also use xoops_makepass() to get a fairly random string.

114
m0nty
Re: Xoops On Crack?
  • 2005/1/6 17:32

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


have figured it out and got it to function correctly using:

function getPrefix() {
   
$str"";
   
$salt "0123456789abcdefghijklmnopqrstuvwxyz";
   
srand((double)microtime()*1000000);
   for (
$i=0$i<=6$i++)
       
$str.= substr($saltrand() % strlen($salt), 1);
   return 
$str;
}


strlen($str) needs to be strlen($salt), stupid mistake but it now works fine :)

i can now have the installer create a random db prefix.. maybe this could be utilised more to work the prefix to be a random string based on the domain name or some other data unique to each persons site..

115
hemertje
Re: Xoops On Crack?
  • 2005/1/8 15:36

  • hemertje

  • Just popping in

  • Posts: 32

  • Since: 2004/2/14


due to the prefix change i had a problem with the imagemanager...

see the following posting:

https://xoops.org/modules/newbb/viewtopic.php?viewmode=flat&topic_id=29651&forum=21

don't know if this is a problem when the prefix is changed by the above script!


greetings...

116
m0nty
Re: Xoops On Crack?
  • 2005/1/8 15:46

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


u mean the script i did above? or the script Brash & GIJOE did for changing the prefix afterwards?

117
hemertje
Re: Xoops On Crack?
  • 2005/1/8 21:10

  • hemertje

  • Just popping in

  • Posts: 32

  • Since: 2004/2/14


the script for changing the prefix afterwards, that caused the problem with the imagemanager for me when i changed it by hand in the sql database....

maybe it can cause also more problems with other XOOPS functions?

118
krobi
Re: Xoops On Crack?
  • 2005/1/8 21:48

  • krobi

  • Quite a regular

  • Posts: 290

  • Since: 2003/12/21


i have just tested the script from brash and it works fine

without any problems, and all functions works fine
imagemanager opens without problems, i haven't tested much with the imagemanage because in my test-xoops i dont have pictures in the imagemanager.

so tested to create one url one image and one e-mail within newbb 2, and that works fine without any problems

119
danielh2o
Re: Xoops On Crack?
  • 2005/1/20 19:52

  • danielh2o

  • Just popping in

  • Posts: 47

  • Since: 2004/10/19


when will be 2.0.10 (as said) released?

120
Bender
Re: Xoops On Crack?
  • 2005/1/20 20:35

  • Bender

  • Home away from home

  • Posts: 1899

  • Since: 2003/3/10


please ignore ... i missread the question :/

Login

Who's Online

363 user(s) are online (282 user(s) are browsing Support Forums)


Members: 0


Guests: 363


more...

Donat-O-Meter

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

Latest GitHub Commits