Arrow Home arrow Forums
larger font smaller font default font Fixed screen resolution Auto adjust screen size

Joomlapolis Forums  


<< Start < Prev 1 2 Next > End >>
UHP-CB automatic page approval
Date: 2006/01/30 09:35 By: chaking Status: User  
Karma: 0  
Fresh Joomlapolitan

Posts: 18
graphgraph
Ok, so I'm trying to insert the database statement that runs when you "add all users" (allow all users to use their "my homepage") in UHP's backend, into the registration of CB... Can someone help me do this please? I believe the code below is what the 'addallusers' function runs... Can someone help me put this into a self-running function when someone registers an/or after verification? I'm thinking this should be pretty easy, I don't know what I'm doing with mysql statements though... thanks!

Code:

 function Ffd7a4b05($option) {  global $database$my$mosConfig_absolute_path$mosConfig_live_site; require_once("components/com_uhp/functions.php"«»); require_once("components/com_uhp/uhp_config.php"«»); $lists = array(); $where = array();    $where[] = "u.id is NULL ";   $database -> setQuery("SELECT h.* FROM #__users as h"  "\nLEFT JOIN #__uhp as u ON u.user_id = h.id"  . (count($where) ? "\nWHERE " implode(' AND '$where) : ""«»)  ); if (!($users $database -> loadObjectList())) {  mosRedirect("index2.php?option=$option"'Access granted to all users.'); }

Click here to see the profile of this user The administrator has disabled public write access.

Re:UHP-CB automatic page approval
Date: 2006/01/30 13:58 By: JoomlaJoe Status: Admin  
Karma: 14  
Admin

Posts: 38
graphgraph
I'm not sure either...but I can tell you that based on the code snippet above you are not inserting anything into the database. Just reading data out of a table.
JoomlaJoe *The developer formally known as MamboJoe*
CB Core Team
Click here to see the profile of this user The administrator has disabled public write access.

Re:UHP-CB automatic page approval
Date: 2006/01/30 18:28 By: chaking Status: User  
Karma: 0  
Fresh Joomlapolitan

Posts: 18
graphgraph
ok, well that's not good... thanks for the reply though... I thought that "JOIN" might have been something like copy... guess not...

I think this would be a great option if people wanted to hack a core file... (at least until a version comes out with automatic member approval)... Maybe someone can find the database statement necessary and let us all know about it, it would be very much appreciated... thanks again
Click here to see the profile of this user The administrator has disabled public write access.

Re:UHP-CB automatic page approval
Date: 2006/01/31 17:21 By: chaking Status: User  
Karma: 0  
Fresh Joomlapolitan

Posts: 18
graphgraph
ahh... I believe this is the code necessary to add users...
I'm not sure how I would implement this into the registration, any takes?

Code:

 <?php    global $database$my$mosConfig_absolute_path$mosConfig_live_site; require_once("/administrator/components/com_uhp/functions.php"«»); require_once("/administrator/components/com_uhp/uhp_config.php"«»); $lists = array(); $where = array();    $where[] = "u.id is NULL ";   $database -> setQuery("SELECT h.* FROM #__users as h"  "\nLEFT JOIN #__uhp as u ON u.user_id = h.id"  . (count($where) ? "\nWHERE " implode(' AND '$where) : ""«»)  ); if (!($users $database -> loadObjectList())) {  mosRedirect("index2.php?option=$option"'Access granted to all users.'); } for ( $i 0$n count$users ); $i $n$i++ ) {  $userrow = &$users[$i];    $row = new mosuhp($database); $row->user_id $userrow->id;   $row->nick $userrow->username;   $row->email $userrow->email;   $row->website "";   $row -> published 0; $row -> shownick 0; $row -> showemail 0; $row -> showwebsite 0; $row -> mypage C9da9cc42; $row -> _tbl_key "id"; if (!$row -> check()){  echo "<script> alert('" $row -> getError() . "'); window.history.go(-1); </script>\n"; exit(); }  if (!$row -> store()){  echo "<script> alert('" $row -> getError() . "'); window.history.go(-1); </script>\n"; exit(); } $row -> checkin(); } mosRedirect("index2.php?option=$option","All users granted access"«»); } ?>



Post edited by: chaking, at: 2006/02/05 10:42
Click here to see the profile of this user The administrator has disabled public write access.

Re:UHP-CB automatic page approval
Date: 2006/02/04 20:31 By: chaking Status: User  
Karma: 0  
Fresh Joomlapolitan

Posts: 18
graphgraph
The file I had previously posted was not doing it... I'll keep trying...

Post edited by: chaking, at: 2006/02/05 10:45
Click here to see the profile of this user The administrator has disabled public write access.

Re:UHP-CB automatic page approval
Date: 2006/02/09 01:26 By: aqsg Status: User  
Karma: 4  
Junior Joomlapolitan

Posts: 35
graphgraph
Our new release of the User Home Pages will solve the problem that you are having.

NOTE: People who obfuscate their code should be shot

I have the function for your cron script temporarily so when i find it i'll pass it on
Director/Solutions Architect of Australian Quality Solutions Group (www.aqsg.com.au)
Founder of josCommunity (www.joscommunity.com)
Founder of CCHSStudent (www.cchsstudent.com)
Community Builder 3rd Party Developer
PAXXGallery Developer
Click here to see the profile of this user The administrator has disabled public write access.

<< Start < Prev 1 2 Next > End >>

Documentation

Documentation Subscription Service
(updated for CB 1.2 RC2)

What?

Why?

Where?

Just click here for answers!

Click here for a yearly subscription: subscribe now

Download Latest Release

The latest stable Community Builder Release is version 1.1 for Joomla 1.0 and Mambo.
You need to be a registered member of Joomlapolis to download.

The latest release candidate of Community Builder is version 1.2 RC3, native for Joomla 1.0, 1.5 and Mambo.
It is available as "thank you" to all CB documentation subscribers at this time.

CB Login