Zen Cart Logo
Forums / General Questions / Nickname at signup *without* phpBB

Nickname at signup *without* phpBB

Locked

Views: 2,996

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
23 Jun 2008, 11:27 AM
#1
acetate avatar

acetate

New Zenner

Join Date:
Feb 2006
Posts:
31
Plugin Contributions:
0

Nickname at signup *without* phpBB

Hi,

I currently have phpBB integration enabled in my store which adds a nickname field to the user sign up page. I made a simple mod to use this nickname with reviews instead of the users real name, and that works fine.

However I don't need the phpBB forum, and it likely has it's own set of security holes so I'd preferably like to get rid of it.

Is there any way of keeping the nickname field and not having phpBB? Or what parts of phpBB are necessary to keep the field enabled, as I can delete the rest and effectively cripple it (and hopefully any security issues that exist in it)

Many Thanks.

23 Jun 2008, 12:04 PM
#2
acetate avatar

acetate

New Zenner

Join Date:
Feb 2006
Posts:
31
Plugin Contributions:
0

Re: Nickname at signup *without* phpBB

Well to answer my own question :)

The file includes\classe\class.phpbb.php seems to only refer to 2 phpBB files - config.php in the root phpBB folder and constants.php in a includes subfolder.

Have deleted all the other phpBB files except these two and it all seems to work OK.... well it seems to work OK in the approximately 10 minutes of testing that I've done :)

Left all the phpBB tables in the database as these don't pose any real security threat.

Feel free to advise if I've missed anything.

Cheers.

4 Jul 2008, 1:26 PM
#3
kadesign avatar

kadesign

Totally Zenned

Join Date:
Feb 2005
Location:
New Jersey
Posts:
593
Plugin Contributions:
0

Re: Nickname at signup *without* phpBB

Hi Acetate,

Would you care to share your mod that uses a nick name for reviews? I know my customers would prefer to leave a nick name instead of their full name when leaving a review.

Thanks,
Kelly

12 Jul 2008, 12:37 PM
#4
acetate avatar

acetate

New Zenner

Join Date:
Feb 2006
Posts:
31
Plugin Contributions:
0

Re: Nickname at signup *without* phpBB

Sorry for the late reply.

First to get the nickname field to appear on the customer account creation page you need to install and enable phpBB integration:

  • I downloaded and installed phpBB to a subfolder in my zencart folder.
  • Ran the phpBB index.php file to setup phpBB and installed it into the same database as zencart with a phpBB_ prefix on all tables.
  • Opened the includes/configure.php zencart file and edited the following line to reflect the location of my phpBB install: define('DIR_WS_PHPBB', '/');
  • In zencart admin went to Configuration >> My Store and set Enable phpBB linkage to true

So now you get a customers_nick field in the customers table and customers must enter a unique nickname when they sign up for an account.

Then I edited this file /includes/modules/pages/product_reviews_write/header_php.php (which is a core file!!!! proceed at your own risk) and added " , customers_nick " to the end of this line:

$customer_query = "SELECT customers_firstname, customers_lastname, customers_email_address

Now I changed this line from this:
$sql = $db->bindVars($sql, ':customersName', $customer->fields['customers_firstname'] . ' ' . $customer->fields['customers_lastname'], 'string');

to this:
$sql = $db->bindVars($sql, ':customersName', $customer->fields['customers_nick'], 'string');

That's it - all entries in the reviews table now use the customers nickname as the name of the reviewer and this is what is displayed in the catalog. Done on v1.3.7

13 Jul 2008, 6:28 AM
#5
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: Nickname at signup *without* phpBB

I'm not sure why, but the idea of a nickname sounded good... Not to hard to do without taking the extra steep to install phpBB and deleting it.

I did a mod and sent it in... if the zen cart team approves it, look to the downloads for Customer Nickname in the Other Modules.

Kelly > I added edits to the Review pages too. :cool:

15 Jul 2008, 9:28 AM
#6
acetate avatar

acetate

New Zenner

Join Date:
Feb 2006
Posts:
31
Plugin Contributions:
0

Re: Nickname at signup *without* phpBB

That's great Dave. I will keep my eye out for it and will give it a go for sure. My method seems to work but is a bit of a hack - a proper module with no reliance on phpBB would be an excellent addition to many a ZenCart including mine.

Cheers.

5 Sep 2008, 11:05 AM
#7
hrinfo avatar

hrinfo

New Zenner

Join Date:
May 2008
Posts:
98
Plugin Contributions:
0

Re: Nickname at signup *without* phpBB

Hi Guys,

I downloaded the nickname module and it is great. It works fine everywhere except on one area. In admin when you login the first page that you see is the stats, new customers etc.

If you click on the new customers link then you get the following error:

Customers Reset Search:
Search Filter: Test
1054 Unknown column 'a.entry_nick' in 'where clause'
in:
[select count(*) as total from customers c left join customers_info ci on c.customers_id= ci.customers_info_id left join address_book a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id left join coupon_gv_customer cgc on c.customers_id = cgc.customer_id where c.customers_lastname like '%Test%' or c.customers_firstname like '%Test%' or c.customers_email_address like '%Test%' or c.customers_telephone rlike 'Test' or a.entry_company rlike 'Test' or a.entry_street_address rlike 'Test' or a.entry_city rlike 'Test' or a.entry_postcode rlike 'Test' or a.entry_nick rlike 'Test']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

I could leave with it but I am worry that it may eventually break the DB. Any ideas?

Tassos

5 Sep 2008, 10:27 PM
#8
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: Nickname at signup *without* phpBB

hrinfo:

Hi Guys,

I downloaded the nickname module and it is great. It works fine everywhere except on one area. In admin when you login the first page that you see is the stats, new customers etc.

If you click on the new customers link then you get the following error:

Customers Reset Search:
Search Filter: Test
1054 Unknown column 'a.entry_nick' in 'where clause'
in:
[select count(*) as total from customers c left join customers_info ci on c.customers_id= ci.customers_info_id left join address_book a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id left join coupon_gv_customer cgc on c.customers_id = cgc.customer_id where c.customers_lastname like '%Test%' or c.customers_firstname like '%Test%' or c.customers_email_address like '%Test%' or c.customers_telephone rlike 'Test' or a.entry_company rlike 'Test' or a.entry_street_address rlike 'Test' or a.entry_city rlike 'Test' or a.entry_postcode rlike 'Test' or a.entry_nick rlike 'Test']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

I could leave with it but I am worry that it may eventually break the DB. Any ideas?

Tassos

Looks like I missed one.. I'll have to see why it's there, but for now in admin/customers.php around line 1151 find..

$search = "where c.customers_lastname like '%" . $keywords . "%' or c.customers_firstname like '%" . $keywords . "%' or c.customers_email_address like '%" . $keywords . "%' or c.customers_telephone rlike '" . $keywords . "' or a.entry_company rlike '" . $keywords . "' or a.entry_street_address rlike '" . $keywords . "' or a.entry_city rlike '" . $keywords . "' or a.entry_postcode rlike '" . $keywords . "' or a.entry_nick rlike '" . $keywords . "'";
```remove the a.entry_nick like this..

$search = "where c.customers_lastname like '%" . $keywords . "%' or c.customers_firstname like '%" . $keywords . "%' or c.customers_email_address like '%" . $keywords . "%' or c.customers_telephone rlike '" . $keywords . "' or a.entry_company rlike '" . $keywords . "' or a.entry_street_address rlike '" . $keywords . "' or a.entry_city rlike '" . $keywords . "' or a.entry_postcode rlike '" . $keywords . "'";

6 Sep 2008, 2:28 AM
#9
hrinfo avatar

hrinfo

New Zenner

Join Date:
May 2008
Posts:
98
Plugin Contributions:
0

Re: Nickname at signup *without* phpBB

Excellent thanks for the quick reply, it worked. I will let you know if something else comes up but I would be surprised as I have run extensive testing on it :-)

Tassos

19 Feb 2009, 7:18 PM
#10
broxi avatar

broxi

New Zenner

Join Date:
Feb 2009
Posts:
1
Plugin Contributions:
0

Re: Nickname at signup *without* phpBB

I have just converted shop to Zen Version 1.3.8 and i have installed the Customer Nickname by Dave Collins.. Only one i could find.

But i cannot get the Customer nickname bit to show up.

Any ideas?

20 Feb 2009, 4:16 AM
#11
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: Nickname at signup *without* phpBB

Broxi:

I have just converted shop to Zen Version 1.3.8 and i have installed the Customer Nickname by Dave Collins.. Only one i could find.

But i cannot get the Customer nickname bit to show up.

Any ideas?

Not really... but if you give use some more clues, maybe we can figure it out...

The version it's running on is 1.3.8a!
Where is it not showing up?... should be in the sign up form, admin edit customer form, and reviews.
Did you edit or upload the files?

Some basic things to check is if all the files made it to there locations complete. Some times FTP transfer wont finish and the file ends up only half way there.