1
timman
Re: Weird: Admin user cannot be deleted.
  • 2005/2/22 9:00

  • timman

  • Just popping in

  • Posts: 18

  • Since: 2005/1/16


It worked, thanks bro!



2
timman
Re: Weird: Admin user cannot be deleted.
  • 2005/2/16 14:50

  • timman

  • Just popping in

  • Posts: 18

  • Since: 2005/1/16


One of them is not even activated and doesn't belong to any group... spooky



3
timman
Weird: Admin user cannot be deleted.
  • 2005/2/16 10:20

  • timman

  • Just popping in

  • Posts: 18

  • Since: 2005/1/16


I can't delete users? Even the non actiovated ones. The message I get is: Admin user cannot be deleted. (User: thenameoftheuser).

Can anyone tell me whats wrong?



4
timman
Re: Action after registration complete... Need some help
  • 2005/2/15 17:00

  • timman

  • Just popping in

  • Posts: 18

  • Since: 2005/1/16


Well, I don't know what it is. Is it the way I ask my questions? Nobody seems to go into this. For someone with PhP knowledge this should be a piece of cake.



5
timman
Action after registration complete... Need some help
  • 2005/2/14 13:03

  • timman

  • Just popping in

  • Posts: 18

  • Since: 2005/1/16


I'm already trying to find a module and hack for such a long time that I now urgently need a solution to my problem.

There are some things to be done:

1) the website field in the registration should be checked if excists. It should be unique, so I thought about this:

<?php

function ls_a($wh,$url){  
$occupied=0;  
         if (
$handle opendir($wh)) {
               while (
false !== ($file readdir($handle))) { 
                       if (
$file != "." && $file != ".." ) { 
                                     if(
$file == $url){ 
                                         
$bezet 1;
                                     }
                       } 
               }
               
closedir($handle); 
         }
         return 
$occupied;
       } 


$restriction '/[^A-z0-9_]/';

if (
$submit){
    
$bezet=ls_a('../',$url);
    if (!
eregi(" "$url)){
        if (!
preg_match($restriction,$url)){
            if (
$bezet == 0){
                
$doorgaan ='true'
            }
            else{
                
$stop "The sitename already excists<br>";
                
$continue ='false'
            }
        }
        else{
        
$stop "Please do not use spaces or special characters in your sitename"
        
$continue ='false'
        }
    }
    else{
    
$stop "Please do not use spaces in your sitename<br>";
    
$continue ='false'
    }
}
?>

    <form action="executemkdir.php" name="Information" onsubmit="echo ">
    <br><br>
    <div align="center" valign="middle" class="stop"><?php echo $stop ?></div>
    sitename:(poink.be/)<br><input type="text" name="name"><br>
    o:<br><input type="text" name=owner><br>
    template:<br><select name="keuze"><option value ="demo1">demo1</option>
</select><br>
    email owner:<br><input type="text" name="email"><br><br>
    <input type="submit" name="submit" value="Continue">
    </form>
    </div>
    </td>
</tr>
</table>


The executemkdir.php:

<?php
$site 
=strtolower($url);

       function 
cp($wf$wto){   
               
mkdir($wto,0777);
               
$arr=ls_a($wf);
               foreach (
$arr as $fn){
                           if(
$fn){
                               
$fl="$wf/$fn";
                               
$flto="$wto/$fn";
                           if(
is_dir($fl))    cp($fl,$flto);
                               else 
copy($fl,$flto);
                       }
               }
       }

       function 
ls_a($wh){    
         if (
$handle opendir($wh)) {
               while (
false !== ($file readdir($handle))) { 
                       if (
$file != "." && $file != ".." ) { 
                                     if(!
$files$files="$file";
                                     else 
$files="$filen$files"
                       } 
               }
               
closedir($handle); 
         }
         
$arr=explode("n",$files);
         return 
$arr;
       } 

$oldname "../" $keuze "/";
$newname "../" $site "/";
cp($oldname$newname) ;
       
       
$bestand '../' $site '/settings.php';
include 
$bestand;
$admin_email $email;
$title $site;

$jt fopen$bestand'w+' );
fwrite$jtstripslashes("<?php require 'menupic.php'; require 'adspic.php'; require 'headerpic.php'; require 'bgpic.php';?><?php $title='$title';?><?php $meta_name_keywords='$meta_name_keywords';?><?php $meta_name_description='$meta_name_description';?><?php $username='$username';?><?php $password='$password';?><?php $admin_email='$admin_email';?><?php $url_img='$url_img';?><?php $path_img='$path_img';?><?php $body_bg_color='$body_bg_color';?><?php $header_bg_color='$header_bg_color';?><?php $content_bg_color='$content_bg_color';?><?php $menu_bg_color='$menu_bg_color';?><?php $footer_bg_color='$footer_bg_color';?><?php $table_width='$table_width';?><?php $table_height='$table_height';?><?php $cell_padding='$cell_padding';?><?php $url='$url';?><?php $boodschap='$boodschap';?>" ) );
fclose$jt );



?>


Ok, this is rough, but the idea is that after I approved registration a subdir with the $url should be created. It already works (I tried to translate some vars because they were in dutch)

The question is: can I put the first snippet in the register.php of xoops, and where?



6
timman
Re: Registration hack and module required....
  • 2005/2/6 12:10

  • timman

  • Just popping in

  • Posts: 18

  • Since: 2005/1/16


Hmm... I'm not the amazing one, luciano is

Now, I installed registration keys (works fine) but at the admin side I need to enter a username and a code. So, that won't work. I will have to hack the module so it doesn't require a username. Registration will also need a modification.

Another thing is the code generator I would need. Entering the codes manually is not really an option.

Generating codes

function ranpass($len "8"){
  
$pass NULL;
  for(
$i=0$i<$len$i++) {
   
$char chr(rand(48,122));
   while (!
ereg("[a-zA-Z0-9]"$char)){
     if(
strtoupper($char) == strtoupper($lchar)) continue;
     
$char chr(rand(48,90));
   }
   
$pass .= $char;
   
$lchar $char;
  }
  return 
$pass;
}

function 
makeRandomPassword() { 
  
$salt "abchefghjkmnpqrstuvwxyz0123456789"
  
srand((double)microtime()*1000000); 
      
$i 0
      while (
$i <= 7) { 
            
$num rand() % 33
            
$tmp substr($salt$num1); 
            
$pass $pass $tmp
            
$i++; 
      } 
      return 
$pass
}



Putting then into the database

$link mysql_connect("localhost""databaseuname""databasepassword");
$db =mysql_select_db("databasename");
    for(
$i=0$i<$howmuch$i++) {
        
$code ranpass();
        
$result mysql_query("INSERT INTO `codes` VALUES ('$code', '', '', '', '0000-00-00', '', '')");
        if (!
$result){
       
$fout mysql_error();
       echo 
$fout;
      }


Whatdoyouthink



7
timman
Re: Registration hack and module required....
  • 2005/2/2 17:52

  • timman

  • Just popping in

  • Posts: 18

  • Since: 2005/1/16


I've got the cms, it's a flatfile thing based on flatout and htmlarea. The only thing is that I have an older version running, I'll send you login and pass by PM.

From the XOOPS point of view a full featured easy to use site generator would be a great asset. Imagine communities offering free (or paid) sites to their users.

But, the real problem is the login stuff... but the xoopermod seems close. I'll try it tomorrow. For now I really need a big rest



8
timman
Re: Registration hack and module required....
  • 2005/2/2 16:46

  • timman

  • Just popping in

  • Posts: 18

  • Since: 2005/1/16


Hi Wheeler,

Thanks, could have used the search on this site

Create the dir and putting the files in it? According to my brother Luciano with

$site =strtolower($naam);

       function 
cp($wf$wto){   
               
mkdir($wto,0777);
               
$arr=ls_a($wf);
               foreach (
$arr as $fn){
                           if(
$fn){
                               
$fl="$wf/$fn";
                               
$flto="$wto/$fn";
                           if(
is_dir($fl))    cp($fl,$flto);
                               else 
copy($fl,$flto);
                       }
               }
       }

       function 
ls_a($wh){    
         if (
$handle opendir($wh)) {
               while (
false !== ($file readdir($handle))) { 
                       if (
$file != "." && $file != ".." ) { 
                                     if(!
$files$files="$file";
                                     else 
$files="$filen$files"
                       } 
               }
               
closedir($handle); 
         }
         
$arr=explode("n",$files);
         return 
$arr;
       }


The files? A flatfile cms.

Now, I'll try this registration keys module to see what it does...

Cheers,

Tim



9
timman
Re: Registration hack and module required....
  • 2005/2/2 8:14

  • timman

  • Just popping in

  • Posts: 18

  • Since: 2005/1/16


Hi Wheeler,

Where is it? Where is it? Where is it?

A better cms? No. Tried Mambo for a while but I don't like it. So, now I'm stuck.

Willing to pay? Depends on what I get.

Peace too



10
timman
Re: Registration hack and module required....
  • 2005/2/1 7:46

  • timman

  • Just popping in

  • Posts: 18

  • Since: 2005/1/16


Well, that's it for xoops. As nobody seems to be able to help us out we'll have to migrate. My brother keeps on believing in this cms but I don't, XOOPS is a great playground, but when it gets serious...

So, what I learned might be usefull for others: plan first, join the communities of all major cms's and then make up your mind.




TopTop
(1) 2 »



Login

Who's Online

149 user(s) are online (92 user(s) are browsing Support Forums)


Members: 0


Guests: 149


more...

Donat-O-Meter

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

Latest GitHub Commits