Go Back   Mosets Community > Third party Developers, Addons and Services for Mosets components > 3rd party addons & Custom Jobs

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-30-2006, 08:35 PM
dyvel dyvel is offline
Junior Member
 
Join Date: Oct 2006
Posts: 5
Default Hot Property / community builder registration as agent hack

Hi

Based on hot property agent hack I have updated the community builder hack to work with the latest version of community builder v. 1.0.1

I have tested it on joomla 1.0.11 and HP 0.98

Enjoy
Attached Files
File Type: zip comprofiler.zip (12.1 KB, 320 views)
Reply With Quote
  #2  
Old 11-14-2006, 12:05 PM
syion syion is offline
Junior Member
 
Join Date: Nov 2006
Posts: 6
Default File Location

What directory does this file go in?

Thanks for making the hack

Also do you still need to use the hp hack as well?
Reply With Quote
  #3  
Old 07-09-2007, 08:18 PM
mpeetsma mpeetsma is offline
Junior Member
 
Join Date: Jul 2007
Posts: 2
Default CB HP comprofiler.php updated to CB 1.0.2

Just to give it back.
Modified for the Community Builder Version 1.0.2

just replace the one in your components->comprofiler directory with this one.. other hacks still apply.
Attached Files
File Type: zip comprofiler.zip (14.1 KB, 211 views)
Reply With Quote
  #4  
Old 07-24-2007, 10:18 PM
julianojc julianojc is offline
Junior Member
 
Join Date: Jun 2007
Posts: 16
Thumbs up

Quote:
Originally Posted by mpeetsma View Post
Just to give it back.
Modified for the Community Builder Version 1.0.2

just replace the one in your components->comprofiler directory with this one.. other hacks still apply.

Find:

mosMakeHtmlSafe($row);
$row->id = 0;
$row->gid = $acl->get_group_id('Registered','ARO');
$row->usertype = 'Registered';

=====================================
Replace:

mosMakeHtmlSafe($row);
$row->id = 0;
$row->gid = $acl->get_group_id('Agent','ARO');
$row->usertype = 'Agent';

====================================
This will make to appear the Agent Menu.
Reply With Quote
  #5  
Old 10-07-2007, 02:52 PM
ssnobben ssnobben is offline
Mosets'd
 
Join Date: Nov 2006
Posts: 805
Lightbulb

Does anyone know how this work with CB 1.1 (Joomla 1.0.13) ??
Reply With Quote
  #6  
Old 10-17-2007, 06:32 PM
ssnobben ssnobben is offline
Mosets'd
 
Join Date: Nov 2006
Posts: 805
Default

Quote:
Originally Posted by julianojc View Post
Find:

mosMakeHtmlSafe($row);
$row->id = 0;
$row->gid = $acl->get_group_id('Registered','ARO');
$row->usertype = 'Registered';

=====================================
Replace:

mosMakeHtmlSafe($row);
$row->id = 0;
$row->gid = $acl->get_group_id('Agent','ARO');
$row->usertype = 'Agent';

====================================
This will make to appear the Agent Menu.
any hack that work for the new CB 1.1 ?? any suggestions ?
Reply With Quote
  #7  
Old 10-17-2007, 07:16 PM
lazysheepmedia lazysheepmedia is offline
Member
 
Join Date: Aug 2007
Posts: 31
Default

will thsi not work then if you change the values Registered to Agent?
Reply With Quote
  #8  
Old 10-24-2007, 05:31 PM
teddy teddy is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Default

the only modification I could find within the modified comprofiler.php was between a
if (!$row->store()) {
and a
if ( $row->id == 0 ) {
So try to integrate the previously added code into row 1260 (depends on your formatting I think) on CB 1.1's comprofiler.php code:

Code:
### START: Add new Agent to Hot Property ###
	
	include( 'administrator/components/com_hotproperty/config.hotproperty.php' );
	
	// Check if hp_default_company is set
	if ( !is_numeric($hp_default_company) || $hp_default_company <= 0 ) {
		
		// Use the latest company added to the database
		$database->setQuery( "SELECT id FROM #__hp_companies ORDER BY id DESC LIMIT 1" );
		$hp_default_company = $database->loadResult();

	}

	// Get Userid from #__users
	$database->setQuery("SELECT id FROM #__users WHERE username='$row->username' LIMIT 1");
	$userid = $database->loadResult();

	// Insert into #__hp_agents
	$database->setQuery("INSERT INTO #__hp_agents (user, name, email, need_approval, company) VALUES ('$userid', '$row->name', '$row->email', '".(($hp_auto_approve == '1') ? '0':'1')."', '".$hp_default_company."')");
	$database->query();

###   END: Add new Agent to Hot Property ###
Please, report back if you succeed or not
Reply With Quote
  #9  
Old 10-31-2007, 09:46 PM
ssnobben ssnobben is offline
Mosets'd
 
Join Date: Nov 2006
Posts: 805
Default

Great if this works. Can anyone sum this up on one post how to do?

Thks.
Reply With Quote
  #10  
Old 12-11-2007, 01:34 AM
ssnobben ssnobben is offline
Mosets'd
 
Join Date: Nov 2006
Posts: 805
Default cant get this...

I dont know how to do this.

I have check the comprofiler php file but I cant find how to do this for the CB 1.1 version.

I want o n e CB reg form process for types like agent and other end users.

I want to use the CB log in or do I have to use the agent log in??

As now I have the CB register active and what I want is a way of selecting user type when registrating.

How can I do that if I also want to keep CB reg process? or should I have two different registrations? can anyone help with this so I understand how to do this correctly!

I have attached my comprofiler if someone want to check it...

Thanks!
Attached Files
File Type: zip comprofilerHP.zip (16.9 KB, 135 views)
Reply With Quote
  #11  
Old 12-11-2007, 01:47 AM
lazysheepmedia lazysheepmedia is offline
Member
 
Join Date: Aug 2007
Posts: 31
Default some help

Hi

If you need some help set me up an ftp account and I will try to help you

My experience tells me that it is better to take a look at the files rather that try and diagnose the problem from files sent

Regards

Mark
Reply With Quote
  #12  
Old 12-11-2007, 05:48 PM
teddy teddy is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Default

let us know where was the issue!!
Reply With Quote
  #13  
Old 01-13-2008, 05:20 PM
cyberzoul cyberzoul is offline
Junior Member
 
Join Date: Dec 2006
Posts: 2
Default does any one have CB 1.1 hack

Does any one have CB 1.1 hack??
Reply With Quote
  #14  
Old 01-14-2008, 05:24 PM
ssnobben ssnobben is offline
Mosets'd
 
Join Date: Nov 2006
Posts: 805
Lightbulb

Quote:
Originally Posted by cyberzoul View Post
Does any one have CB 1.1 hack??
I dont think so you have to fix on your self I believe.

I think the best would be if you can have agent and CB integrated reg process and let users decide if you want to reg as agent 1,2,3 or as CB user(s) then with more user types to choose from when registrate. Then you can also set up different subscription schemes for different users with AEC subscription component (www.globalnerd.org There is also a discussion going on now of replacing CB in the Globalnerd forum https://globalnerd.org/index.php?opt...=4937&catid=11)

Last edited by ssnobben; 01-14-2008 at 05:26 PM.
Reply With Quote
  #15  
Old 01-14-2008, 06:05 PM
Igorbimbich Igorbimbich is offline
Junior Member
 
Join Date: Dec 2006
Posts: 22
Default

to begin, it would be nice to have this CB 1.1 hack working...
then I didn't understand your examples, ssnobben, would you try to explain better? Maybe there's already a solution we don't know about...
Reply With Quote
  #16  
Old 01-15-2008, 02:14 AM
ssnobben ssnobben is offline
Mosets'd
 
Join Date: Nov 2006
Posts: 805
Default

Quote:
Originally Posted by Igorbimbich View Post
to begin, it would be nice to have this CB 1.1 hack working...
then I didn't understand your examples, ssnobben, would you try to explain better? Maybe there's already a solution we don't know about...
Well I dont know bcs I have never heard anyone have this working with CB 1.1 and now J 1.0.14..so if there is anyone have this working pls tell us then!
Reply With Quote
  #17  
Old 02-15-2008, 08:42 PM
gerritd gerritd is offline
Mosets'd
 
Join Date: Feb 2008
Posts: 1
Default CB 1.1 & Joomla 1.0.14

Please help. Also need all new users to be added as agents. Can someone please post the correct comprofiler.php file for this. Thanks
Reply With Quote
  #18  
Old 04-06-2008, 03:07 PM
ssnobben ssnobben is offline
Mosets'd
 
Join Date: Nov 2006
Posts: 805
Default

There will be a new J 1.5 Community Builder 1.2 ( CB ) soon http://www.joomlapolis.com/content/view/5147/37/ Hope this will work with the new HP 1.0 J 1.5 version too .

Last edited by ssnobben; 04-06-2008 at 03:18 PM.
Reply With Quote
  #19  
Old 09-14-2008, 08:15 PM
builder07 builder07 is offline
Mosets'd
 
Join Date: Jul 2008
Posts: 10
Default CB1.1 hack

In comprofile.php,

find (around line 1099):

Code:
$row->email	= trim ( $row->email );
After, add;

Code:
 ### START: Add new Agent to Hot Property ###
        $row->gid = $acl->get_group_id('Agent','ARO'); // Edited. - Hot Property (Auto Assign Agent)
        ### End: Add new Agent to Hot Property ###
Find (around line 1255):

Code:
if (!$row->store()) {           // first store to get new user id if id is not set (needed for saveRegistrationPluginTabs)
                echo "<script type=\"text/javascript\"> alert('store:".addslashes(unhtmlentities($row->getError()))."'); </script>\n";
                registerForm( $option, $mosConfig_emailpass, stripslashes( $row->getError() ) );                // there is an addslashes in joomla 1.0.12
                return;
        }
after, add:

Code:
 ### START: Add new Agent to Hot Property ###
        
        include( 'administrator/components/com_hotproperty/config.hotproperty.php' );
global $database;
        
        // Check if hp_default_company is set
        if ( !is_numeric($hp_default_company) || $hp_default_company <= 0 ) {
                
                // Use the latest company added to the database
                $database->setQuery( "SELECT id FROM #__hp_companies ORDER BY id DESC LIMIT 1" );
                $hp_default_company = $database->loadResult();

        }

        // Get Userid from #__users
        $database->setQuery("SELECT id FROM #__users WHERE username='$row->username' LIMIT 1");
        $userid = $database->loadResult();

        // Insert into #__hp_agents
        $database->setQuery("INSERT INTO #__hp_agents (user, name, email, need_approval, company) VALUES ('$userid', '$row->name', '$row->email', '".(($hp_auto_approve == '1') ? '0':'1')."', '".$hp_default_company."')");
        $database->query();

        ###   END: Add new Agent to Hot Property ###
This works for me for CB 1.1 with Joomla 1.0.15 and HP.98 . Please note that I have added the line global $database; to solve an error on setQuery.

Last edited by builder07; 09-14-2008 at 08:17 PM.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use MamboCHARGE to limit an agent's listings MamboResources.com 3rd party addons & Custom Jobs 22 06-25-2009 02:40 AM


All times are GMT +8. The time now is 10:41 PM.

Copyright © 2005-2010 Mosets Consulting

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.