21
xoopdio
Re: Cannot change modules name
  • 2011/10/2 2:22

  • xoopdio

  • Just popping in

  • Posts: 29

  • Since: 2011/9/27


Hi Rodney

So, thinking that you get one point there : I did the test.

1 - I could change module name fine.
2 - The avatar won't show in the "edit profile", when the database is updated fine. Avatar issue correction is still accurate.
3 - It seems too that the "slogan for your site" doesn't show anymore on the frontpage.

Should I report that elsewhere better than here ?

Thank you



22
xoopdio
Re: Cannot change modules name
  • 2011/9/30 10:59

  • xoopdio

  • Just popping in

  • Posts: 29

  • Since: 2011/9/27


Thanks zyspec. Those were exactly match my problems.

I could correct the avatar trouble, and it's for a production site but I will wait for the stable update to correct the module name problem.

Thanks too Rodney for your answer but I won't : too unknown variables. Cf above.



23
xoopdio
Re: Avatar bulk load?
  • 2011/9/30 9:59

  • xoopdio

  • Just popping in

  • Posts: 29

  • Since: 2011/9/27


Quote:
Quote: Edit : It seems anyway that the images don't appear in Peaks Xoop interface but they are loaded in the official one ??? I don't know why. Not sure what you meant by this?


What I meant is that.. Sorry but I didn't (at that time) fully complete the work : The AVAMAN module has its own interface where you can manage your avatars and smilies.

With my first modifications, the pictures didn't appear in it, only in the official one -> a problem with the path that is fixed now.. The diff files have been updated.

But like DSK was saying to Nafitasssou : If at first you don't succed, try, try, try again.. And quickly the better !

Anyway I found another problem : select "none" after a first avatar selection doesn't delete the "avatar_user_link" line in the database. I'm not sure where to look.. Maybe the kernel/avatar.php around the "function &get($id)" (line 175) but I don't know what the script expects as return value when "none" is selected.

That's anyway a highly hypothetical guess and the next version has maybe already fixed this..

Sorry for the few who have already diff the files, you will need to do it again.

But now I'm sure it was the last change.. Well.. Quite sure..



24
xoopdio
Cannot change modules name
  • 2011/9/29 10:06

  • xoopdio

  • Just popping in

  • Posts: 29

  • Since: 2011/9/27


Hi

Its a new 2.5.1 install and I get some weird behaviours I am not sure where they come from (I didn't want to open a topic for each but if moderators prefer please tell) :

First, I can't change modules names : I follow the Faq but when it says :
7- Check the new red entreies and if correct, click go again at bottom.
I have no red or any entry to check ?
The interface just says : "Check all modifications for validate" with nothing under ?

Second, avatar won't appear. As I am a newbie to xoops, Im not sure where they supposed to appear on the interface but each time I come back on the avatar menu in the "edit profile", "none" is selected. As in the avatar menu, no user uses this avatar - for those who saw my previous post on avaman ( Xoops forum ), both way (module or official) to insert them in the database do insert them but it won't stuck ?

I got the feeling the 2 problems are related as but I really don't know where to look.

Thank you



25
xoopdio
Re: Avatar bulk load?
  • 2011/9/29 8:55

  • xoopdio

  • Just popping in

  • Posts: 29

  • Since: 2011/9/27


Hi

Actually I had a problem anyway, so I corrected the AVAMAN code. Please don't be too hard on me : that's my first hack ever.

If anyone find a better way, please tell me.

index.patch :

*** index_ori.php    2006-04-06 02:25:21.000000000 +0700
--- index_fin.php    2011-09-30 15:53:57.686817109 +0700
***************
*** 1,5 ****
--- 1,7 ----
  <?php
  
define"XOOPS_UPLOAD_PATH_AVATARS" "../../../uploads/avatars" ) ;

  
$avaman_allowed_exts = array(
      
'gif' => 'image/gif' ,
      
'jpg' => 'image/jpeg' ,
***************
*** 
59,65 ****
                  list( 
$file $users ) = $db->fetchRow$result ) ;
                  if( 
$users ) continue ;
                  if( 
strstr$file '..' ) ) die( '.. found.' ) ;
!                 @
unlinkXOOPS_UPLOAD_PATH '/' $file ) ;
                  
$db->query"DELETE FROM ".$db->prefix("avatar")." WHERE avatar_id=$avatar_id) ;
              }
          }
--- 
61,67 ----
                  list( 
$file $users ) = $db->fetchRow$result ) ;
                  if( 
$users ) continue ;
                  if( 
strstr$file '..' ) ) die( '.. found.' ) ;
!                 @
unlinkXOOPS_UPLOAD_PATH_AVATARS '/' $file ) ;
                  
$db->query"DELETE FROM ".$db->prefix("avatar")." WHERE avatar_id=$avatar_id) ;
              }
          }
***************
*** 
126,136 ****
          if( empty( 
$avaman_allowed_exts[$ext] ) ) continue ;
          
$file_node substr$file_name $ext_pos ) ;
          
$save_file_name uniqid'savt' ) . '.' $ext ;
!         
$fw fopenXOOPS_UPLOAD_PATH.'/'.$save_file_name "w" ) ;
          if( ! 
$fw ) continue ;
          @
fwrite$fw $file['content'] ) ;
          @
fclose$fw ) ;
!         
$db->query"INSERT INTO ".$db->prefix("avatar")." SET avatar_file='".addslashes($save_file_name)."', avatar_name='".addslashes($file_node)."', avatar_mimetype='".addslashes(@$avaman_allowed_exts[$ext])."', avatar_created=UNIX_TIMESTAMP(), avatar_display=1, avatar_weight=0, avatar_type='S'" ) ;
  
          
$imported ++ ;
      }
--- 
128,138 ----
          if( empty( 
$avaman_allowed_exts[$ext] ) ) continue ;
          
$file_node substr$file_name $ext_pos ) ;
          
$save_file_name uniqid'savt' ) . '.' $ext ;
!         
$fw fopenXOOPS_UPLOAD_PATH_AVATARS.'/'.$save_file_name "w" ) ;
          if( ! 
$fw ) continue ;
          @
fwrite$fw $file['content'] ) ;
          @
fclose$fw ) ;
!         
$db->query"INSERT INTO ".$db->prefix("avatar")." SET avatar_file='avatars/".addslashes($save_file_name)."', avatar_name='".addslashes($file_node)."', avatar_mimetype='".addslashes(@$avaman_allowed_exts[$ext])."', avatar_created=UNIX_TIMESTAMP(), avatar_display=1, avatar_weight=0, avatar_type='S'" ) ;
  
          
$imported ++ ;
      }
***************
*** 
185,191 ****
      echo 
"
      <tr>
          <td class='
$evenodd'>$avatar_id</td>
!         <td class='
$evenodd'><img src='".XOOPS_UPLOAD_URL.'/'.urlencode($avatar_file)."' alt='' /></td>
          <td class='
$evenodd'><input type='text' size='24' name='avatar_names[$avatar_id]' value='".htmlspecialchars($avatar_name,ENT_QUOTES)."' /></td>
          <td class='
$evenodd'> ".formatTimestamp($avatar_created)."</td>
          <td class='
$evenodd'><input type='checkbox' name='avatar_displays[$avatar_id]' ".($avatar_display?"checked='checked'":"")." /></td>
--- 187,193 ----
      echo "
      
<tr>
          <
td class='$evenodd'>$avatar_id</td>
!         <
td class='$evenodd'><img src='".XOOPS_UPLOAD_URL.'/'.$avatar_file."' alt='' /></td>
          <
td class='$evenodd'><input type='text' size='24' name='avatar_names[$avatar_id]' value='".htmlspecialchars($avatar_name,ENT_QUOTES)."' /></td>
          <
td class='$evenodd'".formatTimestamp($avatar_created)."</td>
          <
td class='$evenodd'><input type='checkbox' name='avatar_displays[$avatar_id]' ".($avatar_display?"checked='checked'":"")." /></td>


smilies.patch :

*** smilies_ori.php    2006-04-06 02:25:21.000000000 +0700
--- smilies_fin.php    2011-09-30 15:53:45.036817110 +0700
***************
*** 1,5 ****
--- 1,7 ----
  <?php
  
define"XOOPS_UPLOAD_PATH_SMILIES" "../../../uploads/smilies" ) ;

  
$avaman_allowed_exts = array(
      
'gif' => 'image/gif' ,
      
'jpg' => 'image/jpeg' ,
***************
*** 
58,64 ****
              if( 
$result ) {
                  list( 
$file ) = $db->fetchRow$result ) ;
                  if( 
strstr$file '..' ) ) die( '.. found.' ) ;
!                 @
unlinkXOOPS_UPLOAD_PATH '/' $file ) ;
                  
$db->query"DELETE FROM ".$db->prefix("smiles")." WHERE id=$smiles_id) ;
              }
          }
--- 
60,66 ----
              if( 
$result ) {
                  list( 
$file ) = $db->fetchRow$result ) ;
                  if( 
strstr$file '..' ) ) die( '.. found.' ) ;
!                 @
unlinkXOOPS_UPLOAD_PATH_SMILIES '/' $file ) ;
                  
$db->query"DELETE FROM ".$db->prefix("smiles")." WHERE id=$smiles_id) ;
              }
          }
***************
*** 
125,135 ****
          if( empty( 
$avaman_allowed_exts[$ext] ) ) continue ;
          
$file_node substr$file_name $ext_pos ) ;
          
$save_file_name uniqid'smil' ) . '.' $ext ;
!         
$fw fopenXOOPS_UPLOAD_PATH.'/'.$save_file_name "w" ) ;
          if( ! 
$fw ) continue ;
          @
fwrite$fw $file['content'] ) ;
          @
fclose$fw ) ;
!         
$db->query"INSERT INTO ".$db->prefix("smiles")." SET smile_url='".addslashes($save_file_name)."', code='".addslashes(rawurldecode($file_node))."', display=0, emotion=''" ) ;
  
          
$imported ++ ;
      }
--- 
127,137 ----
          if( empty( 
$avaman_allowed_exts[$ext] ) ) continue ;
          
$file_node substr$file_name $ext_pos ) ;
          
$save_file_name uniqid'smil' ) . '.' $ext ;
!         
$fw fopenXOOPS_UPLOAD_PATH_SMILIES.'/'.$save_file_name "w" ) ;
          if( ! 
$fw ) continue ;
          @
fwrite$fw $file['content'] ) ;
          @
fclose$fw ) ;
!         
$db->query"INSERT INTO ".$db->prefix("smiles")." SET smile_url='smilies/".addslashes($save_file_name)."', code='".addslashes(rawurldecode($file_node))."', display=0, emotion=''" ) ;
  
          
$imported ++ ;
      }
***************
*** 
181,187 ****
      echo 
"
      <tr>
          <td class='
$evenodd'>$smiles_id</td>
!         <td class='
$evenodd'><img src='".XOOPS_UPLOAD_URL.'/'.urlencode($file)."' alt='' /></td>
          <td class='
$evenodd'><input type='text' size='12' name='codes[$smiles_id]' value='".htmlspecialchars($code,ENT_QUOTES)."' /></td>
          <td class='
$evenodd'><input type='text' size='24' name='emotions[$smiles_id]' value='".htmlspecialchars($emotion,ENT_QUOTES)."' /></td>
          <td class='
$evenodd'><input type='checkbox' name='displays[$smiles_id]' ".($display?"checked='checked'":"")." /></td>
--- 183,189 ----
      echo "
      
<tr>
          <
td class='$evenodd'>$smiles_id</td>
!         <
td class='$evenodd'><img src='".XOOPS_UPLOAD_URL.'/'.$file."' alt='' /></td>
          <
td class='$evenodd'><input type='text' size='12' name='codes[$smiles_id]' value='".htmlspecialchars($code,ENT_QUOTES)."' /></td>
          <
td class='$evenodd'><input type='text' size='24' name='emotions[$smiles_id]' value='".htmlspecialchars($emotion,ENT_QUOTES)."' /></td>
          <
td class='$evenodd'><input type='checkbox' name='displays[$smiles_id]' ".($display?"checked='checked'":"")." /></td>


Complete with the modifications given here : Xoops Forum

And now you got a module AVAMAN which fully works with the Xoops 2.5.1.

Hope it would be useful.



26
xoopdio
Re: Avatar bulk load?
  • 2011/9/29 2:22

  • xoopdio

  • Just popping in

  • Posts: 29

  • Since: 2011/9/27


Hello

Thanks for the answer.

Actually it works fine on Xoops 2.5.1 ! It imported all my avatars and simleys just fine. They are in the upload/root as Jimmyx noted but Xoops seems to agree on it.

I didn't test those on the frontend yet, I'll make a report.

Edit : Frontend works fine too : avatars and smileys !
Thanks again



27
xoopdio
Re: Avatar bulk load?
  • 2011/9/28 7:25

  • xoopdio

  • Just popping in

  • Posts: 29

  • Since: 2011/9/27


Hi

I know it is an old post but the link is dead as well as this one :https://xoops.org/modules/smartfaq/faq.php?faqid=260 given on this page :https://xoops.org/modules/smartfaq/faq.php?faqid=417

Please do you know where I can find a tutorial to load a bulk of avatars ?

Thank you



28
xoopdio
Re: How to install the XOOPS and requirements
  • 2011/9/27 7:14

  • xoopdio

  • Just popping in

  • Posts: 29

  • Since: 2011/9/27


Hi Mamba (kill bill fan ?)

So no risk unless someone hacks into the system ?

Regards



29
xoopdio
Re: How to install the XOOPS and requirements
  • 2011/9/27 2:57

  • xoopdio

  • Just popping in

  • Posts: 29

  • Since: 2011/9/27


Hello

I reopen the thread as it seems to go on the same line : doesnt apply 777 on the 2 folders (lib and data) at the root of the home directory a security risk ?

Thank you




TopTop
« 1 2 (3)



Login

Who's Online

279 user(s) are online (196 user(s) are browsing Support Forums)


Members: 0


Guests: 279


more...

Donat-O-Meter

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

Latest GitHub Commits